tf2 TF error: [, when looking up transform

asked 2021-02-18 11:35:09 -0500

ia gravatar image

I am getting a blank error when using TF2 for a command that otherwise works great for TF.

Per this answer, my rosbag needs a TF authority, so using TF I create a trivial transform with a period of 1 and rviz is able to display the pointcloud afterwards:

rosparam set /use_sim_time true
rosrun rviz rviz
rosbag play my.bag --loop --clock
rosrun tf static_transform_publisher 0 0 0 0 0 0 p multisense/left_camera_optical_frame 1

Migrating to TF2, this same command would be: shell rosrun tf2_ros static_transform_publisher 0 0 0 0 0 0 1 p multisense/left_camera_optical_frame

But when I set the rviz map to the same "p" from before when using TF, it complains this time:

For frame [multisense/left_camera_optical_frame]: No transform to fixed frame [p]. TF error: [, when looking up transform from frame [multisense/left_camera_optical_frame] to frame [p]]

Why does TF work but not tf2_ros in thi s case?

edit retag flag offensive close merge delete