RobotSystem-Lite
Loading...
Searching...
No Matches
actuator.h File Reference

Generic actuator control (measurement + actuation) functions. More...

#include "robot_control/robot_control.h"
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef struct _ActuatorData ActuatorData
 Single actuator internal data structure.
 
typedef ActuatorDataActuator
 Opaque reference to actuator internal data structure.
 

Functions

Actuator Actuator_Init (const char *configName)
 Creates and initializes actuator data structure based on given information.
 
void Actuator_End (Actuator actuator)
 Deallocates internal data of given actuator.
 
bool Actuator_Enable (Actuator actuator)
 Allows motor output on given actuator.
 
void Actuator_Disable (Actuator actuator)
 Prevents motor output on given actuator.
 
bool Actuator_SetControlState (Actuator actuator, enum ControlState controlState)
 Calls underlying sensors implementations (plugins) to change measurement state.
 
bool Actuator_GetMeasures (Actuator actuator, DoFVariables *ref_measures, double timeDelta)
 Reads sensors of given actuator.
 
double Actuator_SetSetpoints (Actuator actuator, DoFVariables *ref_setpoints)
 Writes possible motor setpoint values for given actuator.
 

Detailed Description

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.

Function Documentation

◆ Actuator_Disable()

void Actuator_Disable ( Actuator actuator)

Prevents motor output on given actuator.

Parameters
[in]actuatorreference to actuator

◆ Actuator_Enable()

bool Actuator_Enable ( Actuator actuator)

Allows motor output on given actuator.

Parameters
[in]actuatorreference to actuator
Returns
true on enabled output, false otherwise

◆ Actuator_End()

void Actuator_End ( Actuator actuator)

Deallocates internal data of given actuator.

Parameters
[in]actuatorreference to actuator

◆ Actuator_GetMeasures()

bool Actuator_GetMeasures ( Actuator actuator,
DoFVariables * ref_measures,
double timeDelta )

Reads sensors of given actuator.

Parameters
[in]actuatorreference to actuator
[out]ref_measurespointer to variables structure where values will be stored
[in]timeDeltatime 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
[in]configNamename of file containing configuration parameters, as explained at Actuator Configuration
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]actuatorreference to actuator
[in]controlStatenew 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]actuatorreference to actuator
[in]ref_setpointspointer/reference to variables structure with the new setpoints
Returns
control action applied on motor of given actuator (control variable specified in Actuator Configuration)