-
Notifications
You must be signed in to change notification settings - Fork 21
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
Parametric improvements #72
Conversation
…rd_kinematics method In the parametric casadi implementation
This needs ami-iit/adam#72 to be merged
ba054d0
to
430ac4d
Compare
To be tested
Using link.inertial.origin instead
It should be symmetric anyhow
… idyntree conversion
Tests are failing because the changes of robotology/idyntree#1160 are not yet available in |
It should be soon conda-forge/idyntree-feedstock#78 |
CI is now happy. The PR is ready to be reviewed. In particular, I would love the comments of:
|
@@ -248,28 +250,27 @@ def gravity_term_fun(self) -> cs.Function: | |||
self.f_opts, | |||
) | |||
|
|||
def forward_kinematics(self, frame, T_b, s) -> cs.Function: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this only to recall the reason why this has been deleted:
there exists the function forward_kinematics_fun
, this was a left over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @S-Dafarra, you fixed a lot of old wrong typing!
The idyntree model export is great! We could also use the same logic in the future to create adam models from idyntree ones.
Btw everything looks good to me :)
for i in range(3): | ||
for j in range(3): | ||
idyn_spatial_rotational_inertia.setVal(i, j, inertia_matrix[i, j]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure about this. Is it possible to use idyntree.fromPython
?
Maybe it just works with some specific types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try that, but unfortunately FromPython
is defined byMatrix3x3
from which RotationalInertia
inherits, and it is a static method, so it returns a Matrix3x3
instead of a RotationalInertia
. In the end, this was the only method I managed to use reliably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was imagining it :)
def get_ordered_link_list(self): | ||
"""get the ordered list of the link, based on the direction of the graph | ||
|
||
Returns: | ||
list: ordered link list | ||
""" | ||
return self.tree.get_ordered_nodes_list() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, a never used method 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was throwing a warning since self.tree.get_ordered_nodes_list
requires an argument that was not passed here, so I figured it was not really used 😊
During the review, I also figured out that some files are signed with the old license (see #64)
I will update them in a different PR. |
Returns: | ||
iDynTree.SolidShape: the iDynTree solid shape | ||
""" | ||
visual_position = idyntree.bindings.Position.FromPython(visual.origin.xyz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely recall that due to a change by @GiulioRomualdi it is not necessary anymore to call FromPython
, but for sure he remember better.
for i in range(3): | ||
for j in range(3): | ||
idyn_spatial_rotational_inertia.setVal(i, j, inertia_matrix[i, j]) | ||
rotated_inertia = inertia_rotation * idyn_spatial_rotational_inertia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you avoided this, it is a common bug in URDF parsers, see ros/robot_model#66 and ros/robot_model#117 .
Hi @S-Dafarra ! Can we merge the PR? :) |
Hi @Giulero, there was this point open, but at this point I think we can proceed 😉 |
Sure! |
Thanks a lot! <3 Merging. |
Fixes #68
Fixes #69
Fixes #70
Fixes #71
This PR also adds a conversion function from an
adam
model to aniDynTree
model