NASA-Tensegrity-Robotics-Toolkit / NTRTsim

The NASA Tensegrity Robotics Toolkit Simulator, a physics based simulator to research the design and control of tensegrity robots.
Apache License 2.0
161 stars 81 forks source link

tgCompoundRigidSensor does not calculate the true center of mass of a compound body #202

Open apsabelhaus opened 7 years ago

apsabelhaus commented 7 years ago

At the moment, tgCompoundRigidSensor outputs the position (X, Y, Z) of a compound body as the average of the coordinates of each component model's center of mass. Since this is NOT normalized by the actual mass of each object, the tgCompoundRigidSensor position location is not necessarily the true center of mass of the compound body!

To-Do: include a normalization in the position calculation that weights each (for example) rod's center of mass by the rod's mass itself. Prove to ourselves that this gives the true COM of the compound.

brtietz commented 7 years ago

Drew,

Are you sure about this? Last time I tried to build a sensor like this, I found that all of the compounded rigid objects in fact returned the same position! This was because they were all, in fact, calling the getPosition method of the same object, a single compound rigid.

Note: I haven't looked at your code or its output, but I recommend double checking based on past experience.

Brian

On Fri, Feb 3, 2017 at 4:25 PM, Drew Sabelhaus notifications@github.com wrote:

At the moment, tgCompoundRigidSensor outputs the position (X, Y, Z) of a compound body as the average of the coordinates of each component model's center of mass. Since this is NOT normalized by the actual mass of each object, the tgCompoundRigidSensor position location is not necessarily the true center of mass of the compound body!

To-Do: include a normalization in the position calculation that weights each (for example) rod's center of mass by the rod's mass itself. Prove to ourselves that this gives the true COM of the compound.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NASA-Tensegrity-Robotics-Toolkit/NTRTsim/issues/202, or mute the thread https://github.com/notifications/unsubscribe-auth/AFRj4GkJsSKfJApgcBjk-Fa9EMQUgN5jks5rY8V-gaJpZM4L29bi .