Welcome to the ACTFranka repository, designed for the Franka robot. This guide covers both simulated and real-world environment setups, and includes utilities for environment setup, training, and inference.
We have modified the original ACT code from this repo to complete this project, enhancing its capabilities to better suit our specific application needs.
website - https://sainavaneet.github.io/ACTfranka.github.io/
Ensure you have the following installed:
- Ubuntu 20.04
- ROS Noetic
libfranka
package for Franka robot control
To get started with the ACT imitation learning framework, follow these steps:
git clone https://github.com/sainavaneet/ACTfranka.git
cd ACTfranka
pip install -r requirments.txt
controller/
: Contains robot control code modules including movement and state management.settings/
: Houses configuration files for dataset paths and hyperparameters.simulation/
: Scripts for recording episodes and evaluating models are here.train.py
: The main script to train the policy using ACT imitation learning.real_robot/
: Specialized scripts for deploying the model on an actual Franka robot.
- Setup a simulated environment in Gazebo using the Franka robot and the
libfranka
package. - Record episodes using the script located at
simulation/record_episodes.py
.- Make sure the dataset path is correctly set in
settings/var.py
.
- Make sure the dataset path is correctly set in
The dataset should be structured in HDF5 format as follows:
HDF5 file contents:
- action: <HDF5 dataset "action": shape (149, 8), type "<f8">
- observations:
- images:
- top: <HDF5 dataset "top": shape (149, 480, 640, 3), type "|u1">
- qpos: <HDF5 dataset "qpos": shape (149, 8), type "<f8">
Utilize the Jupyter notebook dataset_prepare/replay.ipynb
to replay recorded episodes by specifying the episode path.
- Configure the necessary hyperparameters in
settings/var.py
. - Execute the
train.py
script with the prepared dataset to generate the policy.
- Load and evaluate the trained policy using the script
simulation/evaluate.py
. - This process simulates how the Franka robot will perform the learned tasks in a controlled environment.
To deploy on a real Franka robot, navigate to the real_robot
directory. Scripts here are specifically adapted for real-world operations of the Franka robot.
For any issues or further questions, please open an issue on the GitHub repository.