Rviz only showing 90 deg FOV
Hi, I am working with a mobile robot equipped with two Sick S300 scanners, which each have a 270 degree field of view. I managed to get the scanners working, and publishing the scans on the LaserScan topic fine.
However, when I add a LaserScan view to Rviz (which shows the robot model and sensor data from the ultrasonic sensors just fine), only a 90 degree field of view is shown.
I have tried to plot samples of each scanner topic in Matlab, and there I can see the full 270 degree FOV just fine, so the problem is not in the driver I'm using, nor is it in the publishing of the topics.
This is the plot in Matlab, the X is the position of the scanner, and the separate scanners are color coded.
I have indicated with the arrows the FOV of each scanner as shown in Rviz.
Sorry for the incredibly bad graphics.
Update:
I noticed a warning when loading Rviz:
File r300_draw.c function r300TryDrawPrims line 671
Rendering was 19 commands larger than predicted size. We might overflow command buffer.
After seeing this, I tried to remove the robot model (URDF with an STL mesh) from the Rviz config, and there was much more continuous display of the laser scan (another problem I had). Upon adding the robot model to the view again, the full scan, 270 deg, for both scanners is shown (but still with poor visualization of the data).
Is my STL file causing some sort of corruption, or is it perhaps too complex / has too many points?
The strange thing is that I have to remove and re-add the robot model to the Rviz view to see the complete scan.
Asked by mrath on 2012-01-03 00:17:28 UTC
Answers
Hi mrath, try checking the header data of your laserscan messages for errors regarding the angle_min, _max and _increment parameters. (rostopic echo /scan -n 1)
Maybe the driver is publishing incorrect bounding-values which prevent rviz from correctly rendering the points beyond the max_angle.
Asked by Ben_S on 2012-01-03 01:28:38 UTC
Comments
whoops, thought I could do it just fine here - but I guess you got the essentials. BTW see the updated question.
Asked by mrath on 2012-01-03 23:27:31 UTC
rostopic echo /laser_front -n 1 header: seq: 128 stamp: secs: 1325679248 nsecs: 230131156 frame_id: /sensor_laser-frontR_link angle_min: -2.35619449615 angle_max: 2.35619449615 angle_increment: 0.00895891431719 time_increment: 0.000190114064026 scan_time: 0.10000000149 range_min: 0.0
Asked by mrath on 2012-01-03 23:26:19 UTC
Could you post the complete header of one scan please?
Asked by Ben_S on 2012-01-03 23:16:53 UTC
Thank you for your answer. I double-checked, and the angle limits are correct.
Asked by mrath on 2012-01-03 23:15:57 UTC
Comments
so if you remove and re-add the model, the scan shows up correctly? can you post your model for reference?
Asked by hsu on 2012-01-16 07:45:30 UTC
It is merely a 90deg slice of the full 270 deg scan. Check updated question for additional info I just noticed now.
Asked by mrath on 2012-01-03 23:16:52 UTC
Have you tried a simulated laser scanner or played back a logfile with laser scans from another laser scanner? Do you see a undistorted 90 deg slice of the correct scan, or is the visualized 90 deg scan distorted (e.g. 270 deg cramped into 90 deg)? Have you closely checked angle_increment etc. ?
Asked by Stefan Kohlbrecher on 2012-01-03 01:24:31 UTC