Represents a single MotorArray.
More...
#include <MotorArray.h>
Represents a single MotorArray.
rec::robotino::api2::MotorArray::MotorArray |
( |
| ) |
|
virtual rec::robotino::api2::MotorArray::~MotorArray |
( |
| ) |
|
|
virtual |
void rec::robotino::api2::MotorArray::actualPositions |
( |
int * |
readings | ) |
const |
Retrieves the actual position of this MotorArray.
Example:
for( int i=0; i<vec.size(); ++i )
{
std::cout << "actual position[" << i << "]: " << vec[i] << std::endl;
}
- Parameters
-
[out] | readings | Pass an array of size numMotors() to store actual positions of all motors |
- Exceptions
-
void rec::robotino::api2::MotorArray::actualVelocities |
( |
float * |
readings | ) |
const |
Retrieves the actual velocities of this MotorArray.
Example:
for( int i=0; i<vec.size(); ++i )
{
std::cout << "actual velocity[" << i << "]: " << vec[i] << " rpm" << std::endl;
}
- Parameters
-
[out] | readings | Pass an array of size numMotors() to store velocities of all motors in rpm. |
- Exceptions
-
virtual void rec::robotino::api2::MotorArray::currentsChangedEvent |
( |
const float * |
currents, |
|
|
unsigned int |
size |
|
) |
| |
|
virtual |
void rec::robotino::api2::MotorArray::motorCurrents |
( |
float * |
readings | ) |
const |
Retrieves the current of this MotorArray.
Example:
for( int i=0; i<vec.size(); ++i )
{
std::cout << "motor current[" << i << "]: " << vec[i] << " A" << std::endl;
}
- Parameters
-
[out] | readings | Pass an array of size numMotors() to store currents of all motors in A |
- Exceptions
-
static unsigned int rec::robotino::api2::MotorArray::numMotors |
( |
| ) |
|
|
static |
- Returns
- Returns the number of drive MotorArrays on Robotino
- Exceptions
-
virtual void rec::robotino::api2::MotorArray::positionsChangedEvent |
( |
const int * |
positions, |
|
|
unsigned int |
size |
|
) |
| |
|
virtual |
void rec::robotino::api2::MotorArray::setComId |
( |
const ComId & |
id | ) |
|
Sets the associated communication object.
- Parameters
-
id | The id of the associated communication object. |
- Exceptions
-
void rec::robotino::api2::MotorArray::setSpeedSetPoints |
( |
const float * |
speeds, |
|
|
unsigned int |
size |
|
) |
| |
Sets the setpoint speed of this MotorArray.
- Parameters
-
speeds | Array of set point speed in rpm for all motors. |
size | Size of speeds array. |
- Exceptions
-
virtual void rec::robotino::api2::MotorArray::velocitiesChangedEvent |
( |
const float * |
velocities, |
|
|
unsigned int |
size |
|
) |
| |
|
virtual |
The documentation for this class was generated from the following file:
- C:/srcs/git/openrobotino/api2/lib/rec/robotino/api2/MotorArray.h