Gazebo | Ignition | Community
Ask Your Question

How to get center of gravity coordinates of a robot?

asked 2014-03-28 09:56:54 -0500

Wonyoung gravatar image

updated 2014-03-28 09:57:14 -0500

Can anyone tell me how to get center of gravity coordinates of a robot in gazebo? I'm controlling 10DOF robot and would like to see the CoG trajectory as the robot moves. I found "getcog" in the API, but don't know how to use it. Please share some nice ways to do this. Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-28 14:15:43 -0500

nkoenig gravatar image

There is no convenience function to get the CoG of a whole robot. You'll have to iterate over all the links in the robot, get the CoG, and compute the overall CoG.

Get all links in a model

Get the interial properties of a link

Get the CoG

edit flag offensive delete link more


Thank you for the answer!

Wonyoung gravatar imageWonyoung ( 2014-03-31 08:16:32 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-03-28 09:56:54 -0500

Seen: 1,479 times

Last updated: Mar 28 '14