Robotics StackExchange | Archived questions

Markers: Sending Basic Shapes Tutorial (C++) needs updation

The tutorial (http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Basic%20Shapes) needs to update the following line -

  47     marker.header.frame_id = "/my_frame";

I think tf2 does not accept the '/' in the front of a frame name. I got the following error which indicates this -

invalid argument passed to cantransform argument source_frame in tf2 frame_ids cannot start with a '/' like:

Any directions on how to submit a PR would be appreciated. Thanks!

I'm using ROS Noetic.

Asked by Speedracer1702 on 2021-06-11 11:57:26 UTC

Comments

Answers

hello,

I just hit the same problem. Fortunately, changing "/my_frame" to "my_frame" resolves this issue.

Asked by WendaZ on 2022-02-14 12:33:05 UTC

Comments

This worked for me. Thanks a lot!

Asked by leekt on 2022-03-01 20:51:18 UTC