Repository navigation
clover4: fix body inertia used with use_clover_physics (violated the triangle inequality) - #516
Merged
Conversation
The use_clover_physics inertia was copied from the 3DR Iris (izz > ixx + iyy, impossible for a rigid body). Use a solid box of the frame envelope with the 0.7 kg body mass.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In
clover_description/urdf/clover/clover4_physics.xacro, the body inertia used whenuse_clover_physicsis true is:izzis larger thanixx + iyy(0.0977 > 0.0806), which no rigid body can have. The file header already says these values were taken from the 3DR Iris, not from the Clover.What changed
Only the
body_inertiablock of theuse_clover_physicsbranch, plus the header comment. The body is now a solid box with the 0.7 kg mass already in that branch, using the same formula and the samebody_width/body_heightproperties that the non-Clover-physics branch already uses (0.35 x 0.35 x 0.124 m):Dimensions are consistent with the Clover 4.2 dimensional drawing (
docs/assets/dimensional-drawing/clover-4.2.pdf: 355 x 355 mm guards, 125 mm height) and with the body mesh (clover_body_solid.dae, about 340 x 340 x 156 mm).This is an upper bound, because a uniform box spreads the mass wider than the real drone does (battery and electronics are near the center). It is a consistent, simple placeholder, not a CAD-exact value. Rotor inertia and the rest of the file are untouched.
How it was checked
xacro clover4.xacro use_clover_physics:=trueand:=falseboth expand without errors (the$(find clover_description)substitution was replaced with a path in a scratch copy, since the check ran without ROS). The expanded URDF has base_link_inertia with mass 0.7 and the new values.