Gazebo | Ignition | Community
Ask Your Question

unexpected results from laser sensors

asked 2013-03-19 06:32:09 -0500

SImone gravatar image

updated 2013-03-26 09:50:15 -0500


I've configured my robot with two inclined laser scanner, then I've wrote some plugin to record laser data and ground truth pose of the robot. I've tried a very simple environment with only the z=0.

I notice that taking the data acquired by sensor, converting them from polar to cartesian and composing with the robot pose, the reconstructed plane is slightly different from the z=0 plane: the minimum height of the point cloud is about 0.002m (~2mm), while the maximum height is about 0.015mm (~1.5cm).

The curious thing is that height is maximum with laser beam acquired at small angles, while decrease with lateral angles. I was expecting that, since there is no noise addition, all the points should be exactly at z=0.

Why this does not happens? Is it related to the ray tracing process performed in the simulation? It depends on the surface of the objects?

edit retag flag offensive close merge delete


Can you please post the SDF used to create the laser and robot?

nkoenig gravatar imagenkoenig ( 2013-03-19 11:55:59 -0500 )edit

here there is the model, sorry for the late in the answer. I've commented out all my plugins invocation, they do not perform anything more than logging data.

SImone gravatar imageSImone ( 2013-03-25 10:39:18 -0500 )edit

I've created a very simple sdf model, with only a laser scanner and some wall as references. I've packed in this file both the model, the world and the results of the scans plotted with an octave script: The problem is still present: ranges does not correspond to a line, but have a bell shaped curve. In the packed file you can find a readme.txt file that explain all the details.

SImone gravatar imageSImone ( 2013-03-28 09:38:34 -0500 )edit

any news on this topic?

SImone gravatar imageSImone ( 2013-04-03 10:19:32 -0500 )edit

what version of gazebo are you running? There was a known bug that got resolved by pull request #351 in the default branch.

hsu gravatar imagehsu ( 2013-04-03 11:30:42 -0500 )edit

no, this is not my the case for two reasons: 1) the bug you refer was noticed by me 2) the errors are in the ray length, as clearly demostrated with the second experiment I've posted, where measurement are expressed in laser reference frame and not in world reference frame

SImone gravatar imageSImone ( 2013-04-04 02:22:05 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-05-08 02:14:21 -0500

SImone gravatar image

This was solved since version 1.6.3 (see change log

edit flag offensive delete link more

answered 2013-04-08 15:42:38 -0500

nkoenig gravatar image

Are you taking into account the minimum range value of 0.08m when processing your data?

edit flag offensive delete link more


This is not the case of the simple test I've conducted: walls are quite far from the sensor, the minimum measure is 2.91 m. However, I've tried to change both resolution and minimum range parameters without any difference. This seems to be a problem related to ray tracing, because measured values change with beam angle.

SImone gravatar imageSImone ( 2013-04-09 05:23:21 -0500 )edit

I am wondering if this could also lead to the problem that I have with the Generated point cloud namely results in severe curves the largest the pitch and yaw angles become from 0:

dejanpan gravatar imagedejanpan ( 2013-04-12 02:17:49 -0500 )edit

Link to the screenshot again:

dejanpan gravatar imagedejanpan ( 2013-04-12 02:18:36 -0500 )edit

It seems exactly the same problem!

SImone gravatar imageSImone ( 2013-04-12 06:52:49 -0500 )edit

@SImone: have you meanwhile been able to get more intuition where the bug could be in? I went into and printed out the contact points and the directions and they kinda made sense. But I guess that we probably have some rounding or type casting error somewhere..

dejanpan gravatar imagedejanpan ( 2013-04-12 12:21:38 -0500 )edit

Are you using the latest version of Gazebo?

nkoenig gravatar imagenkoenig ( 2013-04-24 16:59:06 -0500 )edit

I was not using the latest version, now I've upgraded to the repo version and it seems to be fixed. @dejanpan: the problem seems to be fixed in version 1.6.3 (

SImone gravatar imageSImone ( 2013-05-07 03:12:53 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2013-03-19 06:32:09 -0500

Seen: 371 times

Last updated: May 08 '13