Ask Your Question

rviz couldn't display laserscan data correctly

asked 2018-05-17 06:19:25 -0500

jintongxing gravatar image

I use gazebo as my simulation tool to generate data, and rviz to visualize the data, as I put camera or pointcloud into rviz it works well, but when it comes to laserscan it dosen't. I try to look into the information of the topic of laserscan, it tells me the topic was subscribed by rviz already, I don't know where the problem is? Furthermore, I use "rostopic echo /scan" to check out the data of the topic, then ranges are all -inf and intensities are all 1.0, was that normal? What should I do? Thank you in advance

edit retag flag offensive close merge delete


If all the range measurements of the laser scan are -inf then there are not valid measurements so there will be nothing to show in RVIZ. Is there anything blocking it's view in Gazebo or has it accidentally been placed inside an object?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-05-17 09:04:55 -0500 )edit

No, I tried to move the robot, it still has no response as the pointcloud and camera performs well....

jintongxing gravatar image jintongxing  ( 2018-05-17 09:09:05 -0500 )edit

What sensors do you actually have in Gazebo? Where is the point cloud coming from, and where is the laser scan coming from?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-05-17 09:11:18 -0500 )edit

I use xbot robot with camera and lidar, the point cloud subscribes the topic /camera/depth/image_raw and laser scan comes from /scan

jintongxing gravatar image jintongxing  ( 2018-05-17 21:55:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-18 04:54:25 -0500

Okay, if viewing the /scan topic using rostopic echo shows that all the range measurements are inf then there is no valid scan data. So RVIZ is doing exactly what it should do by showing nothing.

Something is not setup correctly in Gazebo in this case, do you see any lidar rays being shown in the Gazebo GUI? I recommend you to double check the setup of the lidar sensor and to check it's not inside any other geometry.

edit flag offensive delete link more


I think you are close to the real truth. Under the gazebo/world/model/xbot-u, I found "base_footprint""yaw_platform""pitch_platform"""left_wheel""right_wheel""base_to_yaw_platform""yaw_to_pitch_platform""left_wheel_hinge""right_wheel_hinge" only, then could you please tell me how can I check lidar?

jintongxing gravatar image jintongxing  ( 2018-05-18 10:28:31 -0500 )edit
jintongxing gravatar image jintongxing  ( 2018-05-18 21:59:02 -0500 )edit

Okay, now I have solved this problem by changing a file of my robot model, THANKS.

jintongxing gravatar image jintongxing  ( 2018-05-19 08:04:34 -0500 )edit

Glad you've got it working. Can you accept this answer if it helped you solve the problem, thanks.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-05-20 17:09:15 -0500 )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


Asked: 2018-05-17 06:19:25 -0500

Seen: 775 times

Last updated: May 18 '18