How to add multiple HWSim instances in gazebo?
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 srgazebosim package at the same time. My approach is through adding two
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotParam>/mountedhand_only_description</robotParam>
<robotSimType>sr_gazebo_sim/SrGazeboHWSim</robotSimType>
</plugin>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<controlPeriod>0.001</controlPeriod>
<robotParam>/panda_only_description</robotParam>
<robotSimType>franka_gazebo/FrankaHWSim</robotSimType>
</plugin>
</gazebo>
As above, libgazeboroscontrol.so is loaded twice with different robotdescription from the parameter server. However, the custom hardware interfaces in frankagazebo/FrankaHWSim is never loaded. I find that the order of plugins matters. That is to say, the hardware interfaces in the first
What's wrong with my implementation? Should I integrate the source codes of srgazebosim/SrGazeboHWSim and franka_gazebo/FrankaHWSim together to get a combined HWSim.
Thanks very much!
Asked by jiangyp19 on 2023-07-29 03:56:55 UTC
Comments