Generic actuator control (measurement + actuation) functions.
More...
#include "robot_control/robot_control.h"
#include <stdbool.h>
Go to the source code of this file.
|
typedef struct _ActuatorData | ActuatorData |
| Single actuator internal data structure.
|
|
typedef ActuatorData * | Actuator |
| Opaque reference to actuator internal data structure.
|
|
Generic actuator control (measurement + actuation) functions.
Interface for configurable actuator control. Available configuration options are detailed in Actuator Configuration. Every actuator contains a single motor and a set of sensors combined with a Kalman filter for motion measurements (see Configuration Levels.
◆ Actuator_Disable()
void Actuator_Disable |
( |
Actuator | actuator | ) |
|
Prevents motor output on given actuator.
- Parameters
-
[in] | actuator | reference to actuator |
◆ Actuator_Enable()
bool Actuator_Enable |
( |
Actuator | actuator | ) |
|
Allows motor output on given actuator.
- Parameters
-
[in] | actuator | reference to actuator |
- Returns
- true on enabled output, false otherwise
◆ Actuator_End()
Deallocates internal data of given actuator.
- Parameters
-
[in] | actuator | reference to actuator |
◆ Actuator_GetMeasures()
bool Actuator_GetMeasures |
( |
Actuator | actuator, |
|
|
DoFVariables * | ref_measures, |
|
|
double | timeDelta ) |
Reads sensors of given actuator.
- Parameters
-
[in] | actuator | reference to actuator |
[out] | ref_measures | pointer to variables structure where values will be stored |
[in] | timeDelta | time passed between measurements for sensor filtering/fusion state prediction |
- Returns
- true if new measurements were taken, false otherwise
◆ Actuator_Init()
Actuator Actuator_Init |
( |
const char * | configName | ) |
|
Creates and initializes actuator data structure based on given information.
- Parameters
-
- Returns
- reference/pointer to newly created and initialized actuator data structure
◆ Actuator_SetControlState()
bool Actuator_SetControlState |
( |
Actuator | actuator, |
|
|
enum ControlState | controlState ) |
Calls underlying sensors implementations (plugins) to change measurement state.
- Parameters
-
[in] | actuator | reference to actuator |
[in] | controlState | new control state to be set |
- Returns
- true if control state was changed, false otherwise
◆ Actuator_SetSetpoints()
double Actuator_SetSetpoints |
( |
Actuator | actuator, |
|
|
DoFVariables * | ref_setpoints ) |
Writes possible motor setpoint values for given actuator.
- Parameters
-
[in] | actuator | reference to actuator |
[in] | ref_setpoints | pointer/reference to variables structure with the new setpoints |
- Returns
- control action applied on motor of given actuator (control variable specified in Actuator Configuration)