I have built the standard quick start robot in the Lego Mindstorms NXT 2.0 set and am having some trouble turning accurately.
If i tell it to do a turn with 90 degrees duration it doesn't actually turn 90 degrees.
I was wondering if someone could help explaining how to calculate the degrees duration to accurately turn a fixed number of degrees like 90, 180 etc
How to turn accurately?
Re: How to turn accurately?
Hi,
First of all, you'll have to accept never to get a perfect robot.
But then you should find out why it is not so good. Is it the motors, the wheels, the build, the speed?
And then you'll probably know the answer. If not, we're here to help.
Aswin
First of all, you'll have to accept never to get a perfect robot.
But then you should find out why it is not so good. Is it the motors, the wheels, the build, the speed?
And then you'll probably know the answer. If not, we're here to help.
Aswin
My blog: nxttime.wordpress.com
Re: How to turn accurately?
Sorry,
Forgot about the calculations. I assume a differential drive.
Forgot about the calculations. I assume a differential drive.
Code: Select all
// calculate the distance to drive for each wheel
// note that angle is in radians
// note that radius is the distance between wheel and center of the turn
// note that radius is different for each wheel (larger for outer wheel
Distance = angle * radius
My blog: nxttime.wordpress.com
Re: How to turn accurately?
Thanks for the replies.
What I meant is that in the default lego software i create a move block and tell it to move 90 degrees with the slider all the way to the right on the motor and it will move about 30 degrees and no where near 90 degrees.
So I dont mean that its slightly off and as i understand I might never get it perfectly 90 degrees, but the fact it is so wrong suggests either the software is broken, or more likely my understanding of how it works.
So I am just wondering when I enter 90 it does about 30.
Also I am going to switch to LeJos soon as I am a Java developer professionally and am wondering if it works more accurately with that than the default Lego software?
What I meant is that in the default lego software i create a move block and tell it to move 90 degrees with the slider all the way to the right on the motor and it will move about 30 degrees and no where near 90 degrees.
So I dont mean that its slightly off and as i understand I might never get it perfectly 90 degrees, but the fact it is so wrong suggests either the software is broken, or more likely my understanding of how it works.
So I am just wondering when I enter 90 it does about 30.
Also I am going to switch to LeJos soon as I am a Java developer professionally and am wondering if it works more accurately with that than the default Lego software?
Re: How to turn accurately?
The 'Move' block rotates the motor by 30 degrees, not the robot.
What the robot does depends on whether you have a differential fitted, the size of the tyres, distances between wheels, slipperiness of the wheel/ surface, etc.
This has already been covered in recent threads so I suggest that you have a look through the forums.
What the robot does depends on whether you have a differential fitted, the size of the tyres, distances between wheels, slipperiness of the wheel/ surface, etc.
This has already been covered in recent threads so I suggest that you have a look through the forums.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Re: How to turn accurately?
Thanks for the replies.
I did a search but only found 1 related post here https://sourceforge.net/apps/phpbb/mind ... ing#p12063
so I will continue the discussion in that existing thread.
I did a search but only found 1 related post here https://sourceforge.net/apps/phpbb/mind ... ing#p12063
so I will continue the discussion in that existing thread.
Who is online
Users browsing this forum: No registered users and 3 guests