MATLAB Answers


This question is closed. Reopen it to edit or answer.

How can I get the global centre of masse of a machine

1 view (last 30 days)
Akram on 22 Nov 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
I'am using simmechanics 2nd generation(Matlab 2015a). I'am modeling a robot and i need to compensate the gravity effecte. I have blocks composed by sub-bodies, whose Centre of Masse is available.
I'm interested in the total Centre of Masse of the parts composed by those sub-components. In the Model Explorer, if I select my body block, and tick "Show COMs", the software is able to show it in the window along with the others. Thus I'm wondering if there's a direct way to extract the coordinates, that must be stored somewhere. Thanks for any help.

Answers (1)

Steve Miller
Steve Miller on 24 Jun 2021
The best way to get this answer would be to use the Inertia Sensor block added in R2019b.
If that is not an option, you could sense the position of all individual CGs and use those individual measurements to calculate the overall CG.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!