Skip to content

Commit

Permalink
Remove duplicate call to joint torques extraction of berdy and debug …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
yeshasvitirupachuri committed Aug 21, 2019
1 parent 0a7b4be commit f91920f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions devices/HumanDynamicsEstimator/HumanDynamicsEstimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1171,24 +1171,14 @@ void HumanDynamicsEstimator::run()
iDynTree::VectorDynSize estimatedDynamicVariables(pImpl->berdyData.helper.getNrOfDynamicVariables());
pImpl->berdyData.solver->getLastEstimate(estimatedDynamicVariables);

// Extract joint torques from estimated dynamic variables
pImpl->berdyData.helper.extractJointTorquesFromDynamicVariables(estimatedDynamicVariables,
pImpl->berdyData.state.jointsPosition,
pImpl->berdyData.estimates.jointTorqueEstimates);

// Debug code
//yInfo() << "Input measurements : " << pImpl->berdyData.buffers.measurements.toString();
//yInfo() << "Estimated dynamic variables : " << estimatedDynamicVariables.toString();
//yInfo() << "Extracted Torque estimates : " << pImpl->berdyData.estimates.jointTorqueEstimates.toString();

// ===========================
// EXPOSE DATA FOR IHUMANSTATE
// ===========================

{
std::lock_guard<std::mutex> lock(pImpl->mutex);

// Extract the joint torque estimates and store to the variable
// Extract joint torques from estimated dynamic variables
pImpl->berdyData.helper.extractJointTorquesFromDynamicVariables(estimatedDynamicVariables,
pImpl->berdyData.state.jointsPosition,
pImpl->berdyData.estimates.jointTorqueEstimates);
Expand Down

0 comments on commit f91920f

Please sign in to comment.