-
Notifications
You must be signed in to change notification settings - Fork 3
Drive Train
pkrinsky294 edited this page Oct 6, 2018
·
3 revisions
Movement is handled via the DriveTrain. Pacman is outfitted with a standard tank drive.
Robot.driveTrain.tankDrive(left, right);
use values: 1=forward, 0=stop, -1=reverse to control the movement
int getAngle()
will return the angle the tank drive is facing (0 is up, 90 right, -90 left, 180 down)
int getPositionX()
will return the current X coordinate
int getPositionY()
will return the current Y coordinate
double getDistance()
will return the cumulative distance the tank drive has moved
int Util.getDistance(x1, y1, x2, y2);
is a utility method that can be used to calculate the distance between two points.