Closed mmurooka closed 1 year ago
Just as Choreonoid automatically loads plugin libraries in the directory of the environment variable CNOID_PLUGIN_PATH
, I think it may be a good idea to introduce MUJOCO_PLUGIN_PATH
.
Hi @mmurooka san! I'm unable to play the video file in the README. What does the tactile sensor do? Is it different from the touch sensor introduced recently?
Hi @rohanpsingh I've updated the video so you can play it now. My plugin (MujocoTactileSensorPlugin) is implemented based on the touch grid plugin in the MuJoCo repo, with the following differences.
Anyway, this PR is intended to allow general plugins, including those in the MuJoCo repo, to be used with mc_mujoco.
Just as Choreonoid automatically loads plugin libraries in the directory of the environment variable CNOID_PLUGIN_PATH, I think it may be a good idea to introduce MUJOCO_PLUGIN_PATH.
I've updated it in this way.
The following is a use case of this PR. By loading the MujocoRosUtils::PosePublisher plugin in mc_mujoco with this PR, when running LocomanipController in mc_mujoco, the pose of the cart model is obtained via ROS topics.
https://github.com/rohanpsingh/mc_mujoco/assets/6636600/7567c53a-d372-479d-b540-ce6e03a7c7e8
Hi @mmurooka
This looks good to me. However, may I ask that you consider the following:
MUJOCO_PLUGIN_PATH
environment variable)MUJOCO_PLUGIN_PATH
to MC_MUJOCO_PLUGIN_PATH
such that there's no confusion about itThanks
Hi @gergondet Thanks for your comment. I think I have addressed all of them. I have eliminated support for the environment variable because I began to feel that it fits better with the concept of mc_rtc. Feel free to modify the entry name, doc, etc.
I have rebased the commits to eliminate the changelog in main.cpp.
This change allows the use of plugins such as https://github.com/isri-aist/MujocoTactileSensorPlugin I just copied part of https://github.com/deepmind/mujoco/blob/main/simulate/main.cc, but it may be modified to fit this project if necessary.