ADVRHumanoids/xbot2_examples

[Question] How retrieve COM of a specific link

Closed this issue · 1 comments

Hi, I am back with issues :)

I am thinking about how I can calculate the COM of the links.

  1. Create a fake modelinterface for each link, and then use the ModelInterface::getCOM().
    I found out that I can modify a KinematicChain removing some joints, but then I can not create a fake model from a custom chain.

  2. RBDL has some method to create a model in C++ from scratch, using :
    https://github.com/rbdl/rbdl/blob/242bf36fbae13ef2b67414e23844f59f97d24ea1/include/rbdl/Model.h#L319-L324
    Could I expose this method in XBotInterface? Where should I start?

  3. Other ways you may have used in the past?

thanks

I think the best way is to take the urdf tag inertial and read the origin: for urdf rule this must be the center of gravity to where specify the inertial matrix