RobotC: Autonomous Holonomic Platform using 4x Sonars

en.pdf24.org    Send article as PDF   
This Autonomous Tri-Drive Holonomic Platform is fitted with [rotacaster] and uses 4x Ultrasonic Sensors for navigation. The RobotC Code is based on my previous post on using multiple Sonar Sensors in RobotC. The main challenge is to use all 4 Ultrasonic Sensors without them interfering with each other, resulting in non-valid measurement readings for distance values to obstacles.

Tri-Holomonic Platform with Sonar Navigation
Autonomous Holonomic Platform using 4x Sonars for Navigation

If you wish to use Multiple Ultrasonic Sensors on your NXT Robot, you need to program them so only ONE Sensor is taking a measurement at any  given time. As  mentioned above, if you have all the Ultrasonic Sensors on at once they interfere with each other and give incorrect readings. To get around this you need to take advantage of the Sensors Mode 1: Single Shot Mode. Refer to the Lego Mindstorms NXT Hardware Developer Kit, Appendix 7: LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol for details. Consult the RobotC API for detailed information on using Digital I2C Command & Control with NXT Sensors.

[youtube]g_XPJzKI4Mc[/youtube] Autonomous Holonomic Platform using 4x Sonars for Navigation

The video above shows the Robot randomly moving around the walled area. The Robot is programmed to moves no closer to the Walls than 40cm. After each encounter, a random direction away from the corresponding wall/s is generated. The “#define THRESHOLD 40” statement in the code below, controls the minimum distance to wall value the Robot uses.

Third Party Driver Suite:
The standard RobotC comes with a lot of built in drivers for a wide variety of sensors. However, the standard RobotC doesn’t expose all of the functions that some of the sensors have available. To use the Sonar Sensor in ‘Single Shot Mode’ with RobotC, you will need a copy of Xander Soldaat’s ‘Third Party Driver Suite‘.

I also so suggest you download a copy of Xander Soldaat’s ‘RobotC Third Party Driver Suite Tutorial‘ which is an excellent resource. For more information relating to Xander Soldaat’s  ‘Third Party Driver Suite‘, visit his blog, ‘Bot Bench‘.

Download RobotC Source Code: TriHolonomicSonar.C

 

Need-More-Bricks

Previous Post

RobotC: Using Multiple Ultrasonic (Sonar) Sensors

When using Multiple Ultrasonic (Sonar) Sensors together, you need to configure the Sensors to use 'Single Shot Mode', so only ONE Sensor is taking a measurement at any time. If ... Read more

Next Post

LEGO Mindstorms NXT X-Y Plotter

I’ve have built my first LEGO Mindstorms NXT Plotter (printer) which is programmed with RobotC. The plotter draws pictures by drawing whole lines, known as vectors. An X–Y plotter is ... Read more

Short URL: http://tinyurl.com/h7y3ut4

Leave a Reply

Your email address will not be published. Required fields are marked *



Do NOT follow this link or you will be banned from the site!
error: Content is protected !!