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

laser data is not avliable on rviz2 . but i am geting data while using terminal cmd topic echo.

asked 2023-01-31 05:20:47 -0600

fire gravatar image

i was testing LDS-01 lidar with example code from the driver. i am getting data while using terminal cmd topic echo. But laser data is not available on rviz2 .i am using ros2 humble .

website :


ROS index

git hub link

image link

i had complied git hub the code after putting it in "ros2_ws/src"(image 1 and image 2 from image link specified above)

ls /dev/ttyUSB*


sudo chmod 777 /dev/ttyUSB0
ros2 launch hls_lfcd_lds_driver

in another terminal :

 ros2 topic list




ros2 topic echo /scan --once

header: stamp: sec: 1675073473 nanosec: 112333930 frame_id: laser angle_min: 0.0 angle_max: 6.2657318115234375 angle_increment: 0.01745329238474369 time_increment: 0.0005592841189354658 scan_time: 0.20134228467941284 range_min: 0.11999999731779099 range_max: 3.5 ranges: - 0.13099999725818634 - 0.12999999523162842 - 0.12999999523162842 - 0.1289999932050705 - 0.1289999932050705 - 0.1289999932050705 - 0.1289999932050705 - 0.1289999932050705 ................


(image 3 ,image 4 and image 5 from image link specified above)

i found 2 problem :

1)Fixed Frame No tf data. Actual error: Frame [map] does not exist

2)Points Showing [0] points from [0] messages

helpfull links i refered :

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-05-16 12:11:43 -0600

ShyamGanatra gravatar image

updated 2023-05-16 12:12:11 -0600

I was also facing the same issue and then figured out that I need to make some changes in the configuration of Rviz2, you need to change the global frame of the Rviz to laser and then change the Reliability Policy of Qos to Best Effort, check the settings in the attached image below this worked for me and after making these changes I was able to get the laser scan data on RViz2


edit flag offensive delete link more

Question Tools


Asked: 2023-01-31 05:20:47 -0600

Seen: 167 times

Last updated: May 16