Problems with Accurate Navigation

Post your NXJ projects, project ideas, etc here!

Moderators: imaqine, 99jonathan, roger

JCK Robotics
New User
Posts: 1
Joined: Thu May 07, 2009 11:07 pm

Problems with Accurate Navigation

Postby JCK Robotics » Thu May 07, 2009 11:22 pm

Myself and a group are working with a NXT brick for a school project. We are having problems with getting accurate turns with the rotate() method in the Pilot class. It seems that we are getting inconsistant results with the actual degree of rotation that is ocurring. The rotation seems to be off usually by a couple degrees which makes a big difference after doing several turns. We have experimented with several numbers for the wheel diameter and track width but can't seem to get consistantly accurate rotation. Are there any known ways to improve the accuracy of the rotation?

New User
Posts: 11
Joined: Mon Apr 20, 2009 4:45 pm

Postby crawford » Fri May 08, 2009 9:57 pm

Trying to get both numbers at once is difficult.

Start by working on the wheel diameter. Measure it, then place the robot on a starting line and tell it to go ahead some relatively large distance in the units you used for the measurement. I used millimeters for wheel diameter, so told it to move ahead 1000 mm. Measure from the starting line to where the robot ends up. If it went farther than you expected, you need to INCREASE the wheel diameter; if it didn't go as far you need to DECREASE the wheel diameter.

(Why? If you go farther, the code thought it had to turn the wheels more times than necessary for the given distance; if you didn't go as far, it didn't turn the wheels enough times.)

Once you've got this to a tolerance you can live with, work on the track diameter. Again place the 'bot on a starting line and have it turn 90 degrees. You can compare the result with anything you trust to have a right angle. If the bot turned too far INCREASE the track width; if it didn't turn far enough, DECREASE the track width.

(Why? The track width is the radius of your turning circle. If you turn too far, the code calculated too small a turning circle; if you don't turn far enough, the turning circle was too large.)

It's easier to adjust these independently, and the direction of the adjustments can seem a bit counter-intuitive.

Return to “NXJ Projects”

Who is online

Users browsing this forum: No registered users and 1 guest