kjyv / FloBaRoID

Framework for dynamical system identification of floating-base rigid body tree structures
GNU Lesser General Public License v3.0
61 stars 26 forks source link

Estimating parameters for one joint #8

Closed abhat91 closed 5 years ago

abhat91 commented 5 years ago

Would it be possible to estimate the inertial parameters for on joint alone instead of the entire system? (Say, by generating a trajectory which involves changes in only 1 joint angle). Also, how does the system differentiate between errors in joint position tracking in the system and the error in the inertial parameter?

kjyv commented 5 years ago

Yes, you can do that by defining joints as fixed in the URDF file so your model has only one DOF and then input corresponding trajectory data. This does not allow for better identification results if you go through the joints one by one though, as the whole system is interdependent. You should only do that if you intend to never use the other joints while working with your system later on. I'm not sure I can answer your second question properly. Joint position error is obviously not known from measurement data and it is not modeled explicitly. The error in the inertial parameters is what is minimized by the optimization and it is a bit of magic how two make sure that it get smaller (depends on good excitation trajectory, good input data from well calibrated sensors, possibly some parameters that are known well from previous measurement).

abhat91 commented 5 years ago

Thank you. I was running the parameter identification script but was having trouble converging to a solution (also, some of the parameters identified were definitely incorrect, such as the mass of one of the proximal links increases a lot and the mass of the distal links decreases by a lot). I'm trying to figure out what went wrong. One thing I noticed was that the velocity tracking on each joint is not very good in my robot which might be the cause of a lot of trouble. I am using ordinary least squares to estimate the parameters. Please let me know if you have any suggestions.

kjyv commented 5 years ago

There is no guarantee that parameters are correct when using identification. The values are supposed to be closer to the real values, but AFAIK there is no formal proof for that and I'm also not aware of studies examining that properly (i.e. with known correct values and comparing identification method success). Depending on which method you chose, you get feasible parameters, that is positive mass, com within the physical extent of the link etc. Ordinary least square does not do any of that and is the most simple and therefore a pretty bad method. I recommend the method by Sousa using SDP, so set constrainToConsistent=1 and start with no extra restrictions if the solver does not find a solution. All of that will only work more or less reliably if your measurements are good and are resulting from rich movement.

abhat91 commented 5 years ago

Thank you