public class UgvControllers extends ControllerGroup
Modifier and Type | Field and Description |
---|---|
static int |
LOITERCONTROL |
LoiterController |
loiterController |
static int |
OPENLOOPCONTROL |
OpenLoopController |
openLoopController |
static int |
WAYPOINTCONTROL |
WaypointController |
waypointController |
Constructor and Description |
---|
UgvControllers(UgvExecution execution)
Creates a new UgvControllers object
|
Modifier and Type | Method and Description |
---|---|
void |
computeControls() |
int |
getCurrentControlMode() |
VehicleController |
getCurrentManeuveringController()
Provide current primary controller for maneuvering forward/backward/laterally.
|
double |
getLeftTrackSpeed()
Returns commanded left track speed
|
double |
getPsi()
Returns commanded heading
|
double |
getRightTrackSpeed()
Returns commanded left track speed
|
double |
getSpeed()
Returns commanded speed
|
boolean |
isClosedLoopSpeed()
Returns true if closed loop speed is commanded
|
void |
setClosedLoopSpeed(double newSpeed)
Resets the closed loop speed command for all of the controllers
|
void |
setCommandedHeading(double newPsi)
Resets the open loop speed command for all of the controllers
|
void |
setControls() |
void |
setCorrectToTrack(boolean setting)
Sets the waypoint controller and loiter controller to correct to track (or not)
|
void |
setCurrentControlMode(int newMode) |
void |
setCurrentManeuveringController(ControllerType typ)
Set the current primary controller for maneuvering forward/backward/laterally.
|
void |
setNewWaypoint()
Sets the waypoint controller and loiter controller to correct to track (or not)
|
void |
setOpenLoopTrackSpeed(double newLeftSpeed,
double newRightSpeed)
Resets the open loop speed command for all of the controllers
|
void |
setPsiCommand(double newPsi)
Resets the commanded heading
|
void |
setTrackSpeed(double newSpeed)
Resets the open loop speed command for all of the controllers
|
iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public WaypointController waypointController
public OpenLoopController openLoopController
public LoiterController loiterController
public static final int WAYPOINTCONTROL
public static final int OPENLOOPCONTROL
public static final int LOITERCONTROL
public UgvControllers(UgvExecution execution)
execution
- reference to the vehicle to whom the controllers belongpublic VehicleController getCurrentManeuveringController()
ControllerGroup
getCurrentManeuveringController
in class ControllerGroup
public void computeControls()
public void setControls()
public void setCurrentManeuveringController(ControllerType typ)
ControllerGroup
setCurrentManeuveringController
in class ControllerGroup
public int getCurrentControlMode()
public void setCurrentControlMode(int newMode)
public void setPsiCommand(double newPsi)
newPsi
- public void setClosedLoopSpeed(double newSpeed)
newSpeed
- public void setTrackSpeed(double newSpeed)
newSpeed
- speed to be used for both trackspublic boolean isClosedLoopSpeed()
public double getSpeed()
public double getPsi()
public double getLeftTrackSpeed()
public double getRightTrackSpeed()
public void setOpenLoopTrackSpeed(double newLeftSpeed, double newRightSpeed)
newLeftSpeed
- speed to be used for the left tracknewRightSpeed
- speed to be used for the right trackpublic void setCommandedHeading(double newPsi)
newPsi
- new heading to maintain (degrees)public void setCorrectToTrack(boolean setting)
setting
- public void setNewWaypoint()