Ask Your Question
1

RViz receives lidar messages but does not display (not about size)

asked 2019-02-28 04:34:39 -0600

metobom gravatar image

updated 2019-03-01 04:38:20 -0600

Hello I am trying to visualize LaserScan under /lidar topic in RViz. LaserScan receives messages but RViz does not visualize LaserScan. I already checked this question but I guess my problem is not same with it.

image description

rostopic echo

image description

edit retag flag offensive close merge delete

Comments

Please provide the output of rosnode info /rviz... (tab complete it) as well as a picture of the configuration of your rviz (especially the contents of the tabs fixed_frame and your LaserScan). Or link to the respective *.rviz config you are using...

mgruhler gravatar image mgruhler  ( 2019-02-28 04:53:58 -0600 )edit

I edited @mgruhler. Also I found out source of the problem in this question is this laser thing.

metobom gravatar image metobom  ( 2019-02-28 05:03:33 -0600 )edit

@metobom seems okay, so far.

Can you have a look at rostopic echo /lidar and see if there is any data in there? also, what kind of lidar do you have?

mgruhler gravatar image mgruhler  ( 2019-02-28 07:14:47 -0600 )edit

@mgruhler my lidar is RPLidar 360 and also I added rostopic echo to my question.

metobom gravatar image metobom  ( 2019-03-01 04:07:18 -0600 )edit

@metobom I don't see any output of rostopic echo...

mgruhler gravatar image mgruhler  ( 2019-03-01 04:27:07 -0600 )edit

@mgruhler my bad I re-edited.

metobom gravatar image metobom  ( 2019-03-01 04:38:56 -0600 )edit

In rviz, can you uncheck "Autocompute intensity Bounds" and then change the intensity min and max value to actually have Min intensity < Max intensity ? Also, (just to be sure) do you at least have obstacles closer than 5meters of your robot in your Gazebo world ?

Delb gravatar image Delb  ( 2019-03-01 05:29:47 -0600 )edit
2

The output of rostopic echo you've shown only contains NANs for the range values. If all the values in the laser_scan message are NAN then there is nothing for RVIZ to show so this would be normal.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-03-01 05:47:20 -0600 )edit

But there are obatacles in my gazebo world. Why would they be NANs?

metobom gravatar image metobom  ( 2019-03-01 05:54:19 -0600 )edit
2

The why I can't answer without more information. But the screen shot you show only contains -inf values, there is no actual finite data there!

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-03-01 06:04:33 -0600 )edit
2

If all of the values in the laser_scan message are -inf it's most likely that you've placed the simulated lidar inside a solid object in gazebo. This means that it's reading 100% values closer than it's minimum sensing distance, so no valid readings are produced.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-03-01 06:10:50 -0600 )edit

I second @PeteBlackerThe3rd the problem you face both here and in your other question is that there is no valid laser data. I have to remember to keep asking earlier about simulation vs real hardware, though :-) RPLidar 360 is real, not sim...

@metobom Please share how you spawn your simulation...

mgruhler gravatar image mgruhler  ( 2019-03-01 06:12:05 -0600 )edit

i.e. the configuration and launch files...

mgruhler gravatar image mgruhler  ( 2019-03-01 06:12:33 -0600 )edit

Here is my launch file. And this is evarobot's urdf file. I hope you mentioned these @mgruhler.

metobom gravatar image metobom  ( 2019-03-01 11:05:39 -0600 )edit

And also this is evarobot_lidar.urdf.xacro file.

metobom gravatar image metobom  ( 2019-03-01 11:13:17 -0600 )edit

By only looking at the respective files, I don't really see an issue. I don't have the cycles to go into a deeper debugging here. I'd recommend to post an issue about this on the respective GitHub pages. But seeing that the last commit there has been about three years ago, I guess this is to no avail...

I'd suggest to not focus on SLAM now (i.e. #q316624 and #q316148 and maybe even #q315285) but try to get the issue with the LiDAR resolved. I'd suggest to start by commenting out the different visual blocks in the urdfs as well as the collision blocks and start with a plain lidar to actually see this is providing meaningful results on the respective topics. Then work your way back to an actually working simulation...

mgruhler gravatar image mgruhler  ( 2019-03-08 00:49:19 -0600 )edit

I guess I figured what is the problem. I use a laptop and Ubuntu does not using my Nvidia graphic card GTX 1060. It uses Intel® HD Graphics Coffeelake 3x8 GT2. (I installed Nvidia drives but don't know why Ubuntu did not recognise nvidia card.) I think because of that lidar does not work properly. I will try to handle graphic card issue again or I will try to find another pc and try everything on that. I will share results here. Thanks everyone for comments!

metobom gravatar image metobom  ( 2019-03-08 16:57:06 -0600 )edit

1 Answer

Sort by ┬╗ oldest newest most voted
0

answered 2019-03-12 17:11:14 -0600

metobom gravatar image

updated 2019-03-12 17:11:53 -0600

So I tested whole thing in another computer which works with Nvidia card. I did exact same setup, hector_mapping and lidar worked just fine. In short source of the problem was the graphic card. Thanks for everyone for comments :D. I will link this question to my other related questions. image description

edit flag offensive delete link more

Comments

happy to see this fixed! So in essence, it was an incompatibilty caused by using the gazebo_ros_gpu_laser plugin with an incompatible graphics card...

Did you post this upstream to the developers? If so, it makes sense to link against the respective issue here ...

mgruhler gravatar image mgruhler  ( 2019-03-13 01:39:03 -0600 )edit

should i change my pc to run it ?? WT

Essam_Ky96 gravatar image Essam_Ky96  ( 2020-06-18 01:45:43 -0600 )edit

Intel GPU works too. When I get this error my Ubuntu setup was wrong and there was no Nvidia or Intel GPU seen by Ubuntu.

metobom gravatar image metobom  ( 2020-06-18 02:43:40 -0600 )edit

can anyone tell me how to extract numerical data (distance and angle) from the lidar

lidarCheetah gravatar image lidarCheetah  ( 2021-04-08 03:43: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

2 followers

Stats

Asked: 2019-02-28 04:34:39 -0600

Seen: 1,003 times

Last updated: Mar 12 '19