robotology / human-dynamics-estimation

Software repository for estimating human dynamics
BSD 3-Clause "New" or "Revised" License
81 stars 28 forks source link

Move Dynamical Inverse Kinematics to HumanDynamicsEstimationLibrary #265

Closed lrapetti closed 2 years ago

lrapetti commented 2 years ago

This PR moves the Dynamical Inverse Kinematics implementation from the HumanStateProvider device to the HumanDynamicsEstimationLibrary.

With this PR all the functionalities of the current implementation are ported to the new class replicating the behaviour.

While addressing this refactoring some relevant points and possible improvements have been detected, and some of them addressed:

Before merging

S-Dafarra commented 2 years ago

Just to understand, what is the difference between Dynamical Inverse Kinematics and Inverse Velocity Kinematics?

lrapetti commented 2 years ago

Just to understand, what is the difference between Dynamical Inverse Kinematics and Inverse Velocity Kinematics?

Dynamical Inverse Kinematics class is solving the IK problem. Inverse Velocity Kinematics instead basically computes the configuration velocity $\nu$ solving the differential kinematics $\mathrm{v}=J\nu$. Indeed, dynamical inverse kinematics uses the inverse velocity kinematics solver for computing the velocity to be integrated.

lrapetti commented 2 years ago

Just to mention, I took the change also to do some cleaning in HumanStateProvider:

kouroshD commented 2 years ago

@lrapetti I have open a PR https://github.com/robotology/human-dynamics-estimation/pull/272 on this branch and fix the problem you mentioned in the first comment.

I have verified that Investigate why QP solver in IK does not work for some robots #167 is happening if setCustomConstraintsJointsValues is not called. While addressing point above we should fix also this

lrapetti commented 2 years ago

@kouroshD thanks for the review, I have addressed your suggestions, if there are no further comments I would proceed with merging.

kouroshD commented 2 years ago

Thank you @lrapetti . Looks good to me.

lrapetti commented 2 years ago

Thank you @lrapetti . Looks good to me.

Great, mergin then!