PlayerCc::Position3dProxy Class Reference

The Position3dProxy class is used to control a interface_position3d device. More...

#include <playerc++.h>

Inheritance diagram for PlayerCc::Position3dProxy:
Collaboration diagram for PlayerCc::Position3dProxy:

List of all members.


Detailed Description

The Position3dProxy class is used to control a interface_position3d device.

The latest position data is contained in the attributes xpos, ypos, etc.

Public Member Functions

 Position3dProxy (PlayerClient *aPc, uint32_t aIndex=0)
 Constructor.
 ~Position3dProxy ()
 Destructor.
void SetSpeed (double aXSpeed, double aYSpeed, double aZSpeed, double aRollSpeed, double aPitchSpeed, double aYawSpeed)
 Send a motor command for a planar robot.
void SetSpeed (double aXSpeed, double aYSpeed, double aZSpeed, double aYawSpeed)
 Send a motor command for a planar robot.
void SetSpeed (double aXSpeed, double aYSpeed, double aYawSpeed)
 simplified version of SetSpeed
void SetSpeed (double aXSpeed, double aYawSpeed)
 Same as the previous SetSpeed(), but doesn't take the sideways speed (so use this one for non-holonomic robots).
void SetSpeed (player_pose3d_t vel)
 Overloaded SetSpeed that takes player_pose3d_t as input.
void GoTo (player_pose3d_t aPos, player_pose3d_t aVel)
 Send a motor command for position control mode.
void GoTo (player_pose3d_t aPos)
 Same as the previous GoTo(), but does'n take vel argument.
void GoTo (double aX, double aY, double aZ, double aRoll, double aPitch, double aYaw)
 Same as the previous GoTo(), but only takes position arguments, no motion speed setting.
void SetMotorEnable (bool aEnable)
 Enable/disable the motors.
void SelectVelocityControl (int aMode)
 Select velocity control mode.
void ResetOdometry ()
 Reset odometry to (0,0,0,0,0,0).
void SetOdometry (double aX, double aY, double aZ, double aRoll, double aPitch, double aYaw)
 Sets the odometry to the pose (x, y, z, roll, pitch, yaw).
void RequestGeom ()
 Get the device's geometry; it is read into the relevant class attributes.
double GetXPos () const
 Get device X position.
double GetYPos () const
 Get device Y position.
double GetZPos () const
 Get device Z position.
double GetRoll () const
 Get device Roll angle.
double GetPitch () const
 Get device Pitch angle.
double GetYaw () const
 Get device Yaw angle.
double GetXSpeed () const
 Get device X speed.
double GetYSpeed () const
 Get device Y speed.
double GetZSpeed () const
 Get device Z speed.
double GetRollSpeed () const
 Get device Roll speed.
double GetPitchSpeed () const
 Get device Pitch speed.
double GetYawSpeed () const
 Get device Yaw speed.
bool GetStall () const
 Is the device stalled?

Private Member Functions

void Subscribe (uint32_t aIndex)
void Unsubscribe ()

Private Attributes

playerc_position3d_tmDevice

Member Function Documentation

void PlayerCc::Position3dProxy::GoTo ( player_pose3d_t  aPos,
player_pose3d_t  aVel 
)

Send a motor command for position control mode.

Specify the desired pose of the robot as a player_pose3d_t structure desired motion speed as a player_pose3d_t structure

void PlayerCc::Position3dProxy::RequestGeom ( )

Get the device's geometry; it is read into the relevant class attributes.

void PlayerCc::Position3dProxy::SelectVelocityControl ( int  aMode)

Select velocity control mode.

This is driver dependent.

void PlayerCc::Position3dProxy::SetMotorEnable ( bool  aEnable)

Enable/disable the motors.

Set state to 0 to disable or 1 to enable.

Attention:
Be VERY careful with this method! Your robot is likely to run across the room with the charger still attached.
void PlayerCc::Position3dProxy::SetOdometry ( double  aX,
double  aY,
double  aZ,
double  aRoll,
double  aPitch,
double  aYaw 
)

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.

void PlayerCc::Position3dProxy::SetSpeed ( double  aXSpeed,
double  aYSpeed,
double  aZSpeed,
double  aYawSpeed 
) [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.

References SetSpeed().

Referenced by SetSpeed().

Here is the call graph for this function:

void PlayerCc::Position3dProxy::SetSpeed ( double  aXSpeed,
double  aYSpeed,
double  aZSpeed,
double  aRollSpeed,
double  aPitchSpeed,
double  aYawSpeed 
)

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.

void PlayerCc::Position3dProxy::SetSpeed ( double  aXSpeed,
double  aYawSpeed 
) [inline]

Same as the previous SetSpeed(), but doesn't take the sideways speed (so use this one for non-holonomic robots).

References SetSpeed().

Referenced by SetSpeed().

Here is the call graph for this function:


The documentation for this class was generated from the following file: