Skip to content

ROS 2 Migration: Vacuum Gripper

Leander Stephen D'Souza edited this page Jun 26, 2022 · 3 revisions

Overview

This pages describes the changes in the vacuum gripper plugin in gazebo_plugins for ROS 2, including a migration guide.

Summary

  • All SDF parameters are now snake_cased
  • Use remapping argument to change default topic and service name(grasping and switch)
  • <max_distance> allows adjusting the range of the applied vacuum force
  • A list of entities can be specified which are required to be unaffected by the vacuum force using <fixed>. Multiple entities can be specified using <fixed> multiple times.

SDF parameters

ROS 1 ROS 2
bodyName link_name
topicName <ros><remapping>grasping:=custom_grasping</remapping></ros>
robotNamespace

Example Migration

ROS1

    <plugin name='vacuum_gripper' filename='libgazebo_ros_vacuum_gripper.so'>

      <!-- Add a namespace -->
      <robotNamespace>/demo</robotNamespace>

      <!-- Link associated with gripper -->
      <bodyName>link</bodyName>

      <!-- Publisher topic name -->
      <topicName>custom_grasping</topicName>

    </plugin>

ROS2

    <plugin name='vacuum_gripper' filename='libgazebo_ros_vacuum_gripper.so'>

      <ros>
        <!-- Add a namespace -->
        <namespace>/demo</namespace>

        <!-- Remap service name -->
        <remapping>switch:=custom_switch</remapping>

        <!-- Remap publisher topic name -->
        <remapping>grasping:=custom_grasping</remapping>
      </ros>

      <!-- Link associated with gripper -->
      <link_name>link</link_name>

      <!-- Max and min distance to attract entities -->
      <max_distance>10.0</max_distance>

      <!-- List of entities to be not attracted by the gripper -->
      <fixed>ground_plane</fixed>
      <fixed>wall</fixed>

    </plugin>