|
Page 1 of 1
|
[ 2 posts ] |
|
Still having problems with Palm Island inconsistency
Author |
Message |
chris garrett
Rookie
Joined: Tue Jun 18, 2013 6:04 pm Posts: 30
|
 Still having problems with Palm Island inconsistency
Sometimes my program works and sometimes the same program steer the bot off on an angle after over or under turning. Same program different results. Some of my students who are not using the encoders but rather time and speed, are having the same problem.
[code][task main() {
nMotorEncoder[motorB] =0;
while(nMotorEncoder[motorB] < 1236) { motor[motorB] = 50; motor[motorC] = 50; }
motor[motorB] = 0; motor[motorC] = 0; wait1Msec(1000);
motor[motorB] = 50; motor[motorC] =-50; wait1Msec(980);
nMotorEncoder[motorB] =0;
while(nMotorEncoder[motorB] < 1400) { motor[motorB] = 50; motor[motorC] = 50; }
motor[motorB] = 0; motor[motorC] = 0; wait1Msec(2000);
motor[motorB] = -40; motor[motorC] = 40; wait1Msec(1440);
motor[motorB] = 0; motor[motorC] = 0; wait1Msec(2000);
nMotorEncoder[motorB] =0;
while(nMotorEncoder[motorB] < 3250) { motor[motorB] = 50; motor[motorC] = 50; }
motor[motorB] = 0; motor[motorC] = 0; wait1Msec(2000);
motor[motorB] = 50; motor[motorC] =-50; wait1Msec(960);
} /code]
|
Mon Oct 07, 2013 10:59 am |
|
 |
rcahoon
Site Admin
Joined: Tue Oct 09, 2012 10:34 am Posts: 192
|
 Re: Still having problems with Palm Island inconsistency
Time-based movements are less accurate than encoder-based movements, and dead-reckoning in general (whether using sensor feedback or not) is less accurate than navigating using features of the world, such as following a line. This is true in the real world, and we use a physics simulation in the virtual world to replicate the real world as closely as possible, including this phenomenon.
You can make your code more accurate by switching all your movements to use encoders. Also, whether using time- or encoder-based movements, you can generally achieve better accuracy by slowing down the motors, especially when turning.
Also, try resetting your robot to each checkpoint in Palm Island when you reach it. This will help you not have to deal with as much accumulated error.
_________________ Ryan Cahoon CMU Robotics Academy RVW Software Developer
Robot Potato Head; Virtual NXT
|
Wed Oct 09, 2013 11:18 am |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|