Modifier and Type | Class and Description |
---|---|
class |
OHMMDrive.AllStateDrive
state data structure for
OHMM.allState(ohmm.OHMM.AllState) |
class |
OHMMDrive.DriveState
state data structure for
driveState(ohmm.OHMMDrive.DriveState) |
OHMM.AllState, OHMM.AnalogChannel, OHMM.ArmState, OHMM.AXReg, OHMM.AXState, OHMM.BatState, OHMM.DigitalPin, OHMM.MotState, OHMM.OHMMState, OHMM.SenseState, OHMM.TaskState
Modifier and Type | Field and Description |
---|---|
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.
|
ARM_ACTIVE, ARM_AT_GOAL, ARM_ELBOW, ARM_ERR_AX, ARM_FREEZE_CAL, ARM_GRIPPER, ARM_SHOULDER, ARM_WRIST, avgRecvWait, avgSendWait, AX_ERR_ANGLE_LIMIT, AX_ERR_CHECKSUM, AX_ERR_INSTRUCTION, AX_ERR_OVERHEATING, AX_ERR_OVERLOAD, AX_ERR_RANGE, AX_ERR_TIMEOUT, AX_ERR_TRANSACTION, AX_ERR_VOLTAGE, AX_ID_BCAST, bytesReceived, bytesSent, CMD_NAME_MAX, codes, commandDelay, debug, DEF_COMMAND_DELAY, DEF_PROCESS_INIT_WAIT, DEF_RECV_POLL_TIME, DEF_TIMEOUT_FILE, DEF_TIMEOUT_PROXY, DEF_TIMEOUT_RXTX, DF2, DF4, errorHandler, flushBuf, flushNext, HLP_ERR_RECV, HLP_ERR_SEND, INIT_DELAY, INITIAL_FLUSH_BUF_LEN, istream, LCD_WIDTH, LEFT, maxRecvWait, maxSendWait, minRecvWait, minSendWait, MOT_ERR_ENC_L, MOT_ERR_ENC_R, MOT_ERR_VEL_L, MOT_ERR_VEL_R, NUM_INIT_ZEROS, numTimeouts, OHMM_SITE_CLASS, OHMM_SITE_CLASS_PROP, ostream, PID_FPF, recvPollTime, recvTimedOut, RIGHT, RXTX_BAUDRATE, RXTX_OPEN_TIMEOUT_MS, RXTX_PORT_OWNER_NAME, rxtxSerialPort, SCAL_N, STATUS_INDEX_BAT, STATUS_INDEX_HLP, STATUS_INDEX_MOT, STATUS_INDEX_TASK, TASK_ERR_COLLISION, TASK_ERR_MEM, timeout, totalRecvWait, totalSendWait, USAGE
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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[]) |
allState, allState, armActive, armAtGoal, armCal, armEnable, armFreezeAllCal, armGetAllCal, armGetAllCal, armGetAllJoints, armGetAllJoints, armGetAllJointsDeg, armGetAllJointsDeg, armGetAllJointsRad, armGetAllJointsRad, armGetCal, armGetGripper, armGetJoint, armGetJointDeg, armGetJointRad, armGetLoads, armGetLoads, armGetNumAXErrors, armGetTemps, armGetTemps, armHome, armReinit, armSetAllCal, armSetAllJoints, armSetAllJointsDeg, armSetAllJointsRad, armSetCal, armSetGripper, armSetJoint, armSetJointDeg, armSetJointRad, armState, armState, axAction, axErrToString, axESTOP, axGetLoad, axGetNumOverflows, axGetNumRetries, axGetNumTimeouts, axGetPos, axGetPosDeg, axGetPosRad, axGetTemp, axGetVolts, axPing, axRead, axRead, axRead16, axRead16, axRegSetGoal, axRegSetGoalDeg, axRegSetGoalRad, axRegWrite, axRegWrite, axRegWrite11, axRegWrite11, axReinit, axSetAngleLimits, axSetGoal, axSetGoalDeg, axSetGoalImpl, axSetGoalImpl, axSetGoalRad, axState, axState, axTorqueEnable, axWrite, axWrite, axWrite11, axWrite11, axWriteImpl, batMillivolts, batState, batState, close, dbg, drainReceiveBuffer, dumpStats, dumpStats, echo, echo, echo, echoFix, estop, fmt2, fmt4, freeRam, getBytesReceived, getBytesSent, getCmdCode, getCommandDelay, getCurrentTime, getDebug, getErrorHandler, getMonitorVersion, getNumTimeouts, getOHMMClass, getRecvPollTime, getStatusIndexBat, getStatusIndexHLP, getStatusIndexMot, getStatusIndexTask, getTimeout, init, init, lcdAlert, lcdMsg, lcdMsgClr, lcdSysMsg, lcdSysMsgClr, listPorts, listPorts, makeOHMM, makeOHMM, motFree, motGetErrors, motGetGainCmd, motGetPos, motGetPos, motGetPosCounts, motGetPosCounts, motGetVel, motGetVel, motGetVelCmd, motGetVelCmd, motKick, motReinit, motSetDiffVelIGain, motSetVelCmd, motSetVelDGain, motSetVelIGain, motSetVelPGain, motState, motState, noResponseDelay, ohmmState, ohmmState, printUsage, recvBoolean, recvByte, recvByte, recvChar, recvFix, recvFloat, recvInt, recvString, recvString, resetStats, send, send, send, send, send, send, send, send, send, send, send, send, send, send, send, send, sendCmdCode, sendCmdCode, sendFix, sendFix, sendFlush, sendZeros, senseConfigAnalog, senseConfigAnalog, senseConfigAnalogIR, senseConfigAnalogIR, senseConfigAnalogLUT, senseConfigAnalogLUT, senseConfigDigital, senseConfigDigital, senseReadAnalog, senseReadAnalog, senseReadDigital, senseReadDigital, senseReinit, senseState, senseState, setCommandDelay, setDebug, setErrorHandler, setRecvPollTime, setTimeout, shtdn, sleep, status, status, statusToString, taskState, taskState, ticks
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[])
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()
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 nullpublic float[] driveGetVW()
driveGetVW(float[])
, always consespublic float[] driveGetVL(float[] vl)
vl
- velocities are returned here, or cons if nullpublic float[] driveGetVL()
driveGetVL(float[])
, always consespublic 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 nullUnits correspond to args to driveSetPose(float, float, float)
.
public float[] driveGetPose()
driveGetPose(float[])
, always consespublic 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 forwardpublic boolean driveTurn(float d)
d
- amount of turn in radians, CCW positivepublic boolean driveTurnDeg(float d)
d
- amount of turn in degrees, CCW positivepublic 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
placepublic 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
placepublic boolean driveOrientationServo(float t)
t
- global goal orientation in rad or NaN to disable orientation servopublic 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 consDRIVE_CFG_INDEX_*
.public float[] driveGetCfg()
driveGetCfg(float[])
, always consespublic static java.lang.String driveCfgToString(float[] cfg)
cfg
- up to DRIVE_CFG_LEN
bytespublic 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/secpublic 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 conspublic OHMMDrive.DriveState driveState()
driveState(DriveState)
, always conses