Skip to content

Rover odometry frame names start with a slash (/odom, /base_footprint) #45

Description

@asimonov

The rover models configure the Gazebo odometry publisher with frame names that start with a slash:

<odom_frame>/odom</odom_frame>
<robot_base_frame>/base_footprint</robot_base_frame>

in models/lunar_pole_exploration_rover/urdf/lunar_pole_exploration_rover.gazebo and models/curiosity_path/urdf/curiosity_mars_rover.gazebo.

ROS 2 dropped the leading-slash convention: tf2 frame ids must not start with /. The odom_tf_publisher nodes in the demos copy the names straight from the odometry message into /tf, so what actually goes out is a /odom/base_footprint transform. Current tf2 strips the slashes on the way in (with a warning), which is the only reason ros2 run tf2_ros tf2_echo odom base_link still resolves; anything that compares frame ids as strings (e.g. nav_msgs/Odometry.header.frame_id against a frame_id parameter set to odom) mismatches.

The fix is to drop the slashes in both models. Nothing consumes the slashed names on purpose: the demos' odom_tf_publisher nodes copy whatever the message carries, and the demos READMEs refer to odom and base_footprint.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions