The Position1dProxy
class is used to control a position1d device.
More...
#include <playerc++.h>
Public Member Functions | |
Position1dProxy (PlayerClient *aPc, uint32_t aIndex=0) | |
constructor | |
~Position1dProxy () | |
destructor | |
void | SetSpeed (double aVel) |
Send a motor command for velocity control mode. | |
void | GoTo (double aPos, double aVel) |
Send a motor command for position control mode. | |
void | RequestGeom () |
Get the device's geometry; it is read into the relevant class attributes. | |
player_pose3d_t | GetPose () const |
Accessor for the pose (fill it in by calling RequestGeom) | |
player_bbox3d_t | GetSize () const |
Accessor for the size (fill it in by calling RequestGeom) | |
void | SetMotorEnable (bool enable) |
Enable/disable the motors. | |
void | SetOdometry (double aPos) |
Sets the odometry to the pose aPos . | |
void | ResetOdometry () |
Reset odometry to 0. | |
double | GetPos () const |
Set PID terms. | |
double | GetVel () const |
Accessor method. | |
bool | GetStall () const |
Accessor method. | |
uint8_t | GetStatus () const |
Accessor method. | |
bool | IsLimitMin () const |
Accessor method. | |
bool | IsLimitCen () const |
Accessor method. | |
bool | IsLimitMax () const |
Accessor method. | |
bool | IsOverCurrent () const |
Accessor method. | |
bool | IsTrajComplete () const |
Accessor method. | |
bool | IsEnabled () const |
Accessor method. | |
Private Member Functions | |
void | Subscribe (uint32_t aIndex) |
void | Unsubscribe () |
Private Attributes | |
playerc_position1d_t * | mDevice |
Detailed Description
The Position1dProxy
class is used to control a position1d device.
The latest position data is contained in the attributes pos, vel , etc.
Member Function Documentation
double PlayerCc::Position1dProxy::GetPos | ( | ) | const [inline] |
Set PID terms.
Set PID terms Set speed ramping profile spd rad/s, acc rad/s/s Accessor method
void PlayerCc::Position1dProxy::GoTo | ( | double | aPos, |
double | aVel | ||
) |
Send a motor command for position control mode.
Specify the desired pose of the robot in [m] or [rad] desired motion in [m/s] or [rad/s]
void PlayerCc::Position1dProxy::RequestGeom | ( | ) |
Get the device's geometry; it is read into the relevant class attributes.
void PlayerCc::Position1dProxy::SetMotorEnable | ( | bool | enable | ) |
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.
void PlayerCc::Position1dProxy::SetOdometry | ( | double | aPos | ) |
Sets the odometry to the pose aPos
.
- Note:
- aPos is in either [m] or [rad] depending on the actuator type
void PlayerCc::Position1dProxy::SetSpeed | ( | double | aVel | ) |
Send a motor command for velocity control mode.
Specify the forward, sideways, and angular speeds in m/sec, m/sec, and radians/sec, respectively.
The documentation for this class was generated from the following file: