Make inertial warnings optional when setting tensor#1672
Make inertial warnings optional when setting tensor#1672jslee02 merged 1 commit intodartsim:mainfrom
Conversation
Signed-off-by: Louise Poubel <louise@openrobotics.org>
|
Looking at the proposal, it seems there is an difference in the convention of the inertia between the proposal and DART. Suppose we denote M in the proposal as M = [A, B; B^T C] where A = mI (so I assume the off-diagonal of A still should be zero), then the inertia tensor in DART is actually M' = [C B^T; B A]. This is why DART complains that the off-diagonal terms of A is not zero. (I didn't look at the Gazebo code yet, so I could be wrong here though) I think we could safely replace Regarding the target branch, |
Note that what we pass to DART is the sum of matrices
The convention on Gazebo is indeed different from DART / Featherstone though, because Gazebo's translational terms come on the top. That's being taken into account before feeding the values to DART here: https://github.com/gazebosim/gz-physics/pull/384/files
That would be safe from an API standpoint, but it would break ABI. So any downstream projects that have been built against DART <= 6.12 would have esoteric runtime issues when running against 6.13. That includes Gazebo. I've seen other PRs to this repository trying to avoid ABI breaks in the past, but I can make the suggested change if ABI is not a concern. |
|
All sounds good to me! DART hasn't kept the ABI backward compatibilities for minor version ups (but just API) historically, but it wouldn't harm anything from keeping it when it's possible I think. |
We're adding support for fluid added mass to Gazebo, see the Fluid Added Mass Proposal. This feature makes use of values in a body's spatial tensor which break the current assumptions in the inertia class. Since this is a valid use case for us, we'd like to suppress those warnings.
So far I haven't noticed any other places where DART misbehaves when passing those values to the spatial tensor. As an example, without this PR I see warnings like this:
I added the option to suppress the warnings in a way that doesn't break ABI, so that this change can be included in future releases in a backwards-compatible manner. I considered skipping the verification completely when
!_printWarnings, please let me know if you'd like me to do that instead.I'm not sure about DART's backporting policy, but it would be great to have this change be released in a 6.X release. Please let me know if this is the correct branch to target this change.
Before creating a pull request
make format-DDART_TREAT_WARNINGS_AS_ERRORS=ONand resolve all the compile warningsBefore merging a pull request
CHANGELOG.md