|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaclient2.extra.Controller
javaclient2.extra.PIDController
javaclient2.extra.PositionControl
public class PositionControl
Position control interface for Position, Position2D and Position3D Player interfaces. Uses methods from both player interfaces and PIDController.
| Field Summary |
|---|
| Fields inherited from class javaclient2.extra.PIDController |
|---|
kd, ki, kp |
| Fields inherited from class javaclient2.extra.Controller |
|---|
currE, eSum, goal, lastE |
| Constructor Summary | |
|---|---|
PositionControl(AbstractPositionDevice pd)
Constructor for PositionControl. |
|
PositionControl(AbstractPositionDevice pd,
int minC,
int maxC)
Constructor for PositionControl. |
|
PositionControl(AbstractPositionDevice pd,
int kp,
int ki,
int kd)
Constructor for PositionControl. |
|
PositionControl(AbstractPositionDevice pd,
int minC,
int maxC,
int kp,
int ki,
int kd)
Constructor for PositionControl. |
|
| Method Summary | |
|---|---|
java.awt.Point |
getRobotPosition()
Get the current robot position as a Point (AWT). |
boolean |
moveRobot(int distance)
Move the robot for a given distance to a new destination. |
void |
setAllowedError(int err)
Set the maximum allowed error between the final goal and the current position. |
void |
setMaximumCommand(int maxC)
Set the maximum admissible command for the robot's motors. |
void |
setMinimumCommand(int minC)
Set the minimum admissible command for the robot's motors. |
void |
stopRobot()
Stop the robot from moving. |
| Methods inherited from class javaclient2.extra.PIDController |
|---|
getCommand, getKd, getKi, getKp, setKd, setKi, setKp |
| Methods inherited from class javaclient2.extra.Controller |
|---|
deltaE, setGoal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PositionControl(AbstractPositionDevice pd)
pd - a reference to a PlayerDevice interface (Position, Position2D
or Position3D).
public PositionControl(AbstractPositionDevice pd,
int kp,
int ki,
int kd)
pd - a reference to a PlayerDevice interface (Position, Position2D
or Position3D).kp - the proportional constantki - the integral constantkd - the derivative constant
public PositionControl(AbstractPositionDevice pd,
int minC,
int maxC)
pd - a reference to a PlayerDevice interface (Position, Position2D
or Position3D).minC - minimum admissible command for the robot's motorsmaxC - maximum admissible command for the robot's motors
public PositionControl(AbstractPositionDevice pd,
int minC,
int maxC,
int kp,
int ki,
int kd)
pd - a reference to a PlayerDevice interface (Position, Position2D
or Position3D).minC - minimum admissible command for the robot's motorsmaxC - maximum admissible command for the robot's motorskp - the proportional constantki - the integral constantkd - the derivative constant| Method Detail |
|---|
public void setMinimumCommand(int minC)
minC - minimum admissible command as an integerpublic void setMaximumCommand(int maxC)
maxC - maximum admissible command as an integerpublic void setAllowedError(int err)
err - maximum allowed error as an integerpublic void stopRobot()
public java.awt.Point getRobotPosition()
public boolean moveRobot(int distance)
distance - the desired distance
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||