Home | Tutorials | Wiki | Issues
Ask Your Question
1

getCoG() returns (0, 0, 0)

asked 2015-06-07 02:29:42 -0600

mugenHexapod gravatar image

Hi

I am trying to find center of mass by doing the following

std::cout << this->model->GetLink("leg1")->GetInertial()->GetCoG() << std::endl;

but I only get 0,0,0. Is there any reason why it's happening? Maybe the reference frame is the link it self, instead of the world frame?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2015-06-07 11:27:14 -0600

Correct, the center of mass is expressed with respect to the link, and the link pose with respect to the parent model.

edit flag offensive delete link more

Comments

what is the suggested way to find the CoG with respect to the world frame?

mugenHexapod gravatar imagemugenHexapod ( 2015-06-07 17:16:26 -0600 )edit
1

is this->model->GetLink("leg1")->GetWorldCoGPose().pos the right way for getting the CoG wrt world frame?

mugenHexapod gravatar imagemugenHexapod ( 2015-06-07 17:28:31 -0600 )edit

It looks right.

chapulina gravatar imagechapulina ( 2015-06-07 18:52:19 -0600 )edit

thank you!

mugenHexapod gravatar imagemugenHexapod ( 2015-06-07 19:01:58 -0600 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-06-07 02:29:42 -0600

Seen: 95 times

Last updated: Jun 07 '15