Wednesday, July 8, 2009

NXT sensors

The Mindsensors Infrared Range Sensor

The Mindsensors range sensor gives mm accurate readings to solid surfaces. This sensor (as I understand it) uses a triangulation principle by measuring the offset of the reflected light from the infrared transmitter. This is great, as the method is somewhat immune to the changes in reflectivity of the surface being measured and to changes in ambient light conditions. The sensor itself is of good quality, and easy enough to hook up using LEGO pieces to your robot, as are all the Mindsensors devices I've tried. The compass uses the usual Mindsensors I2C interface which is easy enough to use with plenty of examples.

The infrared transmitter in the sensor isn't a laser, so the beam isn't collimated - meaning that its not the narrow spear of light we associate with lasers, but more the spreading beam you get from a torchlight. This means that the triangulation calculation is based on the centroid of that beam, rather than a crisp point. The upshot of this method of using uncollimated light is that you get very accurate measurements when the full spot of light is reflected back to the sensor. As the beam falls of the edge of an object, the centroid becomes distorted and the measurement at the edge makes the object look further away than it really is. So if you scan across a cube, for instance, rather than picking up crisp edges, the cube will look like a trapeziod.

This is not a problem when the application is obstacle avoidance for example. In fact, it is even a desirable side effect that will help the robot be a little be more cautious in uncertain areas. If all you want is a good quality sensor to stop your robot from running into things, then this is the one for you.

For localisation, though, this otherwise very nice sensor is completely useless. The measurements in the update process of a particle filter need a mean distance with known noise. The gradual worsening of measurements around the edges of objects means that you can't model the noise, so you don't know if these are errors in readings or errors in localisation. The standard sonar sensor, for all its lack of accuracy and occasional weirdness has more easily modellable noise, which is why I ended up using it as my sensor of choice for NXT localisation.

The Mindsensors Compass

The Mindsensors compass reads the magnetic field apparently quite well, and provides a useful resource in areas where the magnetic field is well known in advance. The factory settings are good, and the calibration is fairly straightforward as well if you should feel the need. The compass uses the usual Mindsensors I2C interface which is easy enough to use with plenty of examples.

BUT - when I tried to add the sensor into my particle filter, I found the magnetic field in our concrete office building to be heavily distorted - out by as much as 120 degrees in places - which made the compass useless for localisation. If I mapped magnetic field, I could probably add it in, but there's no straightforward way to use it for localisation.

So, there is nothing wrong with the compass per se, but there are well known limitations with using the compass for navigation indoors. I advise a check with a hand compass in the area you intend to work with first before deciding whether this is the sensor for you.

This data can be found on http://www.itee.uq.edu.au/wyeth/NXT/

Time: 4.5 hrs

No comments:

Post a Comment