|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.geom.Path2D
java.awt.geom.Path2D.Double
LineFollowerSimulator.Robot
public class Robot
Model of a line following robot.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Path2D |
|---|
java.awt.geom.Path2D.Double, java.awt.geom.Path2D.Float |
| Field Summary | |
|---|---|
protected double |
angle
Rotation of the robot, in radians |
LineFollowerSimulator.Sensor |
lineSensor
Line sensor of the robot |
protected LineFollowerSimulator.MotorController |
motorController
Motor controller of the robot |
PIDregulator |
regulator
PID regulator of the robot |
protected double |
x
X coordinate of the robot's centre of rotation |
protected double |
y
Y coordinate of the robot's centre of rotation |
| Fields inherited from class java.awt.geom.Path2D |
|---|
WIND_EVEN_ODD, WIND_NON_ZERO |
| Constructor Summary | |
|---|---|
Robot(double x,
double y,
double angle,
java.awt.geom.GeneralPath path)
Initializes robot startup position |
|
| Method Summary | |
|---|---|
void |
Move()
The simulation of robot movement is done step by step. |
void |
ResetPosition()
Reset robots coordinates and angle to the startup position |
void |
setWheelGauge(double gauge)
Sets the distance between robot wheels |
| Methods inherited from class java.awt.geom.Path2D.Double |
|---|
append, clone, curveTo, getBounds2D, getPathIterator, lineTo, moveTo, quadTo, transform |
| Methods inherited from class java.awt.geom.Path2D |
|---|
append, closePath, contains, contains, contains, contains, contains, contains, contains, contains, createTransformedShape, getBounds, getCurrentPoint, getPathIterator, getWindingRule, intersects, intersects, intersects, intersects, reset, setWindingRule |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected volatile double angle
protected volatile double x
protected volatile double y
protected LineFollowerSimulator.MotorController motorController
public LineFollowerSimulator.Sensor lineSensor
public PIDregulator regulator
| Constructor Detail |
|---|
public Robot(double x,
double y,
double angle,
java.awt.geom.GeneralPath path)
x - coordinatey - coordinateangle - orientationpath - bezier path to follow| Method Detail |
|---|
public final void ResetPosition()
public final void setWheelGauge(double gauge)
gauge - distance in pixelspublic void Move()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||