0
$\begingroup$

Rosanswers logo

Is it possible to visualize a topic of type sensor_msgs/LaserScan using rviz? Currently it complains about not having any frame (which is true, I just have the scan data)... Is there a better way?

Thanks in advance.


Originally posted by tommyo on ROS Answers with karma: 27 on 2013-04-03

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Which laserdriver are you using? Normally every sensor message has a frame attached. (You can find out this frame by using rostopic echo /scan -n 1 --noarr)

If no transforms are published, rviz will not show that frame as a possibility in the Fixed Frame dropdown-menu. But if you just type in the frame-name by hand, rviz should be able to visualize your laserscan.


Originally posted by Ben_S with karma: 2510 on 2013-04-03

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by tommyo on 2013-04-03:
I'm not sure what you're getting at, but i found this in the output: frame_id: '' The publishing node a bridge between another system and ROS so if something needs to be added I'm open to that. Thanks.

Comment by Ben_S on 2013-04-03:
Have you written this bridging node yourself? The header of the message should contain a valid frame name/id (for example laser, try setting laserscan_msg->header.frame_id) and a timestamp.

Comment by tommyo on 2013-04-03:
Sorry, I am kind of lost when it comes to visualization and the like. What is the simplest thing that could pass as a valid frame? At this point the scanner is just sitting on the desk with no odometry or maps available. Is it possible visualize the environment around a fixed scanner?

Comment by Ben_S on 2013-04-03:
Like i mentioned, laser would be a valid frame id. You can read this about the naming conventions for frames: http://www.ros.org/wiki/geometry/CoordinateFrameConventions#Naming

Comment by tommyo on 2013-04-03:
Now I get it, and it works fine. Thank you!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.