Skip to content

Commit

Permalink
docs: update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPL1 committed Oct 13, 2023
1 parent 80c52fc commit f620433
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 31 deletions.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# mujoco\_ros\_pkgs
# MuJoCo ROS

Tools that combine the MuJoCo simulator with ROS. Meant to recreate a base port of [gazebo\_ros\_pkgs](https://github.com/ros-simulation/gazebo_ros_pkgs) for MuJoCo.

This is a ROS software Project that wraps the [MuJoCo physics engine](https://mujoco.org/) into a ROS package.
It is an extension of the MuJoCo [simulate](https://github.com/deepmind/mujoco/blob/2.1.1/sample/simulate.cc) program, with ROS integration and the possibility to load plugins via pluginlib.

### ROS Versions

This project is mainly built for Ubuntu Focal with ROS Noetic. But we are working on adaptations for more recent Ubuntu systems with ROS One and Humble (ROS 2).

### Continuous Integration

service | Noetic | One | Humble
---------- | :-----: |:---:| :----:
GitHub | [![Format](https://github.com/davidpl1/mujoco_ros_pkgs/actions/workflows/format.yaml/badge.svg?branch=noetic-devel)](https://github.com/davidpl1/mujoco_ros_pkgs/actions/workflows/format.yaml?query=branch%3Anoetic-devel) [![CI](https://github.com/davidpl1/mujoco_ros_pkgs/actions/workflows/ci.yaml/badge.svg?branch=noetic-devel)](https://github.com/davidpl1/mujoco_ros_pkgs/actions/workflows/ci.yaml?query=branch%3Anoetic-devel) <td rowspan="2"> Coming Soon</td> <td rowspan="2">Coming Soon</td>
CodeCov | [![codecov](https://codecov.io/gh/davidpl1/mujoco_ros_pkgs/branch/noetic-devel/graph/badge.svg?token=W7uHKcY0ly)](https://codecov.io/gh/davidpl1/mujoco_ros_pkgs) |


# Build Instructions
1. Make sure MuJoCo is installed (the current build uses version 2.3.6) 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.

4. Build with `catkin_build` or `catkin b`.
5. Source your workspace and try `roslaunch mujoco_ros launch_server.launch use_sim_time:=true` to test if it runs.

> **Warning**
> To prevent action servers ignoring actions for a limited time after resetting the simulation, until https://github.com/ros/actionlib/pull/203 is merged, you need to build the PR branch and any packages implementing action servers (like MoveIt) yourself.

### Plugin Examples

As an example for extended functionality through plugins, take a look at [mujoco_ros_control](https://github.com/ubi-agni/mujoco_ros_pkgs/tree/noetic-devel/mujoco_ros_control), [mujoco_screw_plugin](https://github.com/ubi-agni/mujoco_screw_plugin), [mujoco_contact_surfaces](https://github.com/ubi-agni/mujoco_contact_surfaces) or [mujoco_ros_sensors](https://github.com/ubi-agni/mujoco_ros_pkgs/tree/noetic-devel/mujoco_ros_sensors).

We provide some code examples in our [demo repository](https://github.com/ubi-agni/mujoco_ros_demos)


### Documentation

We are currently working on setting up more detailed documentation including tutorials and guides. The current prototype can be found [here](davidpl1.github.io/mujoco_ros_pkgs) (though note that this will migrate once its ready for an initial proper release).

Some more structural and configuration info, which is not yet included in the documentation, can be found [here](./mujoco_ros/README.md).

# Licensing

This work is licensed under the BSD 3-Clause License (see LICENSE).
It is built on top of MuJoCo, which was released under an Apache 2.0 License. For the original MuJoCo and further third party licenses, see [THIRD_PARTY_NOTICES](./THIRD_PARTY_NOTICES).
1 change: 1 addition & 0 deletions mujoco_ros/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Changed
* Reduced sensor noise std in tests to reduce wrongful fails due to too stochasticity.
* Updated toplevel README to be more informative.

Contributors: @DavidPL1, @LeroyR

Expand Down
30 changes: 0 additions & 30 deletions mujoco_ros/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# MuJoCo Ros

This is a ROS package that wraps the [MuJoCo physics engine](https://mujoco.org/) into a ros package.
It is an extension of the MuJoCo [simulate](https://github.com/deepmind/mujoco/blob/2.1.1/sample/simulate.cc) program, with ROS integration and the possibility to load plugins via pluginlib.

As an example for extended functionality via plugin, take a look at [mujoco_ros_control](https://github.com/ubi-agni/mujoco_ros_pkgs/tree/noetic-devel/mujoco_ros_control), [mujoco_screw_plugin](https://github.com/ubi-agni/mujoco_screw_plugin), [mujoco_contact_surfaces](https://github.com/ubi-agni/mujoco_contact_surfaces) or [mujoco_ros_sensors](https://github.com/ubi-agni/mujoco_ros_pkgs/tree/noetic-devel/mujoco_ros_sensors).

For an example of the Franka Emika Panda using ROS control in MuJoCo, see [franka_ros_mujoco](https://github.com/ubi-agni/franka_ros_mujoco).

## Plugins
Plugins provide an easy way of including new functionality into _mujoco\_ros_. The lifecycle of a Plugin is as follows:
Expand Down Expand Up @@ -64,27 +58,3 @@ cam_config:
```

As long as the image transport topics have no subscribers, the offscreen camera images are not rendered. This way no computational overhead is caused until the images are requested explicitly.

___

# Build Instructions
1. Make sure MuJoCo is installed (the current build uses version 2.3.3) 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.3` 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` or `catkin b`.
5. Source your workspace and try `roslaunch mujoco_ros demo.launch` to test if it runs.

> **Warning**
> To prevent action servers ignoring actions for a limited time after resetting the simulation, until https://github.com/ros/actionlib/pull/203 is merged, you need to build the PR branch and any packages implementing action servers (like MoveIt) yourself. Additionally, for the Franka Emika Panda robot, until https://github.com/frankaemika/franka_ros/pull/292 is merged, you need to build the PR branch yourself, otherwise controlling the robot after time resets is buggy.

# Licensing

This work is licensed under the BSD 3-Clause License (see LICENSE).
It is built on top of MuJoCo 2.3.3, which was released under an Apache 2.0 License. For the original MuJoCo and further third party licenses, see [THIRD_PARTY_NOTICES](./THIRD_PARTY_NOTICES).

0 comments on commit f620433

Please sign in to comment.