Skip to content

uncore-team/panda_myoarm

 
 

Repository files navigation

Usage Instructions

Clone the repository:

git clone https://github.com/opfernandez/panda_myoarm.git
cd panda_myoarm
python3 -m venv venv
source venv/bin/activate
git submodule init
git submodule update --remote --merge
pip3 install -r requirements.txt

img

Launch Training

On one terminal, we launch the SB3 part, the DRL algorithm that infers actions from provided observations:

cd dm_robotics_panda/examples/
python3 rl_side_panda_myoarm.py -p <port>

On another terminal, we launch the simulation environment where the actions are executed and the observations are generated:

python3 agent_side_panda_myoarm.py -p <port>  

If you want to monitor training:

tensorboard --logdir ./train_logs --host 0.0.0.0

After training ends or you decide to finish it, you will find your checkpoints under the /checkpoints directory.

Testing Your Model

python3 test_trained_DRL_model.py -m <.zip model under checkpoints dir> -t <trajectory to follow>

This will save forces, torques, end-effector velocities, and trajectory data in different .csv files so you can plot and inspect the data. Also available trajectories are h-square, ah-square, h-triangle, ah-triangle, h-circle, ah-circle, h-pentagon, ah-pentagon.

Inspecting Results

python3 plot_data.py

This script reads data from CSV files generated by the test_trained_DRL_model.py script and plots various metrics such as trajectory, forces, torques, and velocities. It also plots forces over the trajectory for a 3D visualization. You can expect plots like the following one

img

About

This repository provides a simulation framework for human-robot interaction experiments involving the Franka Emika Panda manipulator and a modeled human arm. The included submodule libraries are Myosim for human arm simulation, dm_robotics_panda for robot control, and rl_spin_decoupler for IPC. All agent components compatible with Stable-Baselines3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors