Skip to content

AUVSL/mujoco_sim

This branch is 2 commits behind HoangGiang93/mujoco_sim:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ce9e32b · Aug 2, 2024
Jul 31, 2023
Jul 30, 2024
Jun 12, 2023
Jul 30, 2024
Jun 12, 2023
Aug 2, 2024
Jun 12, 2023
Jun 12, 2023
Jul 31, 2023
Jun 12, 2023
Jul 31, 2023
Jul 30, 2024
Jun 12, 2023

Repository files navigation

mujoco_sim

ROS interface for MuJoCo simulator

Overview

mujoco_sim_x4.mp4
spawning.robots.mp4

Key Features

  • 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

Installation

  1. Create a workspace
source /opt/ros/<ros-version>/setup.bash    # source ROS
mkdir -p ~/mujoco_ws/src                    # create directory for workspace
  1. 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
  1. 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
  1. 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

Troubleshooting

  1. ERROR: gladLoadGL error
  • Solution: sudo apt install nvidia-driver-515
  1. 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

Software architecture

Picture

About

ROS interface for MuJoCo simulator

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C++ 76.8%
  • Python 21.1%
  • CMake 1.5%
  • Other 0.6%