mc_rtc plugin to use tactile sensor in controller via ROS interface
- Compiler supporting C++17
- Tested on
Ubuntu 20.04 / ROS Noetic
- mc_rtc
- isri-aist/MujocoTactileSensorPlugin (Install as a ROS package)
- An option to build without dependency on the MuJoCo tactile sensor is also supported.
- eSkinRosUtils
- An option to build without dependency on the e-Skin tactile sensor is also supported.
# Load the ROS setup file so that the `mujoco_tactile_sensor_plugin` package can be found
$ mkdir ${HOME}/src && cd ${HOME}/src
$ git clone [email protected]:isri-aist/McRtcTactileSensorPlugin.git --recursive
$ cd McRtcTactileSensorPlugin
$ mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo # Add "-DENABLE_MUJOCO=OFF" or "-DENABLE_ESKIN=OFF" options if necessary
$ make
$ make install
If you encounter the following error in cmake,
Make Error in src/CMakeLists.txt:
Imported target "PkgConfig::eskin_ros_utils" includes non-existent path
"/work/install/include"
in its INTERFACE_INCLUDE_DIRECTORIES.
the following commands may be useful in resolving the error.
sudo sed -i "s@/work/install@/opt/ros/noetic@g" /opt/ros/${ROS_DISTRO}/share/itr_ros_*/cmake/*.cmake
sudo sed -i "s@/work/install@/opt/ros/noetic@g" /opt/ros/${ROS_DISTRO}/lib/pkgconfig/itr_ros_*.pc
This plugin receives tactile sensor data via ROS topic and sets wrench on the robot's force sensor in mc_rtc controller.
See this page for a general tutorial on configuring mc_rtc plugins.
Put the following line in the mc_rtc configuration (e.g. ${HOME}/.config/mc_rtc/mc_rtc.yaml
).
Plugins: [TactileSensor]
Put the following lines in the plugin configuration (e.g. ${HOME}/.config/mc_rtc/plugins/TactileSensor.yaml
).
sensors:
- msgType: mujoco # "mujoco" or "eskin"
topicName: /mujoco/tactile_sensor
tactileSensorFrameName: jvrc1_right_elbow_tactile_sensor
forceSensorName: RightElbowForceSensor
The above configuration assumes a ROS topic named /mujoco/tactile_sensor
with a message of type mujoco_tactile_sensor_plugin/TactileSensorData being published by some node (e.g. isri-aist/MujocoTactileSensorPlugin).
The tactile sensor frame (e.g. jvrc1_right_elbow_tactile_sensor
) must be defined in a URDF model (e.g. jvrc_description/urdf/jvrc1.urdf
).
The force sensor (e.g. RightElbowForceSensor
) must be defined in robot module (e.g. mc_rtc/src/mc_robots/jvrc1.cpp
).
For system details for using tactile sensor with mc_mujoco, please refer to here.