|
blmc_drivers
|
This class implements the MotorInterface. More...
#include <motor.hpp>


Public Member Functions | |
| Motor (Ptr< MotorBoardInterface > board, bool motor_id) | |
| Construct a new Motor object. More... | |
| virtual | ~Motor () |
| Destroy the Motor object. More... | |
| virtual void | send_if_input_changed () |
| Actually send the command and controls via the network, See MotorInterface for more information. | |
| virtual Ptr< const ScalarTimeseries > | get_measurement (const int &index=0) const |
| Getters. More... | |
| virtual Ptr< const ScalarTimeseries > | get_current_target () const |
| Get the current target to be sent. More... | |
| virtual Ptr< const ScalarTimeseries > | get_sent_current_target () const |
| Get the already sent current target values. More... | |
| virtual void | set_current_target (const double ¤t_target) |
| Setters. More... | |
| virtual void | set_command (const MotorBoardCommand &command) |
| Set the command. More... | |
| virtual void | print () const |
| Print the motor status and state. More... | |
Public Member Functions inherited from blmc_drivers::MotorInterface | |
| virtual | ~MotorInterface () |
| Destroy the MotorInterface object. | |
Protected Attributes | |
| Ptr< MotorBoardInterface > | board_ |
| The MotorBoard to be used for the communication. | |
| bool | motor_id_ |
| The id of the motor on the MotorBoard. | |
Additional Inherited Members | |
Public Types inherited from blmc_drivers::MotorInterface | |
| 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... | |
This class implements the MotorInterface.
| blmc_drivers::Motor::Motor | ( | Ptr< MotorBoardInterface > | board, |
| bool | motor_id | ||
| ) |
Construct a new Motor object.
| board | is the MotorBoard to be used. |
| motor_id | is the id of the motor on the on-board card |
|
inlinevirtual |
Destroy the Motor object.
|
virtual |
Get the current target to be sent.
Implements blmc_drivers::MotorInterface.
Reimplemented in blmc_drivers::SafeMotor.
|
virtual |
Getters.
Get the measurements
| index | is the kind of measurement we are instersted in. see MotorInterface::MeasurementIndex. |
Implements blmc_drivers::MotorInterface.
|
virtual |
Get the already sent current target values.
Implements blmc_drivers::MotorInterface.
|
virtual |
Print the motor status and state.
|
inlinevirtual |
Set the command.
See MotorInterface for more information.
| command |
Implements blmc_drivers::MotorInterface.
|
virtual |
Setters.
Set the current (Ampere) target. See MotorInterface for more information.
| current_target | in Ampere |
Implements blmc_drivers::MotorInterface.
Reimplemented in blmc_drivers::SafeMotor.