ros-controls / gazebo_ros2_control

Wrappers, tools and additional API's for using ros2_control with Gazebo Classic
Apache License 2.0
207 stars 125 forks source link

"_mimic" joint interface name suffix causes Moveit2 "Joint not found" Error #173

Closed shonigmann closed 6 months ago

shonigmann commented 1 year ago

Is the mimic joint suffix that gets added to interface names (here) necessary? If so, what is its intent? I can't find anything in the ros2_control source code that is expecting a mimic suffix, but maybe I'm not looking in the right place.

I suppose it makes the output of services like list_hardware_interfaces a bit more verbose/explicit, but I'd argue that the onus should be on the URDF designer to decide whether the joint is named as a "mimic" in the name or not. As an aside, perhaps on the command interfaces output, [mimic] might be more appropriate than [unclaimed] and this is where that added string could go.

I ask because I was trying to control a robot that had mimic joints with Moveit, simulated in gazebo, the Moveit RobotModel implementation complains loudly that Joint 'joint_name_mimic' not found in model 'model_name', seemingly because the GazeboSystem hardware_interface assigns a new name to the joint that doesn't exist in the URDF/SRDF/yaml config files. It took me longer than I'd like to admit that the source of the error was gazebo_ros2_control's change and not a mistake that I had made in one of the description files.

Commenting out the "_mimic" suffix doesn't appear to break anything, and allows Moveit to function as expected.

Thanks in advance for any feedback/insights!

miso037 commented 1 year ago

Hi i have the same issue, although it is a dumb fix it works for suppressing Move_group error. You can add the following lines to your robot.urdf generated by MoveIt.

<joint name="panda_finger_joint2_mimic" type="fixed"> <parent link="world" /> <child link="random" /> </joint> <link name="random"/>

In my case, the "panda_finger_joint2" is the mimicked joint that MoveIt moves.

bmagyar commented 1 year ago

I agree it's not intuitive to add that suffix.

On Fri, 5 May 2023, 15:18 miso037, @.***> wrote:

Hi i have the same issue, although it is a dumb fix it works for suppressing Move_group error. You can add the following lines to your robot.urdf generated by MoveIt.

In my case, the "panda_finger_joint2" is the mimicked joint that MoveIt moves.

— Reply to this email directly, view it on GitHub https://github.com/ros-controls/gazebo_ros2_control/issues/173#issuecomment-1536332488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA24PYOD5FTAZXBCZFYH2ZDXEUD3DANCNFSM6AAAAAATXNDQAQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Wiktor-99 commented 11 months ago

Today I faced same issue. Adding this suffix implicitly it's not intuitive. I removed adding this suffix from plugin and then launched simulation, everything seems to work just fine (gazebo, rviz and moveit). Is it necessary?

If it is, some logs should be printed to make it more explicite.