Skip to content

Commit

Permalink
feat: added support for MuJoCo 2.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPL1 committed Feb 8, 2024
1 parent 13489d5 commit fc32993
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
fail-fast: false
matrix:
distro: [noetic, one]
mujoco: [2.3.6]
mujoco: [2.3.7]
include:
- distro: noetic
mujoco: 2.3.6
mujoco: 2.3.7
env:
CATKIN_LINT: true
CCOV: true
- distro: one
mujoco: 2.3.6
mujoco: 2.3.7
env:
CLANG_TIDY: pedantic

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ CodeCov | [![codecov](https://codecov.io/gh/ubi-agni/mujoco_ros_pkgs/branch/noet


# Build Instructions
1. Make sure MuJoCo is installed (the current build uses version 2.3.6) and runs on your machine.
1. Make sure MuJoCo is installed (the current build uses version 2.3.7) and runs on your machine.
2. Create a new ROS workspace or include this repository into an existing workspace.
3. Before building, make sure that your compiler knows where to find the MuJoCo library, e.g. by running
```bash
export MUJOCO_DIR=PATH/TO/MUJOCO/DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MUJOCO_DIR/lib
export LIBRARY_PATH=$LIBRARY_PATH:$MUJOCO_DIR/lib
```
where `PATH/TO/MUJOCO/DIR` is `~/.mujoco/mujoco-2.3.6` if you used the recommended location to install mujoco (if downloaded as tarball). If you built MuJoCo from source and the install path is known to catkin, you can skip this step.
where `PATH/TO/MUJOCO/DIR` is `~/.mujoco/mujoco-2.3.7` if you used the recommended location to install mujoco (if downloaded as tarball). If you built MuJoCo from source and the install path is known to catkin, you can skip this step.

4. Build with `catkin_build`, `catkin b` or `colcon build`.
5. Source your workspace and try `roslaunch mujoco_ros launch_server.launch use_sim_time:=true` to test if it runs.
Expand Down
4 changes: 3 additions & 1 deletion mujoco_ros/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* replaced `boost::shared_ptr` with `std::shared_ptr` or `std::unique_ptr` wherever possible (ROS 1 fast intra-process message-passing requires boost::shared_ptr).
* replaced `shared_ptr` with `unique_ptr` wherever possible.
* replaced smart pointer constructor initialization with `make_shared` or `make_unique` wherever possible.
* Updated to MuJoCo library version 2.3.7.
* * Added [jointactuatorfrc](https://mujoco.readthedocs.io/en/2.3.7/XMLreference.html#sensor-jointactuatorfrc) support in `mujoco_ros_sensors`.

Contributors: @DavidPL1, @acodeodyssey

Expand Down Expand Up @@ -48,7 +50,7 @@ Contributors: @DavidPL1, @LeroyR, @rhaschke

### Added
* Updated to MuJoCo library version 2.3.6.
* Added a `step(num_steps=1, blocking=true)` public function./
* Added a `step(num_steps=1, blocking=true)` public function.
* Unit tests for plugin loading and resetting and running callbacks correctly.
* Now automatically building with AVX instructions, if possible.
* CMake tooling borrowed from deepminds MuJoCo repo and https://github.com/osjacky430/ros_pkg_template/.
Expand Down
2 changes: 1 addition & 1 deletion mujoco_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ configure_project_option(
)

# Find MuJoCo
find_package(mujoco 2.3.6 REQUIRED)
find_package(mujoco 2.3.7 REQUIRED)
find_library(GLFW libglfw.so.3)

# ###############################################
Expand Down
3 changes: 3 additions & 0 deletions mujoco_ros_sensors/src/mujoco_sensor_handler_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ bool MujocoRosSensorsPlugin::load(const mjModel *model, mjData *data)
SENSOR_STRING[mjSENS_ACTUATORFRC] = "actuatorfrc";
SENSOR_STRING[mjSENS_BALLQUAT] = "ballquat";
SENSOR_STRING[mjSENS_BALLANGVEL] = "ballangvel";
SENSOR_STRING[mjSENS_JOINTACTFRC] = "jointactfrc";
SENSOR_STRING[mjSENS_JOINTLIMITPOS] = "jointlimitpos";
SENSOR_STRING[mjSENS_JOINTLIMITVEL] = "jointlimitvel";
SENSOR_STRING[mjSENS_JOINTLIMITFRC] = "jointlimitfrc";
Expand Down Expand Up @@ -335,6 +336,7 @@ void MujocoRosSensorsPlugin::lastStageCallback(const mjModel *model, mjData *dat
case mjSENS_ACTUATORPOS:
case mjSENS_ACTUATORVEL:
case mjSENS_ACTUATORFRC:
case mjSENS_JOINTACTFRC:
case mjSENS_JOINTLIMITPOS:
case mjSENS_JOINTLIMITVEL:
case mjSENS_JOINTLIMITFRC:
Expand Down Expand Up @@ -572,6 +574,7 @@ void MujocoRosSensorsPlugin::initSensors(const mjModel *model, mjData *data)
case mjSENS_ACTUATORPOS:
case mjSENS_ACTUATORVEL:
case mjSENS_ACTUATORFRC:
case mjSENS_JOINTACTFRC:
case mjSENS_JOINTLIMITPOS:
case mjSENS_JOINTLIMITVEL:
case mjSENS_JOINTLIMITFRC:
Expand Down

0 comments on commit fc32993

Please sign in to comment.