Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
sot-hrp2
Commits
7c102c88
Commit
7c102c88
authored
Sep 21, 2012
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
Sep 21, 2012
Browse files
Export filtered IMU data into signal attitudeSOUT.
parent
860a2491
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sot-hrp2-device.cpp
View file @
7c102c88
...
...
@@ -35,7 +35,8 @@ SoTHRP2Device::SoTHRP2Device(std::string RobotName):
timestep_
(
TIMESTEP_DEFAULT
),
previousState_
(),
robotState_
(
"StackOfTasks("
+
RobotName
+
")::output(vector)::robotState"
),
mlforces
(
6
)
mlforces
(
6
),
pose
()
{
sotDEBUGIN
(
25
)
;
signalRegistration
(
robotState_
);
...
...
@@ -83,7 +84,14 @@ void SoTHRP2Device::setupSetSensors(map<string,dgsot::SensorValues> &SensorsIn)
mlforces
(
j
)
=
forcesIn
[
i
*
6
+
j
];
forcesSOUT
[
i
]
->
setConstant
(
mlforces
);
}
vector
<
double
>
attitude
=
SensorsIn
[
"attitude"
].
getValues
();
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
for
(
unsigned
int
j
=
0
;
j
<
3
;
++
j
)
pose
(
i
,
j
)
=
attitude
[
i
*
3
+
j
];
attitudeSOUT
.
setConstant
(
pose
);
attitudeSOUT
.
setTime
(
t
);
updateRobotState
(
anglesIn
);
sotDEBUGOUT
(
25
);
}
...
...
src/sot-hrp2-device.hh
View file @
7c102c88
...
...
@@ -24,6 +24,7 @@
#include <dynamic-graph/linear-algebra.h>
#include <sot/core/device.hh>
#include <sot/core/abstract-sot-external-interface.hh>
#include <sot/core/matrix-rotation.hh>
namespace
dgsot
=
dynamicgraph
::
sot
;
...
...
@@ -73,6 +74,7 @@ protected:
/// Intermediate variables to avoid allocation during control
ml
::
Vector
mlforces
;
ml
::
Vector
mlRobotState
;
dgsot
::
MatrixRotation
pose
;
};
#endif
/* _SOT_HRP2Device_H_*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment