Fix bug in DynamicsLinearization due to use of ; in place of + #1161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.