I'm attempting to use Drake to simulate an underwater manipulator. One important element of being underwater is that there's an added mass term in addition to a rigid body mass term in the manipulator equation. From the CalcInverseDynamics() function documentation, a kinematic tree has an inverse dynamics equation of:
tau = M(q)v' + C(q, v)v - tau_app - sum(applied spatial forces)
To include the added mass, this should become:
tau = (M(q)+AM(q))v' + C(q, v)v - tau_app - sum(applied spatial forces)
where AM(q) is the configuration-dependent added mass. I've used the Newton-Euler recursive method to solve the inverse dynamics before by including the "added mass" in the spatial inertia matrices for each link. However, as discussed in a previous question (Can a SpatialInertia object be constructed from a 6x6 matrix?), the added mass creates a spatial inertia with a mass submatrix with three different masses instead of one uniform mass (diagonals of [m1 m2 m3] instead of [m m m]), and thus can't be represented by a SpatialInertia object in Drake.
My follow-up question now is, is it possible within the framework of Drake to perform inverse and forward dynamics on a kinematic tree without the SpatialInertia object, or to somehow use ArticulatedBodyInertias instead? It was suggested in the previous post that ArticulatedBodyInertia could represent the spatial inertia with the added mass, but it's unclear to me how it could be used for forward/inverse dynamics and for simulation.
From reading the source code (with my very limited understanding of C++), it seems that SpatialInertia is a fundamental building block to the forward and inverse dynamic functions, as well as the simulation, of a MultiBody Plant.
I should learn C++, but right now I'm using the Python bindings for Drake and would not be comfortable heavily modifying the Drake C++ code. If the answer is "Nope, it is impossible to bypass the SpatialInertia object without making major modifications to the source code", that is understandable, but I figured I would ask those of you more familiar with the program before throwing in the towel.
Thanks in advance for any thoughts on the matter.