I was following the ROS official documentation on how to publish a point cloud and I was able to successfully run the code. Now I'm trying to visualize the point cloud using ROS RVIZ but I'm getting an error.
Transform [sender=unknown_publisher] For frame [single_frame]: Fixed Frame [map] does not exist
How can I overcome this error? It says the frame does not exist. Is there a workaround or a configuration setting in RVIZ to bypass the error? Or how can I update my c++ code to update the frame object? Can you please provide me with some example code?
rviz is missing the transformation from its given Fixed Frame
(i.e. map
) to the frame of your point cloud data (i.e. base_link
).
If you are working with ROS by means of measurement data, kinematics and dynamics, I highly recommend the tf-tutorials on that.
However, there are two options two fix your issue:
1.
You can create a publisher which tells rviz how to transform the base_link
frame into the map
frame by typing the following command into your command line:
rosrun tf static_transform_publisher 0 0 0 0 0 0 map base_link 50
This command, explanation here, publishes the information that both frames coinside, with 50 Hz.
2. Another option is to tell rviz that its fixed frame should be base_link
. So just alter map
to base_link
as proposed in the image below.