Combine inertial properties using + operator

#115 Merged at c6c81db
Repository
Branch
inertial_part2
Repository
Branch
ign-math2
Author
  1. Steven Peters
Reviewers
Description

This PR introduces the ability to combine inertial properties of different objects, returning the equivalent inertial properties as if the objects were welded together.

The calculation is as follows:

  1. Add the masses: new_mass = mass1 + mass2
  2. Compute the new center of mass location: pose = mass1*pose1 + mass2*pose2
  3. Add the moment of inertias in the base frame: MOI = MOI1 + MOI2
  4. Parallel axis theorem: account for offset of each mass from new center of mass (see code)

I also fixed a code_check complaint in Plane.hh and added a default value to the Quaternion argument in the SetFromBox functions, which allows that function to be called more concisely when no rotation is desired (api / abi is fine).

  • Commit status

Comments (1)