Skip to content
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

Fix bug in DynamicsLinearization due to use of ; in place of + #1161

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Mar 8, 2024

Back in January 2016, in a rush to avoid that the work I did during my secondment in Eindhoven diverged too much w.r.t. to iDynTree master, I merged #129 . In it, I included my work on Dynamics linearization that eventually got published in https://www.aimsciences.org/article/doi/10.3934/jgm.2022009 / https://arxiv.org/pdf/2204.05092.pdf (Equations 22 and 23, if anyone is curious).

Unfortunately, I remember that a test was not passing, so I disabled it as I was not able to fix it. Then, time passed and for linearization we started using almost uniquely autodiff system, so I did not turned back my attention to hand-written DynamicsLinearization functions in iDynTree. However, after some years (but still a few years ago) I started noticing a warning that only occured in Visual Studio/Windows-builds:

[105/308] Building CXX object src\model\CMakeFiles\idyntree-model.dir\src\DynamicsLinearization.cpp.obj
D:\a\idyntree\idyntree\src\model\src\DynamicsLinearization.cpp(311): warning C4552: '*': result of expression not used

I remember thinking that "result of expression not used" probably indicated a real bug, and that could be the reason why my test in Eindhoven were not passing! Anyhow, I never actually looked into it. However, today @S-Dafarra noticed again the warning and pinged me about it, so I finally looked into it. The bug itself was quite trivial (a ; instead of a + typo), but I was not able to find it back in 2015/2016. And after fixing it, indeed the test finally passed! the test have less failures, but unfortunately still fails. So, let's just fix the obvious error, and leave the test disabled.

@traversaro
Copy link
Member Author

traversaro commented Mar 8, 2024

Having said that, given their limited use we could eventually remove those functions. But let's at give them a release as fully working functions with nice working tests.

@traversaro
Copy link
Member Author

Cool, valgrind tests still fail.

@traversaro traversaro changed the title Fix bug in DynamicsLinearization due to use of ; in place of + and re-enable DynamicsLinearizationIntegrationTest Fix bug in DynamicsLinearization due to use of ; in place of + Mar 8, 2024
@traversaro
Copy link
Member Author

Cool, valgrind tests still fail.

Ok, I was a bit optimistic, test in general still fail. However, let's at least remove the warning and improve the situation a bit.

@traversaro traversaro merged commit e35f305 into master Mar 11, 2024
39 checks passed
@traversaro traversaro deleted the fixdynlin branch March 11, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants