mujoco_ros_utils
|
ROS-based MuJoCo utilities
https://github.com/isri-aist/MujocoRosUtils/assets/6636600/6cc3bc6c-113d-4a1d-97f5-d75b1000fc8a
Ubuntu 20.04 / ROS Noetic
<absolute path to MuJoCo>
is the path to the root directory of MuJoCo. For example, ${HOME}/.mujoco/mujoco-2.3.5
if you installed MuJoCo from release, or ${HOME}/src/mujoco
if you installed it from source.
Add source ${HOME}/ros/ws_mujoco/devel/setup.bash
to ${HOME}/.bashrc
.
Assume that MuJoCo is installed in ${HOME}/.mujoco/mujoco-2.3.5
from release, and the path to the catkin workspace is ${HOME}/ros/ws_mujoco
.
To visualize a point cloud restored from a depth image, add the points:=true
option to display.launch
. (ros-${ROS_DISTRO}-depth-image-proc
must be installed.)
Plugin to publish clock topic.
All of the following attributes are optional.
topic_name
: Topic name of clock. (Default is /clock
)publish_rate
: Publish rate. (Default is 100.0 [Hz])use_sim_time
: Value of use_sim_time
rosparam. (Default is true
)An example of tags to be added to the MJCF file:
This plugin must be registered in worldbody.
Plugin to publish topics or broadcast TF of pose and velocity of the body.
All of the following attributes are optional.
frame_id
: Frame ID of topics header or TF parent. (Default is map
)pose_topic_name
: Topic name of pose. (Default is mujoco/<body name>/pose
)vel_topic_name
: Topic name of velocity. (Default is mujoco/<body name>/vel
)publish_rate
: Publish rate. (Default is 30.0 [Hz])output_tf
: Whether to broadcast TF. (Default is false
)tf_child_frame_id
: Child frame ID for TF. Used only when output_tf
is true
. (Default is <body name>
)An example of tags to be added to the MJCF file:
The objtype
attribute must be xbody
.
Plugin to apply external force to the body.
All of the following attributes are optional.
topic_name
: Topic name of external force. (Default is /external_force
)vis_scale
: Arrow length scale. (Default is 0.1)An example of tags to be added to the MJCF file:
Plugin to publish topics of color and depth images.
All of the following attributes are optional.
frame_id
: Frame ID of topics header or TF parent. (Default is <camera name>
)color_topic_name
: Topic name of color image. (Default is mujoco/<camera name>/color
)depth_topic_name
: Topic name of depth image. (Default is mujoco/<camera name>/depth
)info_topic_name
: Topic name of camera information. (Default is mujoco/<camera name>/camera_info
)height
: Image height. (Default is 240)width
: Image width. (Default is 320)publish_rate
: Publish rate. (Default is 30.0 [Hz])An example of tags to be added to the MJCF file:
The objtype
attribute must be camera
.
Plugin to send a command to an actuator via ROS topic.
The following attributes are required.
actuator_name
: Actuator name to which the command is sent.topic_name
: Topic name of actuator command. (Default is mujoco/<actuator name>
)An example of tags to be added to the MJCF file:
In the plugin
element, you need to specify the joint
, body
, etc. of the actuator to be controlled. This information is not used in the plugin, but is necessary to avoid errors in MJCF parsing.
The plugin itself is also added to the list of actuators, but it is a dummy actuator. The unwanted increase in the number of actuators (which also increases the dimension of d->ctrl
) is a problem that should be solved in the future.
Plugin to publish sensor data.
The following attributes are required.
sensor_name
: Name of sensor whose data is to be published.The following attributes are optional.
frame_id
: Frame ID of message header. (Default is map
)topic_name
: Topic name. (Default is mujoco/<sensor name>
)publish_rate
: Publish rate. (Default is 30.0 [Hz])An example of tags to be added to the MJCF file:
In the plugin
element, you need to specify the objtype
and objname
. This information is not used in the plugin, but is necessary to avoid errors in MJCF parsing.