13 #include <dynamic-graph/factory.h> 21 "WaistAttitudeFromSensor");
25 attitudeSensorSIN(NULL,
"sotWaistAttitudeFromSensor(" + name +
26 ")::input(MatrixRotation)::attitudeIN"),
27 positionSensorSIN(NULL,
"sotWaistAttitudeFromSensor(" + name +
28 ")::input(matrixHomo)::position"),
32 attitudeSensorSIN << positionSensorSIN,
33 "sotWaistAttitudeFromSensor(" + name +
")::output(RPY)::attitude") {
61 waistRchest = waistMchest.linear();
63 chestRwaist = waistRchest.transpose();
66 worldrchest = worldRchest * chestRwaist;
67 res = (worldrchest.eulerAngles(2, 1, 0)).reverse();
77 "WaistPoseFromSensorAndContact");
80 const std::string&
name)
83 positionContactSIN(NULL,
"sotWaistPoseFromSensorAndContact(" + name +
84 ")::input(matrixHomo)::contact"),
89 "sotWaistPoseFromSensorAndContact(" + name +
90 ")::output(RPY+T)::positionWaist") {
97 std::string docstring;
100 " Set flag specifying whether angles are measured from sensors or " 104 " - a boolean value.\n" 108 new ::dynamicgraph::command::Setter<WaistPoseFromSensorAndContact, bool>(
113 " Get flag specifying whether angles are measured from sensors or " 117 " return a boolean value.\n" 121 new ::dynamicgraph::command::Getter<WaistPoseFromSensorAndContact, bool>(
143 contactMwaist = waistMcontact.inverse();
146 for (
unsigned int i = 0;
i < 3; ++
i) {
147 res(
i) = contactMwaist(
i, 3);
152 for (
unsigned int i = 0;
i < 3; ++
i) {
153 res(
i + 3) = worldrwaist(
i);
157 contactrwaist = contactMwaist.linear().eulerAngles(2, 1, 0).reverse();
159 for (
unsigned int i = 0;
i < 3; ++
i) {
160 res(
i + 3) = contactrwaist(
i);
Eigen::Transform< double, 3, Eigen::Affine > SOT_CORE_EXPORT MatrixHomogeneous
void signalRegistration(const SignalArray< int > &signals)
#define sotDEBUGOUT(level)
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(Latch, "Latch")
#define sotDEBUGIN(level)
virtual ~WaistAttitudeFromSensor(void)
dg::SignalPtr< MatrixHomogeneous, int > positionSensorSIN
Eigen::Vector3d SOT_CORE_EXPORT VectorRollPitchYaw
WaistAttitudeFromSensor(const std::string &name)
Eigen::Matrix< double, 3, 3 > SOT_CORE_EXPORT MatrixRotation
dg::SignalTimeDependent< VectorRollPitchYaw, int > attitudeWaistSOUT
VectorRollPitchYaw & computeAttitudeWaist(VectorRollPitchYaw &res, const int &time)
void addCommand(const std::string &name, command::Command *command)
dg::SignalPtr< MatrixRotation, int > attitudeSensorSIN