View unanswered posts | View active topics It is currently Wed Jul 30, 2014 10:44 am






Reply to topic  [ 2 posts ] 
Still having problems with Palm Island inconsistency 
Author Message
Rookie

Joined: Tue Jun 18, 2013 6:04 pm
Posts: 29
Post 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
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.