Go to the documentation of this file.
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"),
88 attitudeWaistSOUT << positionContactSIN,
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);
virtual ~WaistAttitudeFromSensor(void)
Eigen::Transform< double, 3, Eigen::Affine > SOT_CORE_EXPORT MatrixHomogeneous
dg::SignalTimeDependent< VectorRollPitchYaw, sigtime_t > attitudeWaistSOUT
Eigen::Vector3d SOT_CORE_EXPORT VectorRollPitchYaw
#define sotDEBUGOUT(level)
VectorRollPitchYaw & computeAttitudeWaist(VectorRollPitchYaw &res, const sigtime_t &time)
#define sotDEBUGIN(level)
dg::SignalPtr< MatrixRotation, sigtime_t > attitudeSensorSIN
dg::SignalPtr< MatrixHomogeneous, sigtime_t > positionSensorSIN
void signalRegistration(const SignalArray< int > &signals)
Eigen::Matrix< double, 3, 3 > SOT_CORE_EXPORT MatrixRotation
void addCommand(const std::string &name, command::Command *command)
WaistAttitudeFromSensor(const std::string &name)
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(DoubleConstant, "DoubleConstant")