Generic robot functions.
More...
#include "robot_control/robot_control.h"
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
|
bool | Robot_Init (const char *configPathName) |
| Creates and initializes robot data structure based on given information.
|
|
void | Robot_End () |
| Deallocates internal data of given robot.
|
|
bool | Robot_Enable () |
| Initializes (if not running) update/operation thread for the given robot.
|
|
bool | Robot_Disable () |
| Terminates (if running) update/operation thread for the given robot.
|
|
bool | Robot_SetControlState (enum ControlState controlState) |
| Change control state of given robot actuators and underlying (plugin) control implementation.
|
|
const char * | Robot_GetJointName (size_t jointIndex) |
| Calls underlying (plugin) implementation to get string identifier for specified joint in given robot.
|
|
const char * | Robot_GetAxisName (size_t axisIndex) |
| Calls underlying (plugin) implementation to get string identifier for specified axis in given robot.
|
|
bool | Robot_GetJointMeasures (size_t jointIndex, DoFVariables *ref_measures) |
| Gets current value of specified joint measurements (see joint_axis_rationale)
|
|
bool | Robot_GetAxisMeasures (size_t axisIndex, DoFVariables *ref_measures) |
| Gets current value of specified axis measurements (see joint_axis_rationale)
|
|
void | Robot_SetAxisSetpoints (size_t axisIndex, DoFVariables *ref_setpoints) |
| Sets value of specified setpoint for given axis.
|
|
size_t | Robot_GetJointsNumber () |
| Calls underlying (plugin) implementation to get number of joint degrees-of-freedom for given robot.
|
|
size_t | Robot_GetAxesNumber () |
| Calls underlying (plugin) implementation to get number of axis degrees-of-freedom for given robot.
|
|
Generic robot functions.
Interface for configurable robot control. Specific underlying implementation (plug-in) and further configuration are defined as explained in Robot Configuration. A robot works with 2 sets of coordinates: axes (read-write) and joints (read-only). For a detailed explanation, see joint_axis_rationale. Even if RobotSystem handles one robot at a time, this code supports multiple robots for reusage in different applications.
◆ Robot_Disable()
Terminates (if running) update/operation thread for the given robot.
- Returns
- true if control state was changed, false otherwise
◆ Robot_Enable()
Initializes (if not running) update/operation thread for the given robot.
- Returns
- true if control state was changed, false otherwise
◆ Robot_GetAxesNumber()
size_t Robot_GetAxesNumber |
( |
| ) |
|
Calls underlying (plugin) implementation to get number of axis degrees-of-freedom for given robot.
- Returns
- number of axis degrees-of-freedom
◆ Robot_GetAxisMeasures()
bool Robot_GetAxisMeasures |
( |
size_t | axisIndex, |
|
|
DoFVariables * | ref_measures ) |
Gets current value of specified axis measurements (see joint_axis_rationale)
- Parameters
-
[in] | axisIndex | index of robot axis (in the order listed on robot's configuration) |
[out] | ref_measures | pointer/reference to variables structure where values will be stored |
- Returns
- true on if new values were acquired, false otherwise
◆ Robot_GetAxisName()
const char * Robot_GetAxisName |
( |
size_t | axisIndex | ) |
|
Calls underlying (plugin) implementation to get string identifier for specified axis in given robot.
- Parameters
-
[in] | axisIndex | index of robot axis (in the order listed on robot's configuration) |
- Returns
- pointer to string of robot axis name (NULL on errors or no axis of specified index)
◆ Robot_GetJointMeasures()
bool Robot_GetJointMeasures |
( |
size_t | jointIndex, |
|
|
DoFVariables * | ref_measures ) |
Gets current value of specified joint measurements (see joint_axis_rationale)
- Parameters
-
[in] | jointIndex | index of robot axis (in the order listed on robot's configuration) |
[out] | ref_measures | pointer/reference to variables structure where values will be stored |
- Returns
- true on if new values were acquired, false otherwise
◆ Robot_GetJointName()
const char * Robot_GetJointName |
( |
size_t | jointIndex | ) |
|
Calls underlying (plugin) implementation to get string identifier for specified joint in given robot.
- Parameters
-
[in] | jointIndex | index of robot joint (in the order listed on robot's configuration) |
- Returns
- pointer to string of robot joint name (NULL on errors or no joint of specified index)
◆ Robot_GetJointsNumber()
size_t Robot_GetJointsNumber |
( |
| ) |
|
Calls underlying (plugin) implementation to get number of joint degrees-of-freedom for given robot.
- Returns
- number of joint degrees-of-freedom
◆ Robot_Init()
bool Robot_Init |
( |
const char * | configPathName | ) |
|
Creates and initializes robot data structure based on given information.
- Parameters
-
- Returns
- true on successful initialization, false otherwise
◆ Robot_SetAxisSetpoints()
void Robot_SetAxisSetpoints |
( |
size_t | axisIndex, |
|
|
DoFVariables * | ref_setpoints ) |
Sets value of specified setpoint for given axis.
- Parameters
-
[in] | axisIndex | index of robot axis (in the order listed on robot's configuration) |
[in] | ref_setpoints | pointer/reference to variables structure with the new setpoints |
◆ Robot_SetControlState()
bool Robot_SetControlState |
( |
enum ControlState | controlState | ) |
|
Change control state of given robot actuators and underlying (plugin) control implementation.
- Parameters
-
[in] | controlState | new control state to be set |
- Returns
- true if control state was changed, false otherwise