|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectohmm.OHMM
ohmm.OHMMDrive
public class OHMMDrive
OHMM high level processor lib with extensions for the drive module.
Nested Class Summary | |
---|---|
class |
OHMMDrive.AllStateDrive
state data structure for OHMM.allState(ohmm.OHMM.AllState) |
class |
OHMMDrive.DriveState
state data structure for driveState(ohmm.OHMMDrive.DriveState) |
Nested classes/interfaces inherited from class ohmm.OHMM |
---|
OHMM.AllState, OHMM.AnalogChannel, OHMM.ArmState, OHMM.AXReg, OHMM.AXState, OHMM.BatState, OHMM.DigitalPin, OHMM.MotState, OHMM.OHMMState, OHMM.SenseState, OHMM.TaskState |
Field Summary | |
---|---|
static int |
DRIVE_CFG_INDEX_B
float index for driveGetCfg(float[]) |
static int |
DRIVE_CFG_INDEX_MA
float index for driveGetCfg(float[]) |
static int |
DRIVE_CFG_INDEX_MS
float index for driveGetCfg(float[]) |
static int |
DRIVE_CFG_INDEX_R
float index for driveGetCfg(float[]) |
static int |
DRIVE_CFG_INDEX_TOL
float index for driveGetCfg(float[]) |
static int |
DRIVE_CFG_LEN
max cfg floats for driveGetCfg(float[]) |
static int |
DRIVE_ERR_ODOM
status flag for OHMM.status(int[]) |
static int |
DRIVE_ERR_TIMEOUT
status flag for OHMM.status(int[]) |
static int |
STATUS_INDEX_ARM
status index for OHMM.status(int[]) |
static int |
STATUS_INDEX_DRIVE
status index for OHMM.status(int[]) |
static int |
STATUS_LEN
num bytes for OHMM.status(int[]) , see getStatusLength() |
private static java.lang.String |
svnid
|
static Version |
VERSION
Version info for the OHMM hlp library. |
Constructor Summary | |
---|---|
OHMMDrive()
Calls superclass constructor. |
|
OHMMDrive(double initWait,
java.lang.String[] cmd)
Calls superclass constructor. |
|
OHMMDrive(ErrorHandler eh)
Calls superclass constructor. |
|
OHMMDrive(ErrorHandler eh,
double initWait,
java.lang.String[] cmd)
Calls superclass constructor. |
|
OHMMDrive(ErrorHandler eh,
java.io.File p)
Calls superclass constructor. |
|
OHMMDrive(ErrorHandler eh,
java.lang.String p)
Calls superclass constructor. |
|
OHMMDrive(ErrorHandler eh,
java.lang.String[] cmd)
Calls superclass constructor. |
|
OHMMDrive(java.io.File p)
Calls superclass constructor. |
|
OHMMDrive(java.lang.String p)
Calls superclass constructor. |
|
OHMMDrive(java.lang.String[] cmd)
Calls superclass constructor. |
Method Summary | |
---|---|
boolean |
driveArc(float l,
float d)
Runs monitor command "da". |
boolean |
driveArcDeg(float l,
float d)
Runs monitor command "dad". |
static java.lang.String |
driveCfgToString(float[] cfg)
Convert drive config to a human readable message. |
static java.lang.StringBuilder |
driveCfgToString(float[] cfg,
java.lang.StringBuilder sb)
helper for driveCfgToString(float[]) |
float[] |
driveGetCfg()
covers driveGetCfg(float[]) , always conses |
float[] |
driveGetCfg(float[] cfg)
Runs monitor command "dgcfg". |
float[] |
driveGetPose()
calls driveGetPose(float[]) , always conses |
float[] |
driveGetPose(float[] xyt)
Runs monitor command "dgp". |
int |
driveGetQueue()
Runs monitor command "dgq". |
float[] |
driveGetVL()
calls driveGetVL(float[]) , always conses |
float[] |
driveGetVL(float[] vl)
Runs monitor command "dgvl". |
float[] |
driveGetVW()
calls driveGetVW(float[]) , always conses |
float[] |
driveGetVW(float[] vw)
Runs monitor command "dgvw". |
boolean |
driveOrientationServo(float t)
Runs monitor command "dos". |
void |
drivePause()
Runs monitor command "dp". |
void |
driveReinit()
Runs monitor command "dri". |
void |
driveResetPose()
Runs monitor command "drp". |
void |
driveSetBaseline(float b)
Runs monitor command "dsbl". |
void |
driveSetMaxAccel(float a)
Runs monitor command "dsma". |
boolean |
driveSetMaxSpeed(float s)
Runs monitor command "dsms". |
void |
driveSetPosDGain(float g)
Runs the monitor command "dsdg". |
void |
driveSetPose(float x,
float y,
float t)
Runs monitor command "dsp". |
void |
driveSetPosIGain(float g)
Runs the monitor command "dsig". |
void |
driveSetPosPGain(float g)
Runs the monitor command "dspg". |
void |
driveSetTol(float t)
Runs monitor command "dstol". |
boolean |
driveSetVL(float v,
float l)
Runs monitor command "dsvl". |
boolean |
driveSetVW(float v,
float w)
Runs monitor command "dsvw". |
void |
driveSetWheelRadius(float r)
Runs monitor command "dswr". |
OHMMDrive.DriveState |
driveState()
covers driveState(DriveState) , always conses |
OHMMDrive.DriveState |
driveState(OHMMDrive.DriveState state)
Runs monitor command "drvst". |
void |
driveStop()
Runs monitor command "dst". |
boolean |
driveStraight(float d)
Runs monitor command "df". |
boolean |
driveTurn(float d)
Runs monitor command "dt". |
boolean |
driveTurnDeg(float d)
Runs monitor command "dtd". |
void |
driveUnPause()
Runs monitor command "dup". |
java.lang.String |
getHLPVersion()
get a human-readable string giving the OHMM hlp library version |
int |
getStatusIndexArm()
Get module OHMM.status(int[]) byte index. |
int |
getStatusIndexDrive()
Get module OHMM.status(int[]) byte index. |
int |
getStatusLength()
Get number of bytes expected from llp for OHMM.status(int[]) . |
OHMM.AllState |
makeAllState()
Factory method to cons an OHMM.AllState . |
java.lang.StringBuilder |
statusToString(int[] status,
java.lang.StringBuilder sb)
helper for OHMM.statusToString(int[]) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String svnid
public static final Version VERSION
Version info for the OHMM hlp library.
getHLPVersion()
is a convenience; OHMM.getMonitorVersion()
asks the firmware for its version, which may differ.
public static final int STATUS_LEN
OHMM.status(int[])
, see getStatusLength()
public static final int STATUS_INDEX_DRIVE
OHMM.status(int[])
public static final int STATUS_INDEX_ARM
OHMM.status(int[])
public static final int DRIVE_ERR_ODOM
OHMM.status(int[])
public static final int DRIVE_ERR_TIMEOUT
OHMM.status(int[])
public static final int DRIVE_CFG_LEN
driveGetCfg(float[])
public static final int DRIVE_CFG_INDEX_R
driveGetCfg(float[])
public static final int DRIVE_CFG_INDEX_B
driveGetCfg(float[])
public static final int DRIVE_CFG_INDEX_MS
driveGetCfg(float[])
public static final int DRIVE_CFG_INDEX_MA
driveGetCfg(float[])
public static final int DRIVE_CFG_INDEX_TOL
driveGetCfg(float[])
Constructor Detail |
---|
public OHMMDrive(ErrorHandler eh, java.io.File p)
public OHMMDrive(java.io.File p)
public OHMMDrive(ErrorHandler eh, java.lang.String p)
public OHMMDrive(java.lang.String p)
public OHMMDrive(ErrorHandler eh, double initWait, java.lang.String[] cmd)
public OHMMDrive(ErrorHandler eh, java.lang.String[] cmd)
public OHMMDrive(double initWait, java.lang.String[] cmd)
public OHMMDrive(java.lang.String[] cmd)
public OHMMDrive(ErrorHandler eh)
public OHMMDrive()
Method Detail |
---|
public java.lang.String getHLPVersion()
This impl reports both the base OHMM class version as well as the version of OHMMDrive.
getHLPVersion
in class OHMM
public int getStatusLength()
Get number of bytes expected from llp for OHMM.status(int[])
.
Subclasses may override this.
getStatusLength
in class OHMM
public int getStatusIndexDrive()
Get module OHMM.status(int[])
byte index.
Subclasses may override this.
public int getStatusIndexArm()
Get module OHMM.status(int[])
byte index.
Subclasses may override this.
getStatusIndexArm
in class OHMM
public java.lang.StringBuilder statusToString(int[] status, java.lang.StringBuilder sb)
OHMM.statusToString(int[])
statusToString
in class OHMM
public OHMM.AllState makeAllState()
Factory method to cons an OHMM.AllState
.
May be overridden by subclasses that also need to subclass OHMM.AllState
.
makeAllState
in class OHMM
public void driveReinit()
public float[] driveGetVW(float[] vw)
vw
- velocities are returned here, or cons if null
public float[] driveGetVW()
driveGetVW(float[])
, always conses
public float[] driveGetVL(float[] vl)
vl
- velocities are returned here, or cons if null
public float[] driveGetVL()
driveGetVL(float[])
, always conses
public boolean driveSetVW(float v, float w)
v
- forward velocity in mm/sw
- rotational velocity in rad/s, CCW positivepublic boolean driveSetVL(float v, float l)
v
- forward velocity in mm/s or turn velocity in rad/s for turn in
placel
- turn radius in mm, CCW positivepublic float[] driveGetPose(float[] xyt)
xyt
- pose is returned here, or cons if null
Units correspond to args to driveSetPose(float, float, float)
.
public float[] driveGetPose()
driveGetPose(float[])
, always conses
public void driveSetPose(float x, float y, float t)
x
- pose x in mmy
- pose y in mmt
- pose theta in rad CCW positivepublic void driveResetPose()
public boolean driveStraight(float d)
d
- distance to travel in mm, positive forward
public boolean driveTurn(float d)
d
- amount of turn in radians, CCW positive
public boolean driveTurnDeg(float d)
d
- amount of turn in degrees, CCW positive
public boolean driveArc(float l, float d)
l
- signed arc radius in mmd
- signed drive distance in mm, or turn angle in rad for turn in
place
public boolean driveArcDeg(float l, float d)
l
- signed arc radius in mmd
- signed drive distance in mm, or turn angle in degrees for turn in
place
public boolean driveOrientationServo(float t)
t
- global goal orientation in rad or NaN to disable orientation servo
public int driveGetQueue()
public void drivePause()
public void driveUnPause()
public void driveStop()
public void driveSetPosPGain(float g)
g
- the gainpublic void driveSetPosIGain(float g)
g
- the gainpublic void driveSetPosDGain(float g)
g
- the gainpublic float[] driveGetCfg(float[] cfg)
cfg
- up to DRIVE_CFG_LEN
floats of config is returned here,
or null to cons
DRIVE_CFG_INDEX_*
.public float[] driveGetCfg()
driveGetCfg(float[])
, always conses
public static java.lang.String driveCfgToString(float[] cfg)
cfg
- up to DRIVE_CFG_LEN
bytes
public static java.lang.StringBuilder driveCfgToString(float[] cfg, java.lang.StringBuilder sb)
driveCfgToString(float[])
public void driveSetWheelRadius(float r)
r
- nonnegative wheel radius in mmpublic void driveSetBaseline(float b)
b
- nonnegative baseline between wheels in mmpublic boolean driveSetMaxSpeed(float s)
s
- positive maximum speed in mm/sec
public void driveSetMaxAccel(float a)
a
- positive max acceleration in mm/sec/sec, or
Float.POSITIVE_INFINITY
to skip accelerationpublic void driveSetTol(float t)
t
- tolerance in mmpublic OHMMDrive.DriveState driveState(OHMMDrive.DriveState state)
state
- the state is returned here, or null to cons
public OHMMDrive.DriveState driveState()
driveState(DriveState)
, always conses
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |