RViz receives lidar messages but does not display (not about size)
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.
rostopic echo
Please provide the output of
rosnode info /rviz...
(tab complete it) as well as a picture of the configuration of yourrviz
(especially the contents of the tabsfixed_frame
and yourLaserScan
). Or link to the respective*.rviz
config you are using...I edited @mgruhler. Also I found out source of the problem in this question is this laser thing.
@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 my lidar is RPLidar 360 and also I added rostopic echo to my question.
@metobom I don't see any output of
rostopic echo
...@mgruhler my bad I re-edited.
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 ?
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.But there are obatacles in my gazebo world. Why would they be NANs?
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!
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.
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...
i.e. the configuration and launch files...
Here is my launch file. And this is evarobot's urdf file. I hope you mentioned these @mgruhler.
And also this is evarobot_lidar.urdf.xacro file.
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...
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!