robotlearn / pyrobolearn

PyRoboLearn: a Python framework for Robot Learning
Apache License 2.0
400 stars 62 forks source link

How to change the goal in imitation learning example ? #60

Closed deepakraina99 closed 3 years ago

deepakraina99 commented 3 years ago

The imitation example given is only for the reproduction of demonstrated trajectory. What if I would like to change the goal location during reproduction? Is this possible with the same example?

lrozo commented 3 years ago

Yes, it is! As it uses a DMP model, you can easily modify the attractor/goal of a DMP. You may want to have a look at https://github.com/robotlearn/pyrobolearn/blob/9cd7c060723fda7d2779fa255ac998c2c82b8436/pyrobolearn/models/dmp/discrete_dmp.py#L60 as the DMP definition includes a goal parameter.