YarpRobotControl class
YarpRobotControl Yarp implementation of the IRobotControl interface.
Base classes
- class IRobotControl
- Robot control interface.
Constructors, destructors, conversion operators
- YarpRobotControl()
- Constructor.
- ~YarpRobotControl()
- Destructor.
Public functions
-
auto initialize(std::weak_ptr<ParametersHandler::
IParametersHandler> handler) -> bool final - Initialize the Interface.
- auto setDriver(std::shared_ptr<yarp::dev::PolyDriver> robotDevice) -> bool
- Set the driver required to control the robot.
- auto checkMotionDone(bool& motionDone, bool& isTimeExpired, std::vector<std::pair<std::string, double>>& info) -> bool final
- Check if the motion set through the position control mode ended.
-
auto setControlMode(const std::vector<IRobotControl::
ControlMode>& controlModes) -> bool final - Set the control mode.
-
auto setControlMode(const IRobotControl::
ControlMode& mode) -> bool final - Set the desired control mode.
-
auto setReferences(Eigen::Ref<const Eigen::VectorXd> jointValues,
const std::vector<IRobotControl::
ControlMode>& controlModes) -> bool final - Set the desired reference.
-
auto setReferences(Eigen::Ref<const Eigen::VectorXd> desiredJointValues,
const IRobotControl::
ControlMode& mode) -> bool final - Set the desired reference.
- auto getJointList() const -> std::vector<std::string> final
- Get the list of the controlled joints.
- auto isValid() const -> bool final
- Check if the class is valid.
Function documentation
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: initialize(std::weak_ptr<ParametersHandler:: IParametersHandler> handler) final
Initialize the Interface.
| Parameters | |
|---|---|
| handler | pointer to a parameter handler interface |
| Returns | True/False in case of success/failure. |
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: setDriver(std::shared_ptr<yarp::dev::PolyDriver> robotDevice)
Set the driver required to control the robot.
| Parameters | |
|---|---|
| robotDevice | device used to control the robot. |
| Returns | True/False in case of success/failure. |
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: checkMotionDone(bool& motionDone,
bool& isTimeExpired,
std::vector<std::pair<std::string, double>>& info) final
Check if the motion set through the position control mode ended.
| Parameters | |
|---|---|
| motionDone out | true if the motion ended. |
| isTimeExpired | |
| info out | vector containing the list of the joint whose motion did not finish yet. |
| Returns | True/False in case of success/failure. |
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: setControlMode(const std::vector<IRobotControl:: ControlMode>& controlModes) final
Set the control mode.
| Parameters | |
|---|---|
| controlModes | vector containing the control mode for each joint. |
| Returns | True/False in case of success/failure. |
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: setControlMode(const IRobotControl:: ControlMode& mode) final
Set the desired control mode.
| Returns | True/False in case of success/failure. |
|---|
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: setReferences(Eigen::Ref<const Eigen::VectorXd> jointValues,
const std::vector<IRobotControl:: ControlMode>& controlModes) final
Set the desired reference.
| Parameters | |
|---|---|
| jointValues | desired joint values. |
| controlModes | vector containing the control mode for each joint. |
| Returns | True/False in case of success/failure. |
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: setReferences(Eigen::Ref<const Eigen::VectorXd> desiredJointValues,
const IRobotControl:: ControlMode& mode) final
Set the desired reference.
| Returns | True/False in case of success/failure. |
|---|
std::vector<std::string> BipedalLocomotion:: RobotInterface:: YarpRobotControl:: getJointList() const final
Get the list of the controlled joints.
| Returns | A vector containing the name of the controlled joints. |
|---|
bool BipedalLocomotion:: RobotInterface:: YarpRobotControl:: isValid() const final
Check if the class is valid.
| Returns | True if it is valid, false otherwise. |
|---|