0
$\begingroup$

Rosanswers logo

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


Originally posted by metobom on ROS Answers with karma: 27 on 2019-02-28

Post score: 1


Original comments

Comment by mgruhler on 2019-02-28:
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...

Comment by metobom on 2019-02-28:
I edited @mgruhler. Also I found out source of the problem in this question is this laser thing.

Comment by mgruhler on 2019-02-28:
@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?

Comment by metobom on 2019-03-01:
@mgruhler my lidar is RPLidar 360 and also I added rostopic echo to my question.

Comment by mgruhler on 2019-03-01:
@metobom I don't see any output of rostopic echo...

Comment by metobom on 2019-03-01:
@mgruhler my bad I re-edited.

Comment by Delb on 2019-03-01:
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 ?

Comment by PeteBlackerThe3rd on 2019-03-01:
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.

Comment by metobom on 2019-03-01:
But there are obatacles in my gazebo world. Why would they be NANs?

Comment by PeteBlackerThe3rd on 2019-03-01:
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!

Comment by PeteBlackerThe3rd on 2019-03-01:
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.

Comment by mgruhler on 2019-03-01:
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...

Comment by mgruhler on 2019-03-01:
i.e. the configuration and launch files...

Comment by metobom on 2019-03-01:
Here is my launch file. And this is evarobot's urdf file. I hope you mentioned these @mgruhler.

Comment by metobom on 2019-03-01:
And also this is evarobot_lidar.urdf.xacro file.

Comment by mgruhler on 2019-03-08:
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...

Comment by metobom on 2019-03-08:
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!

Comment by mgruhler on 2019-03-11:
@metobom would really be interesting to hear if this is the problem. Yes, please share any findings to help guide future readers with similar problems!

Comment by PeteBlackerThe3rd on 2019-03-11:
There is a chance the GPU laser sensor plugin for gazebo may be causing this problem, but I would have expected it to shutdown with an error if the GPU device could not be setup properly. If you could create a minimal example of this failure and post it to the developers that would be great.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by metobom with karma: 27 on 2019-03-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by mgruhler on 2019-03-13:
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 ...

Comment by Essam_Ky96 on 2020-06-18:
should i change my pc to run it ?? WT

Comment by metobom on 2020-06-18:
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.

Comment by lidarCheetah on 2021-04-08:
can anyone tell me how to extract numerical data (distance and angle) from the lidar

$\endgroup$

Your Answer

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