|
Position3DProxy Class Reference
[Proxies]
#include <playerclient.h>
Inherits ClientProxy.
List of all members.
Detailed Description
The Position3DProxy class is used to control a player_interface_position3d device. The latest position data is contained in the attributes xpos, ypos, etc.
|
Public Member Functions |
| Position3DProxy (PlayerClient *pc, unsigned short index, unsigned char access='c') |
int | SetSpeed (double xspeed, double yspeed, double zspeed, double rollspeed, double pitchspeed, double yawspeed) |
int | SetSpeed (double xspeed, double yspeed, double zspeed, double yawspeed) |
int | SetSpeed (double xspeed, double yspeed, double yawspeed) |
int | SetSpeed (double xspeed, double yawspeed) |
int | GoTo (double x, double y, double z, double roll, double pitch, double yaw) |
int | SetMotorState (unsigned char state) |
int | SelectVelocityControl (unsigned char mode) |
int | ResetOdometry () |
int | SetOdometry (double x, double y, double z, double roll, double pitch, double yaw) |
int | SelectPositionMode (unsigned char mode) |
int | SetSpeedPID (double kp, double ki, double kd) |
| Only supported by the reb_position driver.
|
int | SetPositionPID (double kp, double ki, double kd) |
| Only supported by the reb_position driver.
|
int | SetPositionSpeedProfile (double spd, double acc) |
void | FillData (player_msghdr_t hdr, const char *buffer) |
void | Print () |
| Print current position device state.
|
double | Xpos () const |
| Accessor method.
|
double | Ypos () const |
| Accessor method.
|
double | Zpos () const |
| Accessor method.
|
double | Roll () const |
| Accessor method.
|
double | Pitch () const |
| Accessor method.
|
double | Yaw () const |
| Accessor method.
|
double | XSpeed () const |
| Accessor method.
|
double | YSpeed () const |
| Accessor method.
|
double | ZSpeed () const |
| Accessor method.
|
double | RollSpeed () const |
| Accessor method.
|
double | PitchSpeed () const |
| Accessor method.
|
double | YawSpeed () const |
| Accessor method.
|
unsigned char | Stall () const |
| Accessor method.
|
Constructor & Destructor Documentation
Position3DProxy::Position3DProxy |
( |
PlayerClient * |
pc, |
|
|
unsigned short |
index, |
|
|
unsigned char |
access = 'c' |
|
) |
[inline] |
|
|
Constructor. Leave the access field empty to start unconnected. |
Member Function Documentation
int Position3DProxy::SetSpeed |
( |
double |
xspeed, |
|
|
double |
yspeed, |
|
|
double |
zspeed, |
|
|
double |
rollspeed, |
|
|
double |
pitchspeed, |
|
|
double |
yawspeed |
|
) |
|
|
|
Send a motor command for a planar robot. Specify the forward, sideways, and angular speeds in m/s, m/s, m/s, rad/s, rad/s, and rad/s, respectively. Returns: 0 if everything's ok, -1 otherwise. |
int Position3DProxy::SetSpeed |
( |
double |
xspeed, |
|
|
double |
yspeed, |
|
|
double |
zspeed, |
|
|
double |
yawspeed |
|
) |
[inline] |
|
|
Send a motor command for a planar robot. Specify the forward, sideways, and angular speeds in m/s, m/s, and rad/s, respectively. Returns: 0 if everything's ok, -1 otherwise. |
int Position3DProxy::SetSpeed |
( |
double |
xspeed, |
|
|
double |
yspeed, |
|
|
double |
yawspeed |
|
) |
[inline] |
|
int Position3DProxy::SetSpeed |
( |
double |
xspeed, |
|
|
double |
yawspeed |
|
) |
[inline] |
|
|
Same as the previous SetSpeed(), but doesn't take the sideways speed (so use this one for non-holonomic robots). |
int Position3DProxy::GoTo |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
roll, |
|
|
double |
pitch, |
|
|
double |
yaw |
|
) |
|
|
|
Send a motor command for position control mode. Specify the desired pose of the robot in m, m, m, rad, rad, rad. Returns: 0 if everything's ok, -1 otherwise. |
int Position3DProxy::SetMotorState |
( |
unsigned char |
state |
) |
|
|
|
Enable/disable the motors. Set state to 0 to disable or 1 to enable. Be VERY careful with this method! Your robot is likely to run across the room with the charger still attached. Returns: 0 if everything's ok, -1 otherwise. |
int Position3DProxy::SelectVelocityControl |
( |
unsigned char |
mode |
) |
|
|
|
Select velocity control mode.
This is driver dependent. Returns: 0 if everything's ok, -1 otherwise. |
int Position3DProxy::ResetOdometry |
( |
|
) |
|
|
|
Reset odometry to (0,0,0). Returns: 0 if everything's ok, -1 otherwise. |
int Position3DProxy::SetOdometry |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
roll, |
|
|
double |
pitch, |
|
|
double |
yaw |
|
) |
|
|
|
Sets the odometry to the pose (x, y, z, roll, pitch, yaw). Note that x , y , and z are in m and roll , pitch , and yaw are in radians.
Returns: 0 if OK, -1 else |
int Position3DProxy::SelectPositionMode |
( |
unsigned char |
mode |
) |
|
|
|
Select position mode Set mode for 0 for velocity mode, 1 for position mode. Returns: 0 if OK, -1 else |
int Position3DProxy::SetSpeedPID |
( |
double |
kp, |
|
|
double |
ki, |
|
|
double |
kd |
|
) |
|
|
|
Only supported by the reb_position driver.
|
int Position3DProxy::SetPositionPID |
( |
double |
kp, |
|
|
double |
ki, |
|
|
double |
kd |
|
) |
|
|
|
Only supported by the reb_position driver.
|
int Position3DProxy::SetPositionSpeedProfile |
( |
double |
spd, |
|
|
double |
acc |
|
) |
|
|
|
Sets the ramp profile for position based control spd rad/s, acc rad/s/s |
void Position3DProxy::FillData |
( |
player_msghdr_t |
hdr, |
|
|
const char * |
buffer |
|
) |
[virtual] |
|
|
All proxies must provide this method. It is used internally to parse new data when it is received.
Reimplemented from ClientProxy. |
void Position3DProxy::Print |
( |
|
) |
[virtual] |
|
|
Print current position device state.
Reimplemented from ClientProxy. |
double Position3DProxy::Xpos |
( |
|
) |
const [inline] |
|
double Position3DProxy::Ypos |
( |
|
) |
const [inline] |
|
double Position3DProxy::Zpos |
( |
|
) |
const [inline] |
|
double Position3DProxy::Roll |
( |
|
) |
const [inline] |
|
double Position3DProxy::Pitch |
( |
|
) |
const [inline] |
|
double Position3DProxy::Yaw |
( |
|
) |
const [inline] |
|
double Position3DProxy::XSpeed |
( |
|
) |
const [inline] |
|
double Position3DProxy::YSpeed |
( |
|
) |
const [inline] |
|
double Position3DProxy::ZSpeed |
( |
|
) |
const [inline] |
|
double Position3DProxy::RollSpeed |
( |
|
) |
const [inline] |
|
double Position3DProxy::PitchSpeed |
( |
|
) |
const [inline] |
|
double Position3DProxy::YawSpeed |
( |
|
) |
const [inline] |
|
unsigned char Position3DProxy::Stall |
( |
|
) |
const [inline] |
|
The documentation for this class was generated from the following file:
Generated on Tue May 3 14:16:05 2005 for Player by 1.3.6
|