4#include <units/angle.h>
5#include <units/angular_velocity.h>
9#include "rmb/motorcontrol/AngularPositionController.h"
32 units::radian_t tagrePosition =
33 std::clamp(position * inversion, minPosition, maxPosition);
34 return servo.SetAngle(units::degree_t(tagrePosition).to<double>());
43 return units::degree_t(servo.GetAngle() * inversion);
65 virtual void setInverted(
bool isInverted) { inversion = isInverted ? -1 : 1; }
77 virtual void disable() { servo.SetDisabled(); }
82 virtual void stop() { servo.SetDisabled(); }
87 units::radian_t minPosition = 0_deg;
88 units::radian_t maxPosition = 180_deg;
Definition AngularPositionController.h:19
Definition ServoPositionController.h:17
virtual units::radian_t getMinPosition() const
Definition ServoPositionController.h:51
virtual units::radian_t getTargetPosition() const
Definition ServoPositionController.h:42
virtual void stop()
Definition ServoPositionController.h:82
virtual void setInverted(bool isInverted)
Definition ServoPositionController.h:65
virtual units::radian_t getMaxPosition() const
Definition ServoPositionController.h:58
virtual bool getInverted() const
Definition ServoPositionController.h:72
virtual void setPosition(units::radian_t position)
Definition ServoPositionController.h:31
virtual void disable()
Definition ServoPositionController.h:77
the master namespace of librmb
Definition LogitechGamepad.h:9