|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient2.PlayerDevice
javaclient2.AbstractPositionDevice
javaclient2.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 |
---|
Fields inherited from class javaclient2.PlayerDevice |
---|
is, os, pc |
Constructor Summary | |
---|---|
Position3DInterface(PlayerClient pc)
Constructor for Position3DInterface. |
Method Summary | |
---|---|
PlayerPosition3dData |
getData()
Get the Position3D data. |
PlayerPosition3dGeom |
getGeom()
Get the geometry data. |
int |
getX()
|
int |
getY()
|
int |
getYaw()
|
protected void |
handleResponse(PlayerMsgHdr header)
Handle acknowledgement response messages. |
boolean |
isDataReady()
Check if data is available. |
boolean |
isGeomReady()
Check if geometry data is available. |
void |
queryGeometry()
Request/reply: Query geometry. |
void |
readData(PlayerMsgHdr header)
This interface returns data regarding the odometric pose and velocity of the robot, as well as motor stall information. |
void |
resetOdometry()
Configuration request: Reset odometry. |
void |
setControlMode(int state)
Configuration request: Change position control. |
void |
setMotorPower(int state)
Request/reply: Motor power. |
void |
setOdometry(PlayerPose3d pose)
Configuration request: Set odometry. |
void |
setPosition(PlayerPose3d pos,
int state)
Command: position (PLAYER_POSITION3D_CMD_SET_POS) It accepts new positions and/or velocities for the robot's motors (drivers may support position control, speed control or both). |
void |
setPositionPIDParams(float kp,
float ki,
float kd)
Configuration request: Set position PID parameters. |
void |
setSpeed(int speed,
int turnrate)
|
void |
setSpeedProfileParams(float speed,
float acc)
Configuration request: Set speed profile parameters. |
void |
setVelocity(PlayerPose3d pos,
int state)
Command: velocity (PLAYER_POSITION3D_CMD_SET_VEL) It accepts new positions and/or velocities for the robot's motors (drivers may support position control, speed control or both). |
void |
setVelocityControl(int value)
Configuration request: Change velocity control. |
void |
setVelocityPIDParams(float kp,
float ki,
float kd)
Configuration request: Set velocity PID parameters. |
Methods inherited from class javaclient2.PlayerDevice |
---|
getDeviceAccess, getDeviceAddress, getDeviceDriverName, handleNARMessage, sendHeader, setDeviceAccess, setDeviceAddress, setDeviceDriverName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Position3DInterface(PlayerClient pc)
pc
- a reference to the PlayerClient objectMethod Detail |
---|
public void readData(PlayerMsgHdr header)
readData
in class PlayerDevice
public void setPosition(PlayerPose3d pos, int state)
pos
- a PlayerPose3d structure containing the required datastate
- motor state (zero is either off or locked, depending on the driver)public void setVelocity(PlayerPose3d pos, int state)
pos
- a PlayerPose3d structure containing the required datastate
- motor state (zero is either off or locked, depending on the driver)public void queryGeometry()
public void setMotorPower(int state)
state
- 0 for off, 1 for onpublic void setControlMode(int state)
state
- 0 for velocity mode, 1 for position modepublic void setVelocityControl(int value)
value
- driver-specificpublic void setOdometry(PlayerPose3d pose)
pose
- a PlayerPose3d structure containing the pose datapublic void resetOdometry()
public void setVelocityPIDParams(float kp, float ki, float kd)
kp
- P parameterki
- I parameterkd
- D parameterpublic void setPositionPIDParams(float kp, float ki, float kd)
kp
- P parameterki
- I parameterkd
- D parameterpublic void setSpeedProfileParams(float speed, float acc)
speed
- max speed [rad/s]acc
- max acceleration [rad/s^2]protected void handleResponse(PlayerMsgHdr header)
handleResponse
in class PlayerDevice
header
- Player headerpublic PlayerPosition3dData getData()
public PlayerPosition3dGeom getGeom()
public boolean isDataReady()
public boolean isGeomReady()
public int getX()
getX
in class AbstractPositionDevice
public int getY()
getY
in class AbstractPositionDevice
public int getYaw()
getYaw
in class AbstractPositionDevice
public void setSpeed(int speed, int turnrate)
setSpeed
in class AbstractPositionDevice
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |