The ros_control interface for the MuJoCo simulator. The code parses a given model and register a control interface for each slide or hinge joint. The ros_control effort based controllers could be then loaded as shown in example start_simple_robot.launch. It provides trajectory based interface e.g. for MoveIt.
Download MuJoCo simulator from http://www.mujoco.org and put the simulator code as well as your MuJoCo key into the folder ~/.mujoco/, i.e.:
ls ~/.mujoco
mjkey.txt mujoco200
ls ~/.mujoco/mujoco200/
bin doc include model sample
Put this package into your ros workspace, in case you do not have a workspace yet:
mkdir -p ~/ros/src && cd ~/ros/src
git clone https://github.com/JKBehrens/mujoco-ros.git
cd ..
catkin build
All tests should pass if the installation was successful.
cd ~/ros && catkin run_tests mujoco_ros_control && catkin_test_results build/mujoco_ros_control/
...
Summary: X tests, 0 errors, 0 failures, 0 skipped
where X >= 4
roslaunch mujoco_ros_control start_simple_robot.launch
roslaunch mujoco_ros_control rviz.launch
see my other repository: coming soon!
You can control the camera in mujoco (images published on /<node_name>/rgb
).
rosrun mujoco_ros_control camera_control x y z rot elev dist