Welcome to the Diffusion Policy project for deploying on Foam Hand and XArm. Below is a guide to help you get started with running this project.
For more details on the project, please refer to the poster available on Google Drive: https://drive.google.com/file/d/1hYUVsxyhiXEtXabWOoytsa8HlRqqGbKX/view?usp=drive_link.
-
/diffusion_policy/.venv
Virtual environment for running the project. -
/mydata
Contains collected data. -
/datasets
Contains preprocessing scripts to convert data from bag format to pkl format. -
/echos
Contains output data and analysis scripts from past tests. -
/model
Contains the visual encoder and noise prediction network for the diffusion model. -
/plots
Contains scripts for visualizing model outputs. -
/save
Directory for saving trained model weights.
To train the model:
- Run the
training_object.ipynbnotebook. - Make sure to update the data input and output paths in the notebook (the
nwfolder has been renamed todiffusion_policy).
To run model inference:
-
Launch the RealSense camera node:
ros2 launch realsense_rgbd_transport_ros2 rs_launch.py
This should be run from the
~/rs_cameradirectory. -
Run the
inference.ipynbnotebook. -
Ensure to update the data input and output paths in the notebook.
Inference output data will be saved automatically to the save/ folder. You can adjust the save_flag and record_flag in the inference.ipynb notebook to control whether the ROS bag is saved.