Robot Control Interface
Classes | Macros | Typedefs | Enumerations
robot_control.h File Reference

Generic robot control functions. More...

#include <math.h>
#include "plugin_loader/loader_macros.h"

Go to the source code of this file.

Classes

struct  DoFVariables
 Control used variables list indexes enumeration. More...
 

Macros

#define M_PI   3.14159
 Defines mathematical Pi value if standard math.h one is not available.
 
#define ROBOT_CONTROL_INTERFACE(Interface, INIT_FUNCTION)
 Robot control interface declaration macro, using Plug-in Loader convention. More...
 

Typedefs

typedef struct DoFVariables DoFVariables
 Control used variables list indexes enumeration.
 

Enumerations

enum  ControlState {
  CONTROL_PASSIVE, CONTROL_OFFSET, CONTROL_CALIBRATION, CONTROL_PREPROCESSING,
  CONTROL_OPERATION, CONTROL_STATES_NUMBER
}
 Defined possible control states enumeration. Passed to generic or plugin specific robot control implementations. More...
 

Detailed Description

Generic robot control functions.

Common robot control interface to be implemented by device specific plugins Considers 2 different coordinate/degree-of-freedom sets: joints and axes (for a detailed explanation, see [The Joint/Axis Rationale]())

Macro Definition Documentation

◆ ROBOT_CONTROL_INTERFACE

#define ROBOT_CONTROL_INTERFACE (   Interface,
  INIT_FUNCTION 
)
Value:
INIT_FUNCTION( bool, Interface, InitController, const char* ) \
INIT_FUNCTION( void, Interface, EndController, void ) \
INIT_FUNCTION( size_t, Interface, GetJointsNumber, void ) \
INIT_FUNCTION( const char**, Interface, GetJointNamesList, void ) \
INIT_FUNCTION( size_t, Interface, GetAxesNumber, void ) \
INIT_FUNCTION( const char**, Interface, GetAxisNamesList, void ) \
INIT_FUNCTION( void, Interface, SetControlState, enum ControlState ) \
INIT_FUNCTION( void, Interface, RunControlStep, DoFVariables**, DoFVariables**, DoFVariables**, DoFVariables**, double ) \
INIT_FUNCTION( size_t, Interface, GetExtraInputsNumber, void ) \
INIT_FUNCTION( void, Interface, SetExtraInputsList, double* ) \
INIT_FUNCTION( size_t, Interface, GetExtraOutputsNumber, void ) \
INIT_FUNCTION( void, Interface, GetExtraOutputsList, double* )

Robot control interface declaration macro, using Plug-in Loader convention.

Enumeration Type Documentation

◆ ControlState

Defined possible control states enumeration. Passed to generic or plugin specific robot control implementations.

Enumerator
CONTROL_PASSIVE 

State for fully compliant robot control/behaviour.

CONTROL_OFFSET 

State for definition of reference (zero) for controller measurements.

CONTROL_CALIBRATION 

State for definition of limits (min-max) for controller measurements.

CONTROL_PREPROCESSING 

State for custom automatic preprocessing of controller parameters.

CONTROL_OPERATION 

State for normal controller operation.

CONTROL_STATES_NUMBER 

Total number of control states.

ROBOT_CONTROL_INTERFACE::GetExtraOutputsList
void GetExtraOutputsList(double *outputsList)
Get list of additional outputs from the last robot control step.
ROBOT_CONTROL_INTERFACE::GetJointsNumber
size_t GetJointsNumber(void)
Get plugin specific number of joint coordinates/degrees-of-freedom.
ROBOT_CONTROL_INTERFACE::RunControlStep
void RunControlStep(DoFVariables **jointMeasuresList, DoFVariables **axisMeasuresList, DoFVariables **jointSetpointsList, DoFVariables **axisSetpointsList, double timeDelta)
Calls plugin specific logic to process single control pass and joints/axes coordinate conversions.
ROBOT_CONTROL_INTERFACE::SetControlState
void SetControlState(enum ControlState controlState)
Pass control state to trigger possible plugin specific behaviour.
ROBOT_CONTROL_INTERFACE::EndController
void EndController(void)
Calls plugin specific robot controller data deallocation
DoFVariables
Control used variables list indexes enumeration.
Definition: robot_control.h:51
ROBOT_CONTROL_INTERFACE::GetAxisNamesList
const char ** GetAxisNamesList(void)
Get plugin specific names of all axes.
ROBOT_CONTROL_INTERFACE::GetExtraInputsNumber
size_t GetExtraInputsNumber(void)
Get number of additional inputs needed for the robot control.
ControlState
ControlState
Defined possible control states enumeration. Passed to generic or plugin specific robot control imple...
Definition: robot_control.h:40
ROBOT_CONTROL_INTERFACE::GetAxesNumber
size_t GetAxesNumber(void)
Get plugin specific number of axis coordinates/degrees-of-freedom.
ROBOT_CONTROL_INTERFACE::GetJointNamesList
const char ** GetJointNamesList(void)
Get plugin specific names of all joints.
ROBOT_CONTROL_INTERFACE::InitController
bool InitController(const char *configurationString)
Calls plugin specific robot controller initialization
ROBOT_CONTROL_INTERFACE::SetExtraInputsList
void SetExtraInputsList(double *inputsList)
Set list of additional inputs for the next robot control step.
ROBOT_CONTROL_INTERFACE::GetExtraOutputsNumber
size_t GetExtraOutputsNumber(void)
Get number of additional outputs provided by the robot control.