Skip to content

clover4: fix body inertia used with use_clover_physics (violated the triangle inequality) - #516

Merged
okalachev merged 1 commit into
CopterExpress:masterfrom
Shivansh2703:fix-clover4-inertia
Nov 13, 2026
Merged

okalachev merged 1 commit into
CopterExpress:masterfrom
Shivansh2703:fix-clover4-inertia

Conversation

@Shivansh2703

Copy link
Copy Markdown
Contributor

In clover_description/urdf/clover/clover4_physics.xacro, the body inertia used when use_clover_physics is true is:

ixx="0.0347563"
iyy="0.0458929"
izz="0.0977"

izz is larger than ixx + 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_inertia block of the use_clover_physics branch, 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 same body_width / body_height properties that the non-Clover-physics branch already uses (0.35 x 0.35 x 0.124 m):

  • ixx = iyy = 1/12 * m * (h^2 + w^2) = 0.008043 kg m^2
  • izz = 1/12 * m * (w^2 + w^2) = 0.014292 kg m^2

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

  • ixx + iyy >= izz, iyy + izz >= ixx, ixx + izz >= iyy, all positive (0.0161 vs 0.0143 for the tightest pair).
  • xacro clover4.xacro use_clover_physics:=true and :=false both 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.
  • Not run in Gazebo.

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.
@okalachev

Copy link
Copy Markdown
Member

Thanks!

@okalachev
okalachev merged commit dd9de11 into CopterExpress:master Nov 13, 2026
3 of 5 checks passed
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.

2 participants