Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adapted Discrete Elastic Rod model for MuJoCo

An adaptation of the Cartesian stiffness forces in Discrete Elastic Rods (Bergou2008) into generalized coordinates for use in a joint-based simulator, MuJoCo.

C++ plugin

To use with C++ API of MuJoCo, see folder 'wire_plugin' for instructions.

Requires

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

Use:

  1. In the root directory of this package:
pip install -e .
  1. Build dlo_cpp:
cd adapteddlo_muj/controllers/dlo_cpp
bash swigbuild.sh
cd ../../..
  1. 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
  1. For computation speed tests:
python speed_test.py

Real experiments

Real:

  1. To obtain 2D shape from image for parameter identification:
python get_pos/dlomuj_2Dpos.py
  1. 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

Sim:

  1. To determine sim stiffness parameters from real experiment (with 2D positions and critical angles obtained):
python real2sim_paramiden.py
  1. To simulate DLO held by Denso VS-060 robot arm in 4 different poses:
python test_shape_w_arm.py

Compare:

  1. To compare sim and real DLO poses:
python simvreal_dlomuj.py

Note:

  • adjust time step to ensure stability

About

An adaptation of the Cartesian stiffness forces in Discrete Elastic Rods (Bergou2008) into generalized coordinates for use in a joint-based simulator, MuJoCo.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages