public abstract class UgvController extends VehicleController
| Modifier and Type | Field and Description | 
|---|---|
| protected double | alongTrackRangealong track range remaining to reach goal point | 
| protected boolean | closedLoopSpeedset to true if speed is commanded as MPS or knots (false means trackSpeed is directly controlled) | 
| protected double | commandedSpeedCommanded speed in MPS (if closed-loop speed is specified) | 
| protected boolean | controlledPsitrue if heading is automatically controlled | 
| protected boolean | correctToTrackset to true if waypoint will follow a specified track to the waypoint (false is continuous to) | 
| protected double | crossTrackErrorlateral displacement from a commanded track | 
| protected double | leftTrackCommandcommanded speed of the left track in meters per second | 
| protected double | maxTrackDifUsed to make sure the track commands don't cause too high a turn rate | 
| protected double | offTrackAngleDegreesangle computed from arc tangent of alongTrackRange and crossTrackError | 
| protected double | psiCommandcommanded heading -- may or may not be relevant for individual inheriting control modes | 
| protected double | rightTrackCommandcommanded speed of the right track in meters per second | 
| protected UgvExecution | ugvExecutionreference to main class of this ugv | 
| Constructor and Description | 
|---|
| UgvController(UgvExecution execution)Creates a new instance of Controller | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | computeControls()computes ugvExecution controls based on type of controller and current state/command | 
| protected void | computeControls(double psiError)Used by all of the controllers to compute left and right track settings
 when heading is being controlled explicitly | 
| void | setControls()uses the computed control settings to actually set the vehicle's controls | 
| void | setOpenLoopPsi()Sets a new open-loop heading | 
| void | setPsiCommand(double newPsi)Sets a new closed-loop heading | 
| void | setSpeed(double newSpeed)Sets a new closed-loop speed | 
| void | setTrackSpeed(double newSpeed)Sets a new open-loop track speed | 
| void | setTrackSpeed(double newLeftTrackSpeed,
             double newRightTrackSpeed)Sets a new open-loop track speed | 
| protected void | updateCrossTrackError()Determines how far left or right of intended track the vehicle is and
 modifies the heading command accordingly | 
protected UgvExecution ugvExecution
protected double leftTrackCommand
protected double rightTrackCommand
protected boolean controlledPsi
protected double psiCommand
protected double crossTrackError
protected double alongTrackRange
protected double offTrackAngleDegrees
protected boolean correctToTrack
protected boolean closedLoopSpeed
protected double commandedSpeed
protected double maxTrackDif
public UgvController(UgvExecution execution)
execution - instance of TrackedUgvExecutionpublic void setSpeed(double newSpeed)
newSpeed - public void setTrackSpeed(double newSpeed)
newSpeed - public void setTrackSpeed(double newLeftTrackSpeed,
                 double newRightTrackSpeed)
newLeftTrackSpeed - newRightTrackSpeed - public void setPsiCommand(double newPsi)
newPsi - public void setOpenLoopPsi()
public abstract void computeControls()
protected void updateCrossTrackError()
protected void computeControls(double psiError)
psiError - public void setControls()