Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rigid body inertia frame #170

Open
mrslvg opened this issue Nov 28, 2018 · 2 comments
Open

Rigid body inertia frame #170

mrslvg opened this issue Nov 28, 2018 · 2 comments
Labels

Comments

@mrslvg
Copy link

mrslvg commented Nov 28, 2018

I spent several days (still not succeed) trying to understand in which reference frame should the RigidBodyInertia be defined when creating a new Segment. Has someone ever had the same problem?
The 'official' way (link) doesn't work for me. I already tried (with no success) the solution suggested by this page.
I would like very much to understand this an write a clearer documentation of the Segment class.

@francofusco
Copy link

I agree that the documentation is a little misleading. In the wiki page you linked it indeed seems that inertia is referring to the "parent reference frame". However, this does not seem to be the real usage:
as pointed out by Santiago in the other link you included, inertial properties are expressed at the tip frame (that is, "after" the joint). Indeed, if a joint "moves" then its effort directly depends on the inertia of the segment who "owns" the joint in the implementation of ChainIdSolver_RNE. I specifically refer to lines 84, in which inertial forces are added to the wrench applied to the current segment and 91 which computes the effort for the joint.

Since you said that Santiago's post did not help you, perhaps you can give more details about the problem you are facing and I will try to help you - although I am not really an expert of KDL... but two heads are better than one, isn't it?

In addition I would argue that the way the tip transformation is given to a Segment and its documentation are not consistent. From what I understand from the code, the Frame object passed to the constructor corresponds to the desired transformation between segment's reference and tip when the joint is in the zero position. From the doc, it rather seems that the passed tip corresponds to a transformation from the joint to the tip, and that the overall transformation for a segment will be given by the composition of:

  1. Joint offset translation
  2. Joint transformation (rotation/translation according to its type)
  3. Additional tip transformation (which from the doc seems to be the one to be given to the constructor).
    From the code, instead, the tip you pass upon construction is not the one used in step 3. I think that this might be another factor you should consider when modelling your tree.

If I receive confirmation that what I said is correct, I will try to update the documentation!

@traversaro
Copy link
Contributor

traversaro commented Jan 9, 2019

Old related PR on how the RigidBodyInertia is interpreted in ROS/URDF when creating a KDL model: ros/robot_model#66 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants