blmc_drivers
|
This class defines an interface to control a leg. More...
#include <leg.hpp>
Public Types | |
enum | MotorMeasurementIndexing { current, position, velocity, encoder_index, motor_measurement_count } |
MotorMeasurementIndexing this enum allow to access the different kind of sensor measurements in an understandable way in the code. | |
enum | MotorIndexing { hip, knee, motor_count } |
This enum list the motors in the leg. | |
typedef real_time_tools::ThreadsafeTimeseries< double > | ScalarTimeseries |
ScalarTimeseries is a simple shortcut for more intelligible code. | |
template<typename Type > | |
using | Ptr = std::shared_ptr< Type > |
This is a shortcut for creating shared pointer in a simpler writting expression. More... | |
Public Member Functions | |
virtual | ~LegInterface () |
Destroy the LegInterface object. | |
virtual Ptr< const ScalarTimeseries > | get_motor_measurement (const int &motor_index, const int &measurement_index) const =0 |
Getters. More... | |
virtual Ptr< const ScalarTimeseries > | get_current_target (const int &motor_index) const =0 |
Get the actual target current. More... | |
virtual Ptr< const ScalarTimeseries > | get_sent_current_target (const int &motor_index) const =0 |
Get the last sent target current. More... | |
virtual void | set_current_target (const double ¤t_target, const int &motor_index)=0 |
Setters. More... | |
virtual void | send_if_input_changed ()=0 |
Sender. More... | |
This class defines an interface to control a leg.
This legg is composed of 2 motor, one for the hip and one for the knee.
using blmc_drivers::LegInterface::Ptr = std::shared_ptr<Type> |
This is a shortcut for creating shared pointer in a simpler writting expression.
Type | is the template paramer of the shared pointer. |
|
pure virtual |
Get the actual target current.
[in] | motor_index | designate the motor from which we want the data from. |
Implemented in blmc_drivers::Leg.
|
pure virtual |
Getters.
Get the device output
[in] | motor_index | designate the motor from which we want the data from. |
[in] | measurement_index | is teh kind of data we are looking for. |
Implemented in blmc_drivers::Leg.
|
pure virtual |
Get the last sent target current.
[in] | motor_index | designate the motor from which we want the data from. |
Implemented in blmc_drivers::Leg.
|
pure virtual |
|
pure virtual |
Setters.
Set the current target saves internally the desired current. This data is not send to the motor yet. Please call send_if_input_changed in order to actually send the data to the card.
current_target | is the current to achieve on the motor card. |
motor_index | is the motor to control. |
Implemented in blmc_drivers::Leg.