Control the dual arm in AGX simulation
The main dependencies are the following ones:
- AGX simulator: Working AGX urdf-application environnement is required
- AGX custom project scene for IIWA: Custom AGX scene (https://github.com/epfl-lasa/agx_scene)
- dual_iiwa_toolkit: Optional, if the build of the passive controller is needed: The python binding of dual_iiwa_toolkit (https://github.com/epfl-lasa/dual_iiwa_toolkit)
The file system is divided in several subfolders:
builded_libs
: contains the cpp library and the python binding of the passive controllerconfig
: contains .yaml and _ LearnedModel_ used by the controllerurdf
: contains .urdf of robot used by the controllerscript
:- python_agx_dual_arm: Contains the control loop
Tested with python 3.8.10. It is recommanded to create a venv
cd agx_dual_arm && pip install -r requirements_agx.txt
- Optional: for the keyboard control:
sudo pip3 install keyboard
- Add the cpp lib and python bindings to you path
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path_to_iam_dual_arm_control/dual_arm_control/python_binding/build/' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path_to_iam_dual_arm_control/agx_dual_arm/builded_libs' >> ~/.bashrc
. ~/.bashrc
sudo ldconfig
If the libraries of i_am_project or iiwa_toolkit need to be build:
cd python_binding && mkdir build && cd build && cmake .. && make -j
- Launch AGX simulator with the custom project scene for the double iiwa
sudo python3 ../run-in-docker.py python3 click_application.py --model models/Projects/agx_scene/Scenes/DualIiwaClickSceneTable.yml:IiwaTorqueClick --timeStep 0.001 --agxOnly --rcs --portRange 5656 5658 --disableClickSync
- Run the controller:
python script/python_agx_dual_arm.py
With the keyboard commands (sudo rights required)
sudo venv/bin/python3.8 script/python_agx_dual_arm.py