|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.AbstractPositionDevice
javaclient.Position3DInterface
public class Position3DInterface
The position3d interface is used to control mobile robot bases in 3D (i.e., pitch and roll are important).
Field Summary | |
---|---|
protected short |
PLAYER_POSITION3D_GET_GEOM_REQ
|
protected short |
PLAYER_POSITION3D_MOTOR_POWER_REQ
|
protected short |
PLAYER_POSITION3D_POSITION_MODE_REQ
|
protected short |
PLAYER_POSITION3D_POSITION_PID_REQ
|
protected short |
PLAYER_POSITION3D_RESET_ODOM_REQ
|
protected short |
PLAYER_POSITION3D_SET_ODOM_REQ
|
protected short |
PLAYER_POSITION3D_SPEED_PID_REQ
|
protected short |
PLAYER_POSITION3D_SPEED_PROF_REQ
|
protected short |
PLAYER_POSITION3D_VELOCITY_MODE_REQ
|
Fields inherited from class javaclient.PlayerDevice |
---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
Constructor Summary | |
---|---|
Position3DInterface(PlayerClient pc,
short indexOfDevice)
Constructor for Position3DInterface. |
Method Summary | |
---|---|
void |
changePositionControl(byte state)
Configuration request: Change position control. |
PlayerPosition3DGeomT |
getGeom()
Get the geometry data. |
int |
getPitch()
Get angular velocity (pitch) in mrad. |
int |
getPitchSpeed()
Get angular velocity (pitch) in mrad/sec. |
int |
getRoll()
Get angular velocity (roll) in mrad. |
int |
getRollSpeed()
Get angular velocity (roll) in mrad/sec. |
byte |
getStall()
Get motors status. |
int |
getX()
Get X position in mm. |
int |
getXSpeed()
Get X translational velocity in mm/sec. |
int |
getY()
Get Y position in mm. |
int |
getYaw()
Get angular velocity (yaw) in mrad. |
int |
getYawSpeed()
Get angular velocity (yaw) in mrad/sec. |
int |
getYSpeed()
Get Y translational velocity in mm/sec. |
int |
getZ()
Get Z position in mm. |
int |
getZSpeed()
Get Z translational velocity in mm/sec. |
void |
handleEARMessage()
Handle Error Acknowledgement Response messages. |
void |
handleNARMessage()
Handle Negative Acknowledgement Response messages. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
boolean |
isGeomReady()
Check if geometry data is available. |
void |
queryGeometry()
Configuration request: Query geometry. |
void |
readData()
This interface returns data regarding the odometric pose and velocity of the robot, as well as motor stall information (xPos, yPos, zPos, roll, pitch, yaw, xSpeed, ySpeed, zSpeed, rollSpeed, pitchSpeed, yawSpeed, stall). |
void |
resetOdometry()
Configuration request: Reset odometry. |
void |
setMotorPower(int state)
Configuration request: Motor power. |
void |
setOdometry(int xP,
int yP,
int zP,
int rollP,
int pitchP,
int yawP)
Configuration request: Set odometry. |
void |
setPosition(int xP,
int yP,
int zP)
Send position commands. |
void |
setPosition(int xP,
int yP,
int zP,
int pitchP,
int rollP,
int yawP)
Send position commands. |
void |
setPosition(int xP,
int yP,
int zP,
int pitchP,
int rollP,
int yawP,
int xS,
int yS,
int zS,
int pitchS,
int rollS,
int yawS,
byte state,
byte type)
The position interface accepts new positions and/or velocities for the robot's motors (drivers may support position control, speed control or both). |
void |
setPositionPIDParams(int kp,
int ki,
int kd)
Configuration request: Set position PID parameters. |
void |
setSpeed(int xS,
int yS)
Set speed and turnrate. |
void |
setSpeed(int xS,
int yS,
int zS)
Set speed and turnrate. |
void |
setSpeed(int xS,
int yS,
int zS,
int pitchS,
int rollS,
int yawS)
Set speed, turnrate and sideSpeed. |
void |
setSpeedProfileParams(int sp,
int acc)
Configuration request: Set speed profile parameters. |
void |
setVelocityControl(byte value)
Configuration request: Change velocity control. |
void |
setVelocityPIDParams(int kp,
int ki,
int kd)
Configuration request: Set velocity PID parameters. |
Methods inherited from class javaclient.PlayerDevice |
---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, readHeader, sendHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final short PLAYER_POSITION3D_GET_GEOM_REQ
protected final short PLAYER_POSITION3D_MOTOR_POWER_REQ
protected final short PLAYER_POSITION3D_VELOCITY_MODE_REQ
protected final short PLAYER_POSITION3D_RESET_ODOM_REQ
protected final short PLAYER_POSITION3D_POSITION_MODE_REQ
protected final short PLAYER_POSITION3D_SPEED_PID_REQ
protected final short PLAYER_POSITION3D_POSITION_PID_REQ
protected final short PLAYER_POSITION3D_SPEED_PROF_REQ
protected final short PLAYER_POSITION3D_SET_ODOM_REQ
Constructor Detail |
---|
public Position3DInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public int getX()
getX
in class AbstractPositionDevice
public int getY()
getY
in class AbstractPositionDevice
public int getZ()
public int getRoll()
public int getPitch()
public int getYaw()
getYaw
in class AbstractPositionDevice
public int getXSpeed()
public int getYSpeed()
public int getZSpeed()
public int getRollSpeed()
public int getPitchSpeed()
public int getYawSpeed()
public byte getStall()
public void setPosition(int xP, int yP, int zP, int pitchP, int rollP, int yawP, int xS, int yS, int zS, int pitchS, int rollS, int yawS, byte state, byte type)
xP
- X position in mmyP
- Y position in mmzP
- Z position in mmpitchP
- angular velocity (pitch) in mradrollP
- angular velocity (roll) in mradyawP
- angular velocity (yaw) in mradxS
- X translational velocity in mm/secyS
- Y translational velocity in mm/seczS
- Z translational velocity in mm/secpitchS
- angular velocity (pitch) in mrad/secrollS
- angular velocity (roll) in mrad/secyawS
- angular velocity (yaw) in mrad/secstate
- motor state (zero is either off or locked, depending on the driver)type
- command type; 0 = velocity, 1 = positionpublic void setPosition(int xP, int yP, int zP)
xP
- X position in mmyP
- Y position in mmzP
- Z position in mmpublic void setPosition(int xP, int yP, int zP, int pitchP, int rollP, int yawP)
xP
- X position in mmyP
- Y position in mmzP
- Z position in mmpitchP
- angular velocity (pitch) in mradrollP
- angular velocity (roll) in mradyawP
- angular velocity (yaw) in mradpublic void setSpeed(int xS, int yS)
setSpeed
in class AbstractPositionDevice
xS
- X translational velocity in mm/secyS
- Y translational velocity in mm/secpublic void setSpeed(int xS, int yS, int zS)
xS
- X translational velocity in mm/secyS
- Y translational velocity in mm/seczS
- Z translational velocity in mm/secpublic void setSpeed(int xS, int yS, int zS, int pitchS, int rollS, int yawS)
xS
- X translational velocity in mm/secyS
- Y translational velocity in mm/seczS
- Z translational velocity in mm/secpitchS
- angular velocity (pitch) in mrad/secrollS
- angular velocity (roll) in mrad/secyawS
- angular velocity (yaw) in mrad/secpublic void queryGeometry()
public boolean isGeomReady()
public PlayerPosition3DGeomT getGeom()
public void handleResponse(int size)
handleResponse
in class PlayerDevice
size
- size of the payloadpublic void setMotorPower(int state)
state
- 0 for off, 1 for onpublic void changePositionControl(byte state)
state
- 0 for velocity mode, 1 for position modepublic void setVelocityControl(byte value)
value
- driver-specificpublic void setOdometry(int xP, int yP, int zP, int rollP, int pitchP, int yawP)
xP
- X in mmyP
- Y in mmzP
- Z in mmrollP
- Heading in mradpitchP
- Heading in mradyawP
- Heading in mradpublic void resetOdometry()
public void setVelocityPIDParams(int kp, int ki, int kd)
kp
- P parameterki
- I parameterkd
- D parameterpublic void setPositionPIDParams(int kp, int ki, int kd)
kp
- P parameterki
- I parameterkd
- D parameterpublic void setSpeedProfileParams(int sp, int acc)
sp
- max speed (in mrad/s)acc
- max acceleration (in mrad/s/s)public void handleNARMessage()
handleNARMessage
in class PlayerDevice
public void handleEARMessage()
handleEARMessage
in class PlayerDevice
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |