|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaclient2.PlayerDevice
javaclient2.Position1DInterface
public class Position1DInterface
The position1D interface is used to control linear actuators.
| Field Summary |
|---|
| Fields inherited from class javaclient2.PlayerDevice |
|---|
is, os, pc |
| Constructor Summary | |
|---|---|
Position1DInterface(PlayerClient pc)
Constructor for Position1DInterface. |
|
| Method Summary | |
|---|---|
PlayerPosition1dData |
getData()
Get the Position1D data. |
PlayerPosition1dGeom |
getGeom()
Get the geometry data. |
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)
Read the Position1D data. |
void |
resetOdometry()
Request/reply: Reset odometry. |
void |
resetOdometry(int value)
Request/reply: Reset odometry. |
void |
setControlMode(int state)
Request/reply: Change control mode. |
void |
setMotorPower(int state)
Request/reply: Motor power. |
void |
setOdometry(float pos)
Request/reply: Set odometry. |
void |
setPosition(float pos,
float vel,
int state)
The position1D interface accepts new positions and/or velocities for the robot's motors (drivers may support position control, speed control or both). |
void |
setPosition(PlayerPosition1dCmdPos pp1dcp)
The position1D interface 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)
Request/reply: Set position PID parameters. |
void |
setSpeedProfileParams(float speed,
float acc)
Request/reply: Set linear speed profile parameters. |
void |
setVelocity(float vel,
int state)
The position1D interface accepts new positions and/or velocities for the robot's motors (drivers may support position control, speed control or both). |
void |
setVelocity(PlayerPosition1dCmdVel pp1dcv)
The position1D interface accepts new positions and/or velocities for the robot's motors (drivers may support position control, speed control or both). |
void |
setVelocityControl(int mode)
Request/reply: Change velocity control. |
void |
setVelocityPIDParams(float kp,
float ki,
float kd)
Request/reply: 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 Position1DInterface(PlayerClient pc)
pc - a reference to the PlayerClient object| Method Detail |
|---|
public void readData(PlayerMsgHdr header)
readData in class PlayerDevice
public void setPosition(float pos,
float vel,
int state)
pos - position data [m] or [rad]vel - velocity at which to move to the position [m/s] or [rad/s]state - motor state (zero is either off or locked, depending on the driver)public void setPosition(PlayerPosition1dCmdPos pp1dcp)
pp1dcp - a PlayerPosition1dCmdPos structure holding the required data
public void setVelocity(float vel,
int state)
vel - velocity [m/s] or [rad/s]state - motor state (zero is either off or locked, depending on the driver)public void setVelocity(PlayerPosition1dCmdVel pp1dcv)
pp1dcv - a PlayerPosition1dCmdVel structure holding the required datapublic void queryGeometry()
public void setMotorPower(int state)
state - 0 for off, 1 for onpublic void setVelocityControl(int mode)
mode - driver-specific modepublic void resetOdometry()
public void setControlMode(int state)
state - 0 for velocity mode, 1 for position modepublic void setOdometry(float pos)
pos - position (X) in [m]public void resetOdometry(int value)
value - driver-specific
public void setVelocityPIDParams(float kp,
float ki,
float kd)
kp - P parameterki - I parameterkd - D parameter
public void setPositionPIDParams(float kp,
float ki,
float kd)
kp - P parameterki - I parameterkd - D parameter
public void setSpeedProfileParams(float speed,
float acc)
speed - max speed [m/s]acc - max acceleration [m/s^2]protected void handleResponse(PlayerMsgHdr header)
handleResponse in class PlayerDeviceheader - Player headerpublic PlayerPosition1dData getData()
public PlayerPosition1dGeom getGeom()
public boolean isDataReady()
public boolean isGeomReady()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||