RobotSystem-Lite
Loading...
Searching...
No Matches
actuator.h
Go to the documentation of this file.
1
2// //
3// Copyright (c) 2016-2025 Leonardo Consoni <leonardojc@protonmail.com> //
4// //
5// This file is part of RobotSystem-Lite. //
6// //
7// RobotSystem-Lite is free software: you can redistribute it and/or modify //
8// it under the terms of the GNU Lesser General Public License as published //
9// by the Free Software Foundation, either version 3 of the License, or //
10// (at your option) any later version. //
11// //
12// RobotSystem-Lite is distributed in the hope that it will be useful, //
13// but WITHOUT ANY WARRANTY; without even the implied warranty of //
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
15// GNU Lesser General Public License for more details. //
16// //
17// You should have received a copy of the GNU Lesser General Public License //
18// along with RobotSystem-Lite. If not, see <http://www.gnu.org/licenses/>. //
19// //
21
22
28
60
61
62#ifndef ACTUATOR_H
63#define ACTUATOR_H
64
65#include "robot_control/robot_control.h"
66
67#include <stdbool.h>
68
69typedef struct _ActuatorData ActuatorData;
71
72
76Actuator Actuator_Init( const char* configName );
77
80void Actuator_End( Actuator actuator );
81
85bool Actuator_Enable( Actuator actuator );
86
89void Actuator_Disable( Actuator actuator );
90
95bool Actuator_SetControlState( Actuator actuator, enum ControlState controlState );
96
102bool Actuator_GetMeasures( Actuator actuator, DoFVariables* ref_measures, double timeDelta );
103
108double Actuator_SetSetpoints( Actuator actuator, DoFVariables* ref_setpoints );
109
110
111#endif // ACTUATOR_H
bool Actuator_Enable(Actuator actuator)
Allows motor output on given actuator.
void Actuator_End(Actuator actuator)
Deallocates internal data of given actuator.
double Actuator_SetSetpoints(Actuator actuator, DoFVariables *ref_setpoints)
Writes possible motor setpoint values for given actuator.
struct _ActuatorData ActuatorData
Single actuator internal data structure.
Definition actuator.h:69
Actuator Actuator_Init(const char *configName)
Creates and initializes actuator data structure based on given information.
bool Actuator_GetMeasures(Actuator actuator, DoFVariables *ref_measures, double timeDelta)
Reads sensors of given actuator.
void Actuator_Disable(Actuator actuator)
Prevents motor output on given actuator.
ActuatorData * Actuator
Opaque reference to actuator internal data structure.
Definition actuator.h:70
bool Actuator_SetControlState(Actuator actuator, enum ControlState controlState)
Calls underlying sensors implementations (plugins) to change measurement state.