-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add process dynamics class for external contacts #759
Add process dynamics class for external contacts #759
Conversation
e7a0b19
to
bdf8ffe
Compare
*/ | ||
struct FT : Sensor | ||
struct FTSENSOR : Sensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be FTSensor
src/Estimators/src/SubModel.cpp
Outdated
if (!group->getParameter("ukf_names", ukfNames)) | ||
{ | ||
blf::log()->error("{} The parameter handler could not find 'ukf_names' in the " | ||
"configuration file for the group {}.", | ||
logPrefix, | ||
groupName); | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove blf::
{ | ||
REQUIRE((output.ftWrenches[key] - value.row(sample).transpose()).isZero(0.1)); | ||
REQUIRE((output.contactWrenches[sensors["contact"][idx].ukfSensorName]).isZero(5.0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0 as tolerance is a lot https://eigen.tuxfamily.org/dox/classEigen_1_1DenseBase.html#af36014ec300f53a65083057ed4e89822
for (auto const& [key, value] : dataset.fts) | ||
for (int idx = 0; idx < sensors["ft"].size(); idx++) | ||
{ | ||
REQUIRE((output.ftWrenches[sensors["ft"][idx].ukfSensorName] - dataset.fts[sensors["ft"][idx].sensorName].row(sample).transpose()).isZero(0.1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use isApprox
(https://eigen.tuxfamily.org/dox/classEigen_1_1DenseBase.html#ae8443357b808cd393be1b51974213f9c)
REQUIRE((output.ftWrenches[sensors["ft"][idx].ukfSensorName] - dataset.fts[sensors["ft"][idx].sensorName].row(sample).transpose()).isZero(0.1)); | |
REQUIRE((output.ftWrenches[sensors["ft"][idx].ukfSensorName].isApprox( dataset.fts[sensors["ft"][idx].sensorName].row(sample).transpose())); |
ba82548
to
78267f8
Compare
I pushed the changes after your review. I saw that the CI is failing but the errors are not related to the code of this PR. |
78267f8
to
548afd0
Compare
548afd0
to
65bbf2e
Compare
Hi @GiulioRomualdi, I just rebased this branch on master. Feel free to review it again (if needed) or merge it. |
This PR introduced a process model for the external contacts defined as
In addition, the PR changes the logic to define a name for the dynamics. Indeed, the name of the dynamics has to match the name
ukf_name
defined in themodel
configuration file. This solves the problem described in #760 which was causing a segmentation fault when using the ft frame as the external contact frame.cc @GiulioRomualdi @S-Dafarra