stulp / dmpbbo

Python/C++ library for Dynamical Movement Primitives and Black-Box Optimization
GNU Lesser General Public License v2.1
224 stars 90 forks source link

Integrating gains in demo_robot #66

Closed ignacio-pm closed 2 years ago

ignacio-pm commented 2 years ago

The problem that I see in your task is that you are not using an impedance controller. Therefore, I am not sure how the gains can play a role, for example, in the cost function. We can check that the exploration takes place but not the optimization. The alternative is to integrate the gains in the rollout function.

stulp commented 2 years ago

Yes, your the costs of your task will have to depend on the gains, or no gains can be learned.

Please note that this DmpWithGainSchedules is a proof-of-concept implementation, different from the one used in the ~2011 papers (which were implemented in C and used Simulation Lab (https://github.com/Rong-Zhi/sl) by Stefan Schaal as a simulation environment).

It would be nice to have a toy problem involving impedance control. However, inspired by your comments in the other issues, I am now first making a push for dmpbbo 2.0. It will have a much better design with respect to the Python/C++ redundancy, i.e. there will only be C++ code for the real-time functions. All training will be done in Python only. This will take a few weeks though.

ignacio-pm commented 2 years ago

If I understand correctly, it does not make a lot of sense to finish updating demo_robot with gains.

I would want to know what is exactly the difference between the DmpWithGainSchedules and the papers because looking at the papers they looked really similar.

The python version will not affect me since I have everything set up already with the C++ version and my project does not last so long.

stulp commented 2 years ago

If I understand correctly, it does not make a lot of sense to finish updating demo_robot with gains.

Indeed..

I would want to know what is exactly the difference between the DmpWithGainSchedules and the papers because looking at the papers they looked really similar.

They are conceptually the same. It's just that this specific implementation was programmed after those papers were written.

The python version will not affect me since I have everything set up already with the C++ version and my project does not last so long.

Sorry about that. I hope you project was successful nevertheless! Although it is too late for you, I am working towards v2.0 of dmpbbo, in which all training is done in Python, and the C++ versions are only there for reading the results and executing them in real-time. That should make things a lot easier for users of dmpbbo.

This new release is a precursor to that: https://github.com/stulp/dmpbbo/releases/tag/v1.1.0

ignacio-pm commented 2 years ago

My project has been successful until now. Thank you again for your work because it was helpful! You can notify me when the python release is working, and I might be able to test it with my experiments and give you some feedback.

stulp commented 2 years ago

Thanks, I'd appreciate that!

ignacio-pm commented 2 years ago

I will close this too