|
blmc_drivers
|
The leg class is the implementation of the LegInterface. More...
#include <leg.hpp>


Public Member Functions | |
| Leg (std::shared_ptr< MotorInterface > hip_motor, std::shared_ptr< MotorInterface > knee_motor) | |
| Construct a new Leg object. More... | |
| virtual | ~Leg () |
| Destroy the Leg object. | |
| virtual Ptr< const ScalarTimeseries > | get_motor_measurement (const int &motor_index, const int &measurement_index) const |
| Getters. More... | |
| virtual Ptr< const ScalarTimeseries > | get_current_target (const int &motor_index) const |
| Get the actual target current. More... | |
| virtual Ptr< const ScalarTimeseries > | get_sent_current_target (const int &motor_index) const |
| Get the last sent target current. More... | |
| virtual void | set_current_target (const double ¤t_target, const int &motor_index) |
| setters ================================================================ | |
| virtual void | send_if_input_changed () |
| sender ================================================================= | |
Public Member Functions inherited from blmc_drivers::LegInterface | |
| virtual | ~LegInterface () |
| Destroy the LegInterface object. | |
Private Attributes | |
| std::array< std::shared_ptr< MotorInterface >, 2 > | motors_ |
| ======================================================================== More... | |
Additional Inherited Members | |
Public Types inherited from blmc_drivers::LegInterface | |
| 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... | |
The leg class is the implementation of the LegInterface.
This is the decalartion and the definition of the class as it is very simple.
|
inline |
Construct a new Leg object.
| hip_motor | is the pointer to the hip motor |
| knee_motor | is the pointer to the knee motor |
|
inlinevirtual |
Get the actual target current.
| [in] | motor_index | designate the motor from which we want the data from. |
Implements blmc_drivers::LegInterface.
|
inlinevirtual |
Getters.
Get the motor measurements.
| motor_index | |
| measurement_index |
Implements blmc_drivers::LegInterface.
|
inlinevirtual |
Get the last sent target current.
| [in] | motor_index | designate the motor from which we want the data from. |
Implements blmc_drivers::LegInterface.
|
private |
========================================================================
This list contains pointers to two motors. This motors are respectively the hip and the knee of the leg.