2

The SpatialInertia object in Drake has a method called CopyToFullMatrix6(), which outputs the 6x6 representation of the SpatialInertia object. Is there a function to do the opposite? I.e. I have a 6x6 matrix that I want to make into a SpatialInertia object. (I am using Pydrake locally in Ubuntu 18.04.)

The context is: I'm working with some hydrodynamic modeling. Due to the model of the added mass, the "mass" submatrix of my Spatial Inertia matrix, which typically has three identical mass values on the diagonal, like so:

---------
| m 0 0 |
| 0 m 0 |
| 0 0 m |
---------

actually has different "masses" in the different directions, like so:

------------
| m1 0  0  |
| 0  m2 0  |
| 0  0  m3 |
------------

The consequence of this is that the usual constructors (MakeFromCentralInertia() or just SpatialInertia()) won't work because they take one mass value as an input.

My process right now is to query a body's SpatialInertia, get the 6x6 reprentation, and add the Added Mass Spatial Inertia matrix to it as a numpy array. Now I need a way to make that matrix into a SpatialInertia again so I can apply it back to the body.

Any thoughts on the process or the conversion are appreciated. Thanks!

hkolano
  • 37
  • 5

1 Answers1

0

A SpatialInertia can only have a scalar mass (it is actually represented that way, not as a 6x6 matrix). That is, that class is inherently the mass properties of a rigid body and can't be used for something more general. The multibody system does have a more general class, ArticulatedBodyInertia which does represent masses that appear different in different directions due to joint articulation. It is not clear to me how that could be used for hydrodynamics, but at least it can represent the varying masses.

Sherm
  • 643
  • 4
  • 6
  • Ah, so it would be impossible to represent added mass with a SpatialInertia. Understood. I will check out ArticulatedBodyInertia and see where that takes me. Thank you for your response! – hkolano Jul 06 '21 at 01:10