stack-of-tasks / pinocchio

A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
http://stack-of-tasks.github.io/pinocchio/
BSD 2-Clause "Simplified" License
1.67k stars 357 forks source link

Kinetic and potential energy regressors #2282

Closed lvjonok closed 3 weeks ago

lvjonok commented 3 weeks ago

Hello Pinocchio team!

I am pleased to use your library and apply it for system identification purposes. I have found much useful jointTorqueRegressor and wanted to contribute by implementing kineticEnergyRegressor and potentialEnergyRegressor.These functions are alike jointTorqueRegressor show a linear connection from dynamical parameters to dynamical quantity.

I have added tests and documentation up to my capability.

Please let me know your thoughts, I am open for modifications and there are more ideas on possible contribution I am willing to implement later.

jcarpent commented 3 weeks ago

Thanks a lot @lvjonok for contributing to Pinocchio. We will proceed to a review of your code and will be happy to have it in Pinocchio.

Thanks again for using and contributing to Pinocchio.

lvjonok commented 3 weeks ago

I am having a growing concern about the naming. Maybe jointKineticEnergyRegressor and jointPotentialEnergyRegressor would be better names for the functions because JointTorqueRegressor has the similar naming idea behind.

jcarpent commented 3 weeks ago

@lvjonok I've provided some slight change to your initial PR. Could you have a look?

lvjonok commented 3 weeks ago

@lvjonok I've provided some slight change to your initial PR. Could you have a look?

Thanks for the update! The changes look great. Could you please change my affiliation information before finalizing the PR? I would rather have it like this:

Lev Kozlov: Kinetic and potential energy regressors