How to add multiple HWSim instances in gazebo?

asked 2023-07-29 03:56:55 -0500

I am simulating a franka panda arm mounted with shadowhand in Gazebo.

However, exsiting controllers of panda and shadowhand require different groups of hardware interfaces (or HWSim in Gazebo language). Currently I try to add the FrankaHWSim in franka_gazebo package and the SrGazeboHWSim in sr_gazebo_sim package at the same time. My approach is through adding two <plugin> labels as follows:

    <plugin name="gazebo_ros_control" filename="">
    <plugin name="gazebo_ros_control" filename="">

As above, is loaded twice with different robot_description from the parameter server. However, the custom hardware interfaces in franka_gazebo/FrankaHWSim is never loaded. I find that the order of plugins matters. That is to say, the hardware interfaces in the first <plugin> tag could always be loaded successfully.

What's wrong with my implementation? Should I integrate the source codes of sr_gazebo_sim/SrGazeboHWSim and franka_gazebo/FrankaHWSim together to get a combined HWSim.

Thanks very much!

edit retag flag offensive close merge delete