Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Robot Not Turning While in Autonomous Mode (http://www.chiefdelphi.com/forums/showthread.php?t=112287)

M15onebillion 29-01-2013 02:15

Robot Not Turning While in Autonomous Mode
 
Hi, we are having problem with our Autonomous mode. Using the code below the robot seems to stop after going forward for 5 seconds, and does nothing afterwards.

public void autonomous() {
Chassidy.setSafetyEnabled(false);
Chassidy.drive(0.5, 0.0);
Timer.delay(5.0);
Chassidy.drive(0.0, 0.25);
Timer.delay(2.0);
Chassidy.drive(0.0, 0.0);
}


Does anyone know what is wrong with this code?
Much appreciated!

IisMathwizard 29-01-2013 11:30

Re: Robot Not Turning While in Autonomous Mode
 
You need to include some sort of forward component to the drive method to move it... for example..
Chassidy.drive(0.5, 1);
To turn in place. The first number is an output magnitude where as the second is a turning value.

M15onebillion 29-01-2013 15:37

Re: Robot Not Turning While in Autonomous Mode
 
Alright, Thank you!


All times are GMT -5. The time now is 10:09.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi