Multiple Arms with Vacuum Grippers Namespace Issue

asked 2021-01-24 06:16:06 -0500

geralt_ros_rivia gravatar image

I am trying to launch two UR5 arms in a Gazebo simulation. Each arm is equipped with 8 small vacuum grippers that are added using Gazebo's gazebo_ros_vacuum_gripper plugin. The problem I am facing is I am trying to associate each of the 8 vacuum grippers with a single namespace for the first arm (arm1 for example), and the 8 grippers of the second arm with another namespace (e.g. arm2). The robotNamespace tag of the plugin seems to override the group tags in the launch file. If the plugin has the following tags for each of the 8 grippers:

<robotNamespace>/ur5/vacuum_gripperX</robotNamespace>

where X corresponds to the gripper number, and I surround the URDF spawner in the launch file with a group tag ns="arm1", I would expect the following ros services:

   /arm1/ur5/vacuum_gripper1/off
    /arm1/ur5/vacuum_gripper1/on
    /arm1/ur5/vacuum_gripper2/off
    /arm1/ur5/vacuum_gripper2/on
    /arm1/ur5/vacuum_gripper3/off
    /arm1/ur5/vacuum_gripper3/on
    /arm1/ur5/vacuum_gripper4/off
    /arm1/ur5/vacuum_gripper4/on
    /arm1/ur5/vacuum_gripper5/off
    /arm1/ur5/vacuum_gripper5/on
    /arm1/ur5/vacuum_gripper6/off
    /arm1/ur5/vacuum_gripper6/on
    /arm1/ur5/vacuum_gripper7/off
    /arm1/ur5/vacuum_gripper7/on
    /arm1/ur5/vacuum_gripper8/off
    /arm1/ur5/vacuum_gripper8/on

but instead, I get the following:

/ur5/vacuum_gripper/off
/ur5/vacuum_gripper/on
/ur5/vacuum_gripper1/off
/ur5/vacuum_gripper1/on
/ur5/vacuum_gripper2/off
/ur5/vacuum_gripper2/on
/ur5/vacuum_gripper3/off
/ur5/vacuum_gripper3/on
/ur5/vacuum_gripper4/off
/ur5/vacuum_gripper4/on
/ur5/vacuum_gripper5/off
/ur5/vacuum_gripper5/on
/ur5/vacuum_gripper6/off
/ur5/vacuum_gripper6/on
/ur5/vacuum_gripper7/off
/ur5/vacuum_gripper7/on
/ur5/vacuum_gripper8/off
/ur5/vacuum_gripper8/on

and consequently, both arms will advertise the same service instead of them having their own namespace. Is there a workaround that can solve this issue? Can I perhaps retrieve the namespace of the group tags in the launch file from inside the urdf.xacro as a xacro:property and append it to the contents of the robotNamespace tag?

Thanks!

edit retag flag offensive close merge delete

Comments

Can you try by removing the leading '/' from the robot namespace? i.e., <robotnamespace>ur5/vacuum_gripperX</robotnamespace>

skros gravatar image skros  ( 2021-03-23 12:52:23 -0500 )edit