Rosanswers logo

Hi there

I made a dummy package that is publishing fake laser scan messages (following this code: http://wiki.ros.org/navigation/Tutorials/RobotSetup/Sensors#Writing_Code_to_Publish_a_LaserScan_Message ).

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: https://github.com/erenaud3/fakeLaserScan

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

Originally posted by erenaud on ROS Answers with karma: 28 on 2018-05-14

Post score: 0

Original comments

Comment by aarushg on 2018-05-15:
For debugging, maybe you can try and see output of rostopic echo /fakeScan to check what values are actually being published.

Comment by R. Tellez on 2018-05-16:
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

Comment by erenaud on 2018-05-16:
Wow, you did a great job here ! Thank you for your help ! Don't worry, I'm pretty sure it will help others :)

Comment by iBuilder on 2018-08-27:
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.


1 Answer 1


Rosanswers logo

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.

Originally posted by erenaud with karma: 28 on 2018-05-15

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

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