Skip to content

ROS 2 Migration: Bumper

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

Overview

This pages describes the changes in the bumper 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 (bumper_states)
  • tf_prefix is no longer supported.
  • The indexing in contact messages now start with 1 instead of 0.

SDF parameters

ROS 1 ROS 2
bumperTopicName <ros><remapping>bumper_states:=custom_topic</remapping></ros>
frameName frame_name
robotNamespace

Example Migration

ROS1

  <plugin name="plugin_name" filename="libgazebo_ros_bumper.so">
    <bumperTopicName>bumper_demo</bumperTopicName>
    <frameName>world</frameName>
  </plugin>

ROS2

  <!-- Update rate can be set in sensor directly -->
  <plugin name="plugin_name" filename="libgazebo_ros_bumper.so">
    <ros>
      <namespace>demo</namespace>
      <remapping>bumper_states:=bumper_demo</remapping>
    </ros>
    <frame_name>world</frame_name>
  </plugin>