An adaptation of the Cartesian stiffness forces in Discrete Elastic Rods (Bergou2008) into generalized coordinates for use in a joint-based simulator, MuJoCo.
To use with C++ API of MuJoCo, see folder 'wire_plugin' for instructions.
On Ubuntu, make sure you have the packages
liblapack-dev libopenblas-dev installed:
sudo apt install liblapack-dev libopenblas-dev
Also requires: -MuJoCo, Gymnasium, mujoco-python-viewer, eigen
- In the root directory of this package:
pip install -e .
- Build dlo_cpp:
cd adapteddlo_muj/controllers/dlo_cpp
bash swigbuild.sh
cd ../../..
- To obtain validation results:
cd scripts
python dlo_testdata.py --stiff [stiff_type] --test [test_type]
where [stiff_type] = 'native' - native MuJoCo stiffness model, or 'adapt' - adapted DLO model, and [test_type] = 'lhb' - localized helical buckling test, or 'mbi' - Michell's buckling instability test. 4. For MBI overall results:
python plot_mbicombined.py
- For computation speed tests:
python speed_test.py
- To obtain 2D shape from image for parameter identification:
python get_pos/dlomuj_2Dpos.py
- To obtain depth from kinect azure (put csv file in data3d in .csv format -- x_pixelpos, y_pixelpos, pixeldepth):
python get_pos/get_depth_many_azure.py
- To determine sim stiffness parameters from real experiment (with 2D positions and critical angles obtained):
python real2sim_paramiden.py
- To simulate DLO held by Denso VS-060 robot arm in 4 different poses:
python test_shape_w_arm.py
- To compare sim and real DLO poses:
python simvreal_dlomuj.py
Note:
- adjust time step to ensure stability