ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Rviz receives LaserScan messages but doesn't display them

asked 2018-05-14 11:28:53 -0500

erenaud gravatar image

Hi there

I made a dummy package that is publishing fake laser scan messages (following this code: ).

I use this command to launch my package:

roslaunch beginner_tutorials fakeLaserScan.launch

Then, I try to display it with:

rosrun rviz rviz

Finally, I use this command in order to avoid fixed-frame related errors,:

rosrun tf static_transform_publisher 0 0 0 0 0 0 1 map fake_laser_frame 10

I set global_frame as "fake_laser_frame" and I add the topic /fakeScan (type LaserScan). Everything seems to work great, only green checks and I can see the number of receives messages increase. But I don't see my laser scan displayed ! I tried with a kinect and package "laserscan_kinect", it works.

What am I missing ?

More info: What I'm trying to do : for the moment, juste learning really. My final is goal to use a Lidar Lite v3 to generate Laser Scan messages.

My code:

Screenshot: (I tried, but not enough reputation).

edit retag flag offensive close merge delete


For debugging, maybe you can try and see output of rostopic echo /fakeScan to check what values are actually being published.

aarushg gravatar image aarushg  ( 2018-05-15 00:45:22 -0500 )edit

Hi Erenaud, I prepared a video explaining what could be your problem, but you figured it out before I published. Anyway, here it is just in case it helps you understand some basic ROS concepts. video answer

R. Tellez gravatar image R. Tellez  ( 2018-05-16 05:36:46 -0500 )edit

Wow, you did a great job here ! Thank you for your help ! Don't worry, I'm pretty sure it will help others :)

erenaud gravatar image erenaud  ( 2018-05-16 07:09:37 -0500 )edit

After a short time count> 100, but "range_max = 100". And rviz not show it data. You must restart the node, after the configured rviz and can seet data shot time. Or set big limat for range_max or set limit for ranges [i] and intensities [i] less then range_max.

iBuilder gravatar image iBuilder  ( 2018-08-27 09:58:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-05-15 07:28:24 -0500

erenaud gravatar image

Okay, I don't know if it's because I restarted my computer or my eyes were too tired yesterday, but my code is in deed working ! The contrast between background and Laser Scan point is very poor but everything is well displayed.

edit flag offensive delete link more

Question Tools



Asked: 2018-05-14 11:28:53 -0500

Seen: 4,084 times

Last updated: Aug 19 '18