Repo for initial studies in robotics kinematics and dynamics control with Mujoco.
Four codes are available:
classic_control_two_link.py
: simulates a planar RR robot. All code is at this file. Good start.main_sim.py
: a self-contained inverse dynamics controller with Kuka iiwa robot simulation. Intermediate (used for the Mujoco Workshop 2020).advanced_sim.py
: full code with three different controller and trajectory planning. All codes are incontrollers_utils.py
for development and use. Advanced users should get from here. Create your own sim file and use this examples for coding. Contributions are welcome!camera_rendering_example.py
: minimal example of a robotic arm with embedded camera using mujoco-py.
- Activate and deactivate Mujoco viewer
- Access Mujoco data info during simulation
- Calculate forward kinematics and compare with Mujoco's
xpos
- Calculate the Geometric Jacobian and compare with Mujoco's
.jacp && .jacr
- Obtain cartesian velocity through xvel and calculated Jacobian
- Create a joint position PD controller (simulate at Matlab to find best params)
- Apply inverse kinematics and move in Cartesian coordinates
Even though it suggest to add LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$USER/.mujoco/mujoco200/bin
to .bashrc, Pycharm in debug mode seems to not load it correclty.
The solution is to add it to into Edit configurations->Environment Variables
click on +
and then on the left panel add LD_LIBRARY_PATH
, on the left $LD_LIBRARY_PATH:/home/$USER/.mujoco/mujoco200/bin
.
Gustavo Lahr - glahr - gustavo.lahr@usp.br
Henrique Garcia - griloHBG