Access to Robotino's (optional) Grappler.
More...
#include <Grappler.h>
Access to Robotino's (optional) Grappler.
Get the current info. Readings contain
channels
The channel of the servo found.
ids
The servos id.
cwAxesLimits
The servos clockwise axis limit.
ccwAxesLimits
The servos counter-clockwise axis limit.
- Returns
- Grappler servo info.
- Exceptions
-
void rec::robotino::api2::Grappler::processEvents |
( |
| ) |
|
Call this function from your main thread to get the virtual Grappler functions called. The virtual functions are called directly by a call of this function
- Exceptions
-
Get the current readings.
- Returns
- Grappler readings.
channels
The channel of the servo found.
ids
The servos id.
angles
The servos current angle.
speeds
The servos current speed.
errors
The servos current error (if any).
- Exceptions
-
bool rec::robotino::api2::Grappler::setAxes |
( |
const float * |
angles, |
|
|
unsigned int |
anglesSize, |
|
|
const float * |
speeds, |
|
|
unsigned int |
speedsSize |
|
) |
| |
Set position and speed set-points for all axes.
- Parameters
-
angles | These are the position set-points in deg for all axes |
anglesSize | The size of the angles array |
speeds | These are the speed set-points in rpm for all axes |
speedsSize | The size of the speeds array |
- Returns
- Returns true on success. Returns false if
- anglesSize != speedsSize
- anglesSize >= number of servos detected
- Exceptions
-
bool rec::robotino::api2::Grappler::setAxis |
( |
unsigned int |
axis, |
|
|
float |
angle, |
|
|
float |
speed |
|
) |
| |
Set position and speed set-point for one axis.
- Parameters
-
axis | Axis number. Axes are counted starting with 0. |
angle | This is the position set-point in deg |
speed | This is the speed set-point in rpm |
- Returns
- Returns true on success. Returns false if axis is out of range.
- Exceptions
-
void rec::robotino::api2::Grappler::setComId |
( |
const ComId & |
id | ) |
|
Sets the associated communication object.
- Parameters
-
id | The id of the associated communication object. |
- Exceptions
-
bool rec::robotino::api2::Grappler::setPowerEnabled |
( |
unsigned int |
channel, |
|
|
bool |
enable |
|
) |
| |
Enable/Disable power of a servo channel
- Parameters
-
channel |
- 0 - RX64
- 1 - RX28
- 2 - RX10
|
enable | True - enable False - disable |
- Returns
- Returns true on success. Returns false if channel is out of range, i.e. > 2.
- Exceptions
-
void rec::robotino::api2::Grappler::toggleTorque |
( |
| ) |
|
Toggle the servo torque status.
- Exceptions
-
virtual void rec::robotino::api2::Grappler::toggleTorqueEvent |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following file:
- C:/srcs/git/openrobotino/api2/lib/rec/robotino/api2/Grappler.h