Skip to content
GitLab
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
c3122074
Commit
c3122074
authored
Apr 01, 2014
by
Pierre Gergondet
Browse files
Read torques provided by OpenHRP
parent
808b11e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sot-hrp2-device.cpp
View file @
c3122074
...
...
@@ -42,6 +42,7 @@ SoTHRP2Device::SoTHRP2Device(std::string RobotName):
pose
(),
accelerometer_
(
3
),
gyrometer_
(
3
),
torques_
(),
baseff_
()
{
sotDEBUGIN
(
25
)
;
...
...
@@ -131,6 +132,16 @@ void SoTHRP2Device::setSensors(map<string,dgsot::SensorValues> &SensorsIn)
gyrometer_
(
i
)
=
gyrometer
[
i
];
gyrometerSOUT_
.
setConstant
(
gyrometer_
);
}
it
=
SensorsIn
.
find
(
"torques"
);
if
(
it
!=
SensorsIn
.
end
())
{
const
std
::
vector
<
double
>&
torques
=
SensorsIn
[
"torques"
].
getValues
();
torques_
.
resize
(
torques
.
size
());
for
(
std
::
size_t
i
=
0
;
i
<
torques
.
size
();
++
i
)
torques_
(
i
)
=
torques
[
i
];
pseudoTorqueSOUT
.
setConstant
(
torques_
);
}
sotDEBUGOUT
(
25
);
}
...
...
src/sot-hrp2-device.hh
View file @
c3122074
...
...
@@ -85,5 +85,6 @@ protected:
ml
::
Vector
accelerometer_
;
ml
::
Vector
gyrometer_
;
std
::
vector
<
double
>
baseff_
;
ml
::
Vector
torques_
;
};
#endif
/* _SOT_HRP2Device_H_*/
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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