36 std::vector<std::string>
physical_joint_names{
"phys_joint_0",
"phys_joint_1",
"phys_joint_2",
"phys_joint_3"};
38 std::vector<std::pair<double, double>>
physical_joint_limits{{-30.0, 30.0}, {-10.0, 10.0}, {-32.0, 33.0}, {0.0, 120.0}};
56 actAxesPos[0] = physJointsPos[0];
57 actAxesPos[1] = physJointsPos[1];
58 actAxesPos[2] = physJointsPos[2] + physJointsPos[3];
70 actAxesVel[0] = physJointsVel[0];
71 actAxesVel[1] = physJointsVel[1];
72 actAxesVel[2] = physJointsPos[2] + physJointsPos[3] + physJointsVel[2] + physJointsVel[3];
85 actAxesAcc[0] = physJointsAcc[0];
86 actAxesAcc[1] = physJointsAcc[1];
87 actAxesAcc[2] = physJointsPos[2] + physJointsPos[3] + physJointsVel[2] + physJointsVel[3] + physJointsAcc[2] + physJointsAcc[3];
100 yCError(
FAKEJOINTCOUPLING) <<
"convertFromActuatedAxesToPhysicalJointsPos: input or output vectors have wrong size";
103 physJointsPos[0] = actAxesPos[0];
104 physJointsPos[1] = actAxesPos[1];
105 physJointsPos[2] = actAxesPos[2] / 2.0;
106 physJointsPos[3] = actAxesPos[2] / 2.0;
115 yCError(
FAKEJOINTCOUPLING) <<
"convertFromActuatedAxesToPhysicalJointsVel: input or output vectors have wrong size";
118 physJointsVel[0] = actAxesVel[0];
119 physJointsVel[1] = actAxesVel[1];
120 physJointsVel[2] = actAxesPos[2] / 2.0 - actAxesVel[2] / 2.0;
121 physJointsVel[3] = actAxesPos[2] / 2.0 + actAxesVel[2] / 2.0;
131 yCError(
FAKEJOINTCOUPLING) <<
"convertFromActuatedAxesToPhysicalJointsAcc: input or output vectors have wrong size";
134 physJointsAcc[0] = actAxesAcc[0];
135 physJointsAcc[1] = actAxesAcc[1];
136 physJointsAcc[2] = actAxesPos[2] / 2.0 - actAxesVel[2] / 2.0 - actAxesAcc[2] / 2.0;
137 physJointsAcc[3] = actAxesPos[2] / 2.0 + actAxesVel[2] / 2.0 + actAxesAcc[2] / 2.0;
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool convertFromActuatedAxesToPhysicalJointsTrq(const yarp::sig::Vector &actAxesPos, const yarp::sig::Vector &actAxesTrq, yarp::sig::Vector &physJointsTrq) override
bool open(yarp::os::Searchable &par) override
Open the DeviceDriver.
bool convertFromActuatedAxesToPhysicalJointsVel(const yarp::sig::Vector &actAxesPos, const yarp::sig::Vector &actAxesVel, yarp::sig::Vector &physJointsVel) override
bool convertFromPhysicalJointsToActuatedAxesVel(const yarp::sig::Vector &physJointsPos, const yarp::sig::Vector &physJointsVel, yarp::sig::Vector &actAxesVel) override
bool convertFromActuatedAxesToPhysicalJointsPos(const yarp::sig::Vector &actAxesPos, yarp::sig::Vector &physJointsPos) override
bool convertFromPhysicalJointsToActuatedAxesPos(const yarp::sig::Vector &physJointsPos, yarp::sig::Vector &actAxesPos) override
bool convertFromPhysicalJointsToActuatedAxesTrq(const yarp::sig::Vector &physJointsPos, const yarp::sig::Vector &physJointsTrq, yarp::sig::Vector &actAxesTrq) override
bool convertFromPhysicalJointsToActuatedAxesAcc(const yarp::sig::Vector &physJointsPos, const yarp::sig::Vector &physJointsVel, const yarp::sig::Vector &physJointsAcc, yarp::sig::Vector &actAxesAcc) override
bool close() override
Close the DeviceDriver.
bool convertFromActuatedAxesToPhysicalJointsAcc(const yarp::sig::Vector &actAxesPos, const yarp::sig::Vector &actAxesVel, const yarp::sig::Vector &actAxesAcc, yarp::sig::Vector &physJointsAcc) override
bool getNrOfActuatedAxes(size_t &nrOfActuatedAxes) override final
bool getNrOfPhysicalJoints(size_t &nrOfPhysicalJoints) override final
void initialise(yarp::sig::VectorOf< size_t > coupled_physical_joints, yarp::sig::VectorOf< size_t > coupled_actuated_axes, std::vector< std::string > physical_joint_names, std::vector< std::string > actuated_axes_names, std::vector< std::pair< double, double > > coupled_physical_joint_limits)
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
#define yCError(component,...)
#define yCWarning(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.