what if we added a property to RigidBody right next to mass, com, and inertia like .added_mass  .  Then setInertial would have to look something like:

      % setInertial(body,mass,com,inertia[,added_mass]) or setInertial(body,spatialI[,added_mass])

with the added mass being passed into the second form because presumably you cannot isolate the mass/added_mass terms without knowing these.  

There are a few less-than-trivial modifications that happen to the inertia (which you can see with a find in files for setInertial - to handle cases where joints are welded, or the root joint of the system is changed.  We should make sure that a solution here works for those slightly more complex scenarios, too.


On Mar 27, 2014, at 12:47 PM, Russ Tedrake <russt@csail.mit.edu> wrote:

> got it.  that makes perfect sense now (and it could be worth including in the matlab comments).  let me take another look now that I understand...
> 
> On Mar 27, 2014, at 12:40 PM, jacob-izr <notifications@github.com> wrote:
> 
>> In systems/plants/RigidBody.m:
>> 
>> > @@ -297,6 +297,12 @@
>> >        end    
>> >      end    
>> >      
>> > +    function body = setOnlyInertial(body,I)
>> > +       % sets only the spatial inertial matrix I , without affecting mass, com, or inertia
>> Yeah, this is where I'm not convinced I have the best implementation. The problem is that is that the added-mass fluid force is not the same in each direction, so the object's new mass is not the same in all directions. The 3x3 mass portion of the spatial inertia matrix no longer has the same value along the diagonal.
>> 
>> The single scalar 'mass' one would derive in setInertia() from the new augmented spatial inertia is therefore nonsense. Unfortunately, I cannot implement the added mass forces with changes only to the mass, com, and inertia variables. It is truly a 6x6 matrix.
>> 
>> I figured it would be better to keep the mass, com, and inertia remain tied to the original mass properties of the RigidBody. And only the spatial inertia would be augmented.
>> 
>> —
>> Reply to this email directly or view it on GitHub.
>> 
>