class
PositionToTorqueControllerPosition-to-torque Controller.
The PositionToTorqueController implements a position control strategy that directly computes joint torque commands from position errors.
The controller implements a proportional-derivative position control law:
where:
- is the output torque [Nm]
- is the proportional gain [Nm/rad]
- is the derivative gain [Nm/(rad/s)]
- is the reference position [rad]
- is the feedback position [rad]
- is the feedback velocity [rad/s]
Base classes
- class PositionToJointController
- Base class for Position-to-Joint Controllers.
Constructors, destructors, conversion operators
- PositionToTorqueController()
- Default constructor.
- ~PositionToTorqueController() virtual
- Default destructor.
Public functions
- auto advance() -> bool override
- Advance the controller.
-
auto initialize(std::weak_ptr<const ParametersHandler::
IParametersHandler> handler) -> bool override - Initialize the advanceable.
- auto setInput(const PositionToJointControllerInput& input) -> bool override
- Set the input of the port.
- auto getOutput() const -> Eigen::VectorXd& override
- Get the output of the controller.
- auto isOutputValid() const -> bool override
- Check if the output is valid.
Function documentation
bool BipedalLocomotion:: JointLevelControllers:: PositionToTorqueController:: advance() override
Advance the controller.
Returns | The output of the controller |
---|
bool BipedalLocomotion:: JointLevelControllers:: PositionToTorqueController:: initialize(std::weak_ptr<const ParametersHandler:: IParametersHandler> handler) override
Initialize the advanceable.
Parameters | |
---|---|
handler | A weak pointer to the parameters handler |
Returns | True if the initialization is successful. |
Furthermore, the following optional parameters are supported:
Group Name | Description | Mandatory |
---|---|---|
torque_limit | An element for each joint contained in the joints_list parameter. Torque limit for each joint [Nm] | No |
bool BipedalLocomotion:: JointLevelControllers:: PositionToTorqueController:: setInput(const PositionToJointControllerInput& input) override
Set the input of the port.
Parameters | |
---|---|
input | the input of the controller |
Returns | True in case of success and false otherwise |
Eigen::VectorXd& BipedalLocomotion:: JointLevelControllers:: PositionToTorqueController:: getOutput() const override
Get the output of the controller.
Returns | The output of the controller |
---|
bool BipedalLocomotion:: JointLevelControllers:: PositionToTorqueController:: isOutputValid() const override
Check if the output is valid.
Returns | True if the output is valid, false otherwise |
---|