|
Page 1 of 1
|
[ 5 posts ] |
|
need help on my autonomous. robot wont stop at desire time.
| Author |
Message |
|
themigthy
Rookie
Joined: Wed Dec 21, 2011 4:22 pm Posts: 26
|
 need help on my autonomous. robot wont stop at desire time.
|
| Mon Sep 10, 2012 8:11 pm |
|
 |
|
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 380
|
 Re: need help on my autonomous. robot wont stop at desire ti
What specifically do you want the robot to do? I'm assuming move forward for two seconds, stop, then make a 90 degree turn, correct? I see move forward commands, I see 90 degree turn commands, but I don't see the motors being stopped at all. 
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our Wiki and our Forums.I just met you, And this is crazy, But here's my code now, So fix it, maybe? ~ Carly Rae Jepsen parody
|
| Tue Sep 11, 2012 2:59 pm |
|
 |
|
themigthy
Rookie
Joined: Wed Dec 21, 2011 4:22 pm Posts: 26
|
 Re: need help on my autonomous. robot wont stop at desire ti
No, I'm trying to make the robot move for 1/10 of a second, but the robot keeps on moving for 2 seconds.
|
| Tue Sep 11, 2012 7:35 pm |
|
 |
|
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 380
|
 Re: need help on my autonomous. robot wont stop at desire ti
My mistake, it was a typo. But the reasoning remains valid; the reason it is going for two seconds is because the motors are never told to stop. One thing to remember is that he wait command means 'keep doing what you were doing for x amount of time, and don't do anything else for the duration', NOT 'keep doing what you were doing for x amount of time, and don't do anything else for the duration, and then stop what you were doing".
Since the gyro calibration takes about 3 seconds to perform (which is the next command set after telling the robot to move forward), the robot will keep doing what it was previously doing for that time until it hits different motor commands (the 90 degree turn).
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our Wiki and our Forums.I just met you, And this is crazy, But here's my code now, So fix it, maybe? ~ Carly Rae Jepsen parody
|
| Wed Sep 12, 2012 9:16 am |
|
 |
|
themigthy
Rookie
Joined: Wed Dec 21, 2011 4:22 pm Posts: 26
|
 Re: need help on my autonomous. robot wont stop at desire ti
Thank you, this was extremely helpfull.
|
| Wed Sep 12, 2012 9:31 am |
|
|
|
Page 1 of 1
|
[ 5 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
|
|