Skip to content

Commit

Permalink
Set the calibrationMeasurementToLink matrix to the initial when reset…
Browse files Browse the repository at this point in the history
…All is called (#421)

* set the calibrationMeasurementToLink matrix to the initial when resetAll command is run

* Update CHANGELOG.md
  • Loading branch information
davidegorbani authored Jan 9, 2025
1 parent ba04b43 commit ab5aad8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file documents notable changes to this project done before November 2023. For changes after that date, please refer to the release notes of each release at https://github.com/robotology/human-dynamics-estimation/releases.

## [Unreleased]

### Fixed
- Set the calibrationMeasurementToLink matrix to the initial when `resetAll` rpc command is called (https://github.com/robotology/human-dynamics-estimation/pull/421).

## [3.0.0] - 2023-11-09

### Changed
Expand Down
2 changes: 2 additions & 0 deletions devices/HumanStateProvider/HumanStateProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@ bool HumanStateProvider::open(yarp::os::Searchable& config)
fixedRightRotation);
pImpl->wearableTargets[targetName].get()->calibrationMeasurementToLink.setPosition(
fixedRightPositionOffset);
pImpl->wearableTargets[targetName].get()->calibrationMeasurementToLinkInitial =
pImpl->wearableTargets[targetName].get()->calibrationMeasurementToLink;
yInfo()
<< LogPrefix << "Adding Fixed Rotation for " << targetName << "==>"
<< pImpl->wearableTargets[targetName].get()->calibrationMeasurementToLink.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace hde {

iDynTree::Transform calibrationWorldToMeasurementWorld;
iDynTree::Transform calibrationMeasurementToLink;
iDynTree::Transform calibrationMeasurementToLinkInitial;
iDynTree::Vector3 positionScaleFactor;

// buffer variables
Expand Down Expand Up @@ -89,7 +90,7 @@ namespace hde {
{
std::lock_guard<std::mutex> lock(mutex);
calibrationWorldToMeasurementWorld = iDynTree::Transform::Identity();
calibrationMeasurementToLink = iDynTree::Transform::Identity();
calibrationMeasurementToLink = calibrationMeasurementToLinkInitial;
};

void clearWorldCalibrationMatrix()
Expand Down

0 comments on commit ab5aad8

Please sign in to comment.