Class blmc_drivers::SafeMotor¶
-
class SafeMotor : public blmc_drivers::Motor, public blmc_drivers::Motor¶
This class is a safe implementation of the Motor class.
It contains utilities to bound the control input. It could also contains some velocity limits at the motor level and why not some temperature management.
- Todo:
the velocity limit should be implemented in a smoother way, and the parameters should be passed in the constructor.
It contains utilities to bound the control input. It could also contains some velocity limits at the motor level and why not some temperature management.
- Todo:
the velocity limit should be implemented in a smoother way, and the parameters should be passed in the constructor.
Public Functions
-
SafeMotor(Ptr<MotorBoardInterface> board, bool motor_id, const double &max_current_target = 2.0, const size_t &history_length = 1000, const double &max_velocity = std::numeric_limits<double>::quiet_NaN())¶
Construct a new SafeMotor object.
- Parameters:
board –
motor_id –
max_current_target –
history_length –
-
inline virtual Ptr<const ScalarTimeseries> get_current_target() const¶
Getters.
Get the _current_target object
- Returns:
Ptr<const ScalarTimeseries>
-
virtual void set_current_target(const double ¤t_target)¶
Setters.
Set the current target (Ampere)
- Parameters:
current_target –
-
inline void set_max_current(double max_current_target)¶
Set the max_current_target_ object.
- Parameters:
max_current_target –
-
inline void set_max_velocity(double max_velocity)¶
Set the max_velocity_ constant.
- Parameters:
max_velocity –
-
SafeMotor(Ptr<MotorBoardInterface> board, bool motor_id, const double &max_current_target = 2.0, const size_t &history_length = 1000, const double &max_velocity = std::numeric_limits<double>::quiet_NaN())
Construct a new SafeMotor object.
- Parameters:
board –
motor_id –
max_current_target –
history_length –
-
inline virtual Ptr<const ScalarTimeseries> get_current_target() const
Getters.
Get the _current_target object
- Returns:
Ptr<const ScalarTimeseries>
-
virtual void set_current_target(const double ¤t_target)
Setters.
Set the current target (Ampere)
- Parameters:
current_target –
-
inline void set_max_current(double max_current_target)
Set the max_current_target_ object.
- Parameters:
max_current_target –
-
inline void set_max_velocity(double max_velocity)
Set the max_velocity_ constant.
- Parameters:
max_velocity –