RVIZ can not visualize lidar data (tf2 frame_ids cannot start with a '/' like)
I'm trying to visualize lidar point cloud recorded in bag file. I use ros noetic for this.
I play the bag file:
rosbag play -l /home/test2.bag
and open rviz to visualize.
I get the follow error (unfortunately I can not upload the file as I'm new and not have at least 5 points):
I have Fixed Frame map
and
Global Status: Warn
Fixed Frame NO TF data and
For frame [/rslidar]: Fixed Frame [map] does not exist
I found the same issue at stack overflow and on this forum: https://stackoverflow.com/questions/5... https://answers.ros.org/question/1959...
There are 2 solutions the first is to set Fixed Frame to /rslidar and the other is to set up a publisher that tells rviz where to put the fixed world frame stmth like this:
rosrun tf static_transform_publisher 0 0 0 0 0 0 map rslidar 50
I tried both but solutions and they don't work. When I tried to change Fixed Frame to /rslidar the slash can not be wrote and as a result only rslidar is written in Fixed Frame
and the error is the next:
Failed to transform from frame [/rslidfar] to frame [rslidar]
If I set up publisher via tf static_transform_publisher the error is:
For frame [/rslidar]: Fixed Frame [map] does not exist
And in rviz log there is the warning:
As I understand the slash is not allowable as argument. How can I change name to display point cloud?