On Sat, 1 Feb 2003, Minh Tran wrote:
>
> According to the docs, scale is how many units per pixel. So I'm guessing it's
> 0.2 metres per pixel. Now some sample readings from the laser proxy is giving
> me huge values like 8000. I would like to know what this number means and how
> to convert it to pixel units and physical units.
Hi Minh,
As stated in the C++ Client Library Reference Manual (page 16), the LaserProxy
reports laser range values in millimeters and angular resolution in hundredths
of a degree (0.01 degree). Note that other client libraries may transform such
values into different units (e.g., I suspect that libplayerc converts to
meters and radians).
To convert from laser range and angle values to world pixel values, you just
need to do a standard polar->rectangular coordinate transformation, then scale
the result according to your simulation scale.
By the way, you'll see lots of ranges of 8000, because the maximum range of
the simulated laser is 8 meters (that's the max range for the physical SICK
LMS 200 laser rangefinder).
>
> Also when the robot position is specified as 10, 10. What units is this in??
>
The values given for 'unit_length' and 'unit_angle' are sticky, in that they
persist throughout parsing of the configuration file. So, if you specify
'unit_length' as 'm' and 'unit_angle' as 'degrees' (which are the defaults, by
the way), then give a robot (or any other) pose as [10.0 10.0 0.0], your robot
will be 10 meters up and 10 meters right of the origin, facing to the right
(we're using a standard right-handed coordinate system).
Note that changing the values for 'unit_length' or 'unit_angle' ONLY affect
how your configuration file is parsed. In particular, they have NO effect on
how data is passed between server and client or how data is reported by a
client library.
brian.
|