Class blmc_drivers::Leg

class Leg : public blmc_drivers::LegInterface, public blmc_drivers::LegInterface

The leg class is the implementation of the LegInterface.

This is the decalartion and the definition of the class as it is very simple.

Public Functions

inline Leg(std::shared_ptr<MotorInterface> hip_motor, std::shared_ptr<MotorInterface> knee_motor)

Construct a new Leg object.

Parameters:
  • hip_motor – is the pointer to the hip motor

  • knee_motor – is the pointer to the knee motor

inline virtual ~Leg()

Destroy the Leg object.

inline virtual Ptr<const ScalarTimeseries> get_motor_measurement(const int &motor_index, const int &measurement_index) const

Getters.

Get the motor measurements.

Parameters:
  • motor_index

  • measurement_index

Returns:

Ptr<const ScalarTimeseries>

inline virtual Ptr<const ScalarTimeseries> get_current_target(const int &motor_index) const

Get the actual target current.

Parameters:

motor_index[in] designate the motor from which we want the data from.

Returns:

Ptr<const ScalarTimeseries> is the list of the lasts time stamped acquiered.

inline virtual Ptr<const ScalarTimeseries> get_sent_current_target(const int &motor_index) const

Get the last sent target current.

Parameters:

motor_index[in] designate the motor from which we want the data from.

Returns:

Ptr<const ScalarTimeseries> is the list of the lasts time stamped acquiered.

inline virtual void set_current_target(const double &current_target, const int &motor_index)

setters ================================================================

inline virtual void send_if_input_changed()

sender =================================================================

inline Leg(std::shared_ptr<MotorInterface> hip_motor, std::shared_ptr<MotorInterface> knee_motor)

Construct a new Leg object.

Parameters:
  • hip_motor – is the pointer to the hip motor

  • knee_motor – is the pointer to the knee motor

inline virtual ~Leg()

Destroy the Leg object.

inline virtual Ptr<const ScalarTimeseries> get_motor_measurement(const int &motor_index, const int &measurement_index) const

Getters.

Get the motor measurements.

Parameters:
  • motor_index

  • measurement_index

Returns:

Ptr<const ScalarTimeseries>

inline virtual Ptr<const ScalarTimeseries> get_current_target(const int &motor_index) const

Get the actual target current.

Parameters:

motor_index[in] designate the motor from which we want the data from.

Returns:

Ptr<const ScalarTimeseries> is the list of the lasts time stamped acquiered.

inline virtual Ptr<const ScalarTimeseries> get_sent_current_target(const int &motor_index) const

Get the last sent target current.

Parameters:

motor_index[in] designate the motor from which we want the data from.

Returns:

Ptr<const ScalarTimeseries> is the list of the lasts time stamped acquiered.

inline virtual void set_current_target(const double &current_target, const int &motor_index)

setters ================================================================

inline virtual void send_if_input_changed()

sender =================================================================