Class blmc_drivers::LegInterface¶
-
class LegInterface : public blmc_drivers::DeviceInterface, public blmc_drivers::DeviceInterface¶
This class defines an interface to control a leg.
This legg is composed of 2 motor, one for the hip and one for the knee.
Subclassed by blmc_drivers::Leg, blmc_drivers::Leg
Public Types
-
enum MotorMeasurementIndexing¶
MotorMeasurementIndexing this enum allow to access the different kind of sensor measurements in an understandable way in the code.
Values:
-
enumerator current¶
-
enumerator position¶
-
enumerator velocity¶
-
enumerator encoder_index¶
-
enumerator motor_measurement_count¶
-
enumerator current
-
enumerator position
-
enumerator velocity
-
enumerator encoder_index
-
enumerator motor_measurement_count
-
enumerator current¶
-
enum MotorIndexing¶
This enum list the motors in the leg.
Values:
-
enumerator hip¶
-
enumerator knee¶
-
enumerator motor_count¶
-
enumerator hip
-
enumerator knee
-
enumerator motor_count
-
enumerator hip¶
-
enum MotorMeasurementIndexing
MotorMeasurementIndexing this enum allow to access the different kind of sensor measurements in an understandable way in the code.
Values:
-
enumerator current
-
enumerator position
-
enumerator velocity
-
enumerator encoder_index
-
enumerator motor_measurement_count
-
enumerator current
-
enumerator position
-
enumerator velocity
-
enumerator encoder_index
-
enumerator motor_measurement_count
-
enumerator current
-
enum MotorIndexing
This enum list the motors in the leg.
Values:
-
enumerator hip
-
enumerator knee
-
enumerator motor_count
-
enumerator hip
-
enumerator knee
-
enumerator motor_count
-
enumerator hip
-
typedef time_series::TimeSeries<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.
- Template Parameters:
Type – is the template paramer of the shared pointer.
-
typedef time_series::TimeSeries<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.
- Template Parameters:
Type – is the template paramer of the shared pointer.
Public Functions
-
inline virtual ~LegInterface()¶
Destroy the LegInterface object.
-
virtual Ptr<const ScalarTimeseries> get_motor_measurement(const int &motor_index, const int &measurement_index) const = 0¶
Getters.
Get the device output
- Parameters:
motor_index – [in] designate the motor from which we want the data from.
measurement_index – [in] is teh kind of data we are looking for.
- Returns:
Ptr<const ScalarTimeseries> is the list of the lasts time stamped acquiered.
-
virtual Ptr<const ScalarTimeseries> get_current_target(const int &motor_index) const = 0¶
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.
-
virtual Ptr<const ScalarTimeseries> get_sent_current_target(const int &motor_index) const = 0¶
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.
-
virtual void set_current_target(const double ¤t_target, const int &motor_index) = 0¶
Setters.
Set the current target saves internally the desired current. This data is not send to the motor yet. Please call send_if_input_changed in order to actually send the data to the card.
- Parameters:
current_target – is the current to achieve on the motor card.
motor_index – is the motor to control.
-
virtual void send_if_input_changed() = 0¶
Sender.
Actually send the target current to the motor cards.
-
inline virtual ~LegInterface()
Destroy the LegInterface object.
-
virtual Ptr<const ScalarTimeseries> get_motor_measurement(const int &motor_index, const int &measurement_index) const = 0
Getters.
Get the device output
- Parameters:
motor_index – [in] designate the motor from which we want the data from.
measurement_index – [in] is teh kind of data we are looking for.
- Returns:
Ptr<const ScalarTimeseries> is the list of the lasts time stamped acquiered.
-
virtual Ptr<const ScalarTimeseries> get_current_target(const int &motor_index) const = 0
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.
-
virtual Ptr<const ScalarTimeseries> get_sent_current_target(const int &motor_index) const = 0
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.
-
virtual void set_current_target(const double ¤t_target, const int &motor_index) = 0
Setters.
Set the current target saves internally the desired current. This data is not send to the motor yet. Please call send_if_input_changed in order to actually send the data to the card.
- Parameters:
current_target – is the current to achieve on the motor card.
motor_index – is the motor to control.
-
virtual void send_if_input_changed() = 0
Sender.
Actually send the target current to the motor cards.
-
enum MotorMeasurementIndexing¶