This code comes from several repositories and has been re-structured to be used easily to start Mikhail KOPTEV's Obstacle Avoidance demo at LASA.
This demo needs 3 computers :
- PANDA_PC : with RT/os, runs flwi interface and torque controller
- RTX_PC : with good GPU, runs NN and optitrack bridge
- Optitrack PC : Windows, runs motive and streams optitrack This demo uses 3 dockers :
- franka-lightweight-interface: to be run on the computer connected to the panda (called PANDA_PC), used to communicate with the robot
- optitrack : used to publish optitrack info using zmq, should be run on RTX_PC
- koptev-demo : used to run all python code from Mikhail, should be run on RTX_PC (except franka_zmq_bridge which should run on computer connected to panda)
Note : docker commands rely on aica-docker scripts which should be installed on compputers sued for the demo.
Need these two assets with these specific IDs:
- ball_koptev : ID = 1001
- franka_base17 : ID = 1096 To use human spehres :
- neck : ID = 1002
- pelvis : ID = 1003
- right_elbow : ID = 1004
- right_wrist : ID = 1005
- left_elbow : ID = 1006
- left_wrist : ID = 1007
Open the 3 docker containers :
- fwli on computer connected to panda
- optitrack and koptev-demo on RTX_PC
Make sure the IP adresses are correct and communication runs smoothly. These can be checked in the ds_mppi/config.yaml file and in franka_zmq_bridge/bridge_torque_controller.py
Then run the following commands.
On PANDA_PC
cd ~/Workspace/koptev_demo/dependencies/franka-lightweight-interface
bash run-rt.sh
franka_lightweight_interface 17 panda_ --sensitivity low --joint-damping off
On RTX_PC
cd ~/Workspace/koptev_demo/dependencies/optitrack
bash docker-build.sh (IF never build before)
bash docker-run.sh
All the next commands must be run from inside the koptev-demo container, which can be build and start with these commands :
cd ~/Workspace/koptev_demo
bash docker/build-image.sh
bash docker/start-docker.sh
On PANDA_PC
cd ~/Workspace/koptev_demo
bash docker/start-docker.sh -m connect
cd franka_zmq_bridge/
python3 bridge_torque_controller.py
On RTX_PC
cd ~/Workspace/koptev_demo
bash docker/start-docker.sh -m connect
cd ds_mppi/
python3 obstacleStreamerOptitrack.py
On Panda_PC (if doesn't slow things down)
cd ~/Workspace/koptev_demo
bash docker/start-docker.sh -m connect
cd ds_mppi/
python3 pbSim.py
On RTX_PC
cd ~/Workspace/koptev_demo
bash docker/start-docker.sh -m connect
cd ds_mppi/
python3 frankaIntegratorFeedback.py
On RTX_PC Planner (optim thingy) for concave obstacles -> do not launch unless you have good computer
cd ~/Workspace/koptev_demo
bash docker/start-docker.sh -m connect
cd ds_mppi/
python3 frankaPlanner.py
Code originally comes from these repos and has been restructured to be easily used :
https://github.com/epfl-lasa/OptimalModulationDS
https://github.com/m-koptev/franka_zmq_bridge
https://github.com/m-koptev/optitrack_lasa
Mikhail KOPTEV ([email protected]) Maxime GAUTIER ([email protected])