blmc_drivers
|
This class declares an interface to the motor. More...
#include <motor.hpp>
Public Types | |
enum | MeasurementIndex { current, position, velocity, encoder_index, measurement_count } |
Here is a list of the different measurement available on the blmc card. | |
typedef real_time_tools::ThreadsafeTimeseries< double > | ScalarTimeseries |
This is a useful alias. | |
template<typename Type > | |
using | Ptr = std::shared_ptr< Type > |
This a useful alias for the shared Pointer creation. More... | |
Public Member Functions | |
virtual | ~MotorInterface () |
Destroy the MotorInterface object. | |
virtual void | send_if_input_changed ()=0 |
Actually send the commands and controls. | |
virtual Ptr< const ScalarTimeseries > | get_measurement (const int &index=0) const =0 |
Getters. More... | |
virtual Ptr< const ScalarTimeseries > | get_current_target () const =0 |
Get the current target object. More... | |
virtual Ptr< const ScalarTimeseries > | get_sent_current_target () const =0 |
Get the history of the sent current targets. More... | |
virtual void | set_current_target (const double ¤t_target)=0 |
Setters. More... | |
virtual void | set_command (const MotorBoardCommand &command)=0 |
Set the command. More... | |
This class declares an interface to the motor.
It allows the user to access the sensors data as well as sending controls. The only control supported for now is the current.
using blmc_drivers::MotorInterface::Ptr = std::shared_ptr<Type> |
This a useful alias for the shared Pointer creation.
Type | is the Class to crate the pointer from. |
|
pure virtual |
Get the current target object.
Implemented in blmc_drivers::SafeMotor, and blmc_drivers::Motor.
|
pure virtual |
Getters.
Get the measurements.
index |
Implemented in blmc_drivers::Motor.
|
pure virtual |
Get the history of the sent current targets.
Implemented in blmc_drivers::Motor.
|
pure virtual |
Set the command.
Save internally a command to be apply by the motor board. This function save the command internally. Please call send_if_input_changed() to actually send the data.
command |
Implemented in blmc_drivers::Motor.
|
pure virtual |
Setters.
Set the current target. This function saves the data internally. Please call send_if_input_changed() to actually send the data.
current_target |
Implemented in blmc_drivers::SafeMotor, and blmc_drivers::Motor.