Ask Your Question
1

Visualize laserscan usig rviz

asked 2013-04-03 05:02:12 -0600

tommyo gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-03 05:13:29 -0600

Ben_S gravatar image

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.

edit flag offensive delete link more

Comments

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.

tommyo gravatar imagetommyo ( 2013-04-03 05:24:17 -0600 )edit

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.

Ben_S gravatar imageBen_S ( 2013-04-03 05:39:41 -0600 )edit

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?

tommyo gravatar imagetommyo ( 2013-04-03 06:00:05 -0600 )edit

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

Ben_S gravatar imageBen_S ( 2013-04-03 06:06:20 -0600 )edit
1

Now I get it, and it works fine. Thank you!

tommyo gravatar imagetommyo ( 2013-04-03 08:29:56 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-04-03 05:02:12 -0600

Seen: 2,743 times

Last updated: Apr 03 '13