ROS interface for MuJoCo simulator
mujoco_sim_x4.mp4
spawning.robots.mp4
- Incorporates an advanced physics engine sourced from https://mujoco.org/
- Supports import and export of URDF and MJCF formats
- Enables exporting of simulation results in the USD format
- Integrates controller interfaces, controller managers, and hardware interfaces sourced from http://wiki.ros.org/ros_control
- Implements PD computed-torque control for enhanced stability
- Enables spawning and destruction of objects during run-time via rosservice
- Synchronizes simulation time with real time, with the ability to adjust simulation time for faster or slower execution
- Provides comprehensive visualization of MuJoCo elements within rviz
- Offers velocity control for the base
- Supports mimic joints from URDF format
- Create a workspace
source /opt/ros/<ros-version>/setup.bash # source ROS
mkdir -p ~/mujoco_ws/src # create directory for workspace
- Initialize the workspace from this file and update the workspace
wstool init ~/mujoco_ws/src # initialize .rosinstall
wstool merge -t ~/mujoco_ws/src https://raw.githubusercontent.com/HoangGiang93/mujoco_ws/main/noetic.rosinstall
wstool update -t ~/mujoco_ws/src # pull the repositories
- Install dependency of all packages in the workspace
rosdep install --ignore-src --from-paths ~/mujoco_ws/src/mujoco_sim/ ~/mujoco_ws/src/mujoco_msgs/ ~/mujoco_ws/src/mujoco_world/ # install dependencies available through apt
- Build packages
cd ~/mujoco_ws # go to the workspace directory
catkin_make # build packages (or catkin build)
source ~/mujoco_ws/devel/setup.bash # source new overlay
ERROR: gladLoadGL error
- Solution:
sudo apt install nvidia-driver-515
- Model errors when using a custom controller
- Specify the controller in
robot.yaml
- Load the URDF to the parameter server after spawning the mujoco_sim node