Comments (6)
the K (or alpha_y*beta_y) term is missing from the code as specified by equation 6 in Learning and Generalization of Motor Skills by Learning from Demonstration, is there a reason for this?
Where exactly is it missing? For the forcing term? That doesn't make a big difference. It is just a constant scaling factor for the weights of the forcing term. If you are interested, you can play around with it and look at this example script: https://github.com/dfki-ric/movement_primitives/blob/main/examples/plot_dmp_scaling.py
(Relevant PR: #33)
from movement_primitives.
Hi Alex, thanks for the reply
Yes, I meant the forcing term. According to Learning and Generalization of Motor Skills by Learning from Demonstration Equation 6, the equation for acceleration and the forcing terms (during imitation) is as such
However, in the _dmp.py file, I believe _dmp_acc function and the determine forces function seems to have missed considering the K constant from the equation.
I've tried to follow the paper and did some modifications to the _dmp.py file as shown below to include the K term from the forces
However, when I ran the modification, I got this plot
was wondering if you could take a look at it
from movement_primitives.
If you got a matching pair of step function and "determine forces" function, it should work. Are you sure that indentation is correct?
But as I said before, it does not make a difference whether you scale by K or not. This will only change the scale of the weights in the end. The behavior should be exactly the same.
from movement_primitives.
I've doubled checked the step function and determine forces function several times, however, it still gave me the exact results. Are there any locations that I'm missing other than the _dmp_acc function used by the step function and the "determine forces" function?
I plan to employ this library for my PhD hence why I'm trying to map what I'm reading from this godsent library with the literature.
from movement_primitives.
The default DMP has four implementations of the step function: Python, Cython, Euler integration, RK4 integration and combinations of these. RK4 integration in Cython is used by default. If you changed the Python function, make sure that it is also used, e.g. with
_, Y_dmp = dmp.open_loop(step_function="rk4")
If you changed the Cython version, you also have to recompile it.
But you should definitely check which function is used.
from movement_primitives.
Ahh, it was indeed an issue with the Cython package, I did not change the dmp_fast.pyx, hence it was using the _dmp_acc from dmp_fast.pyx and the determine_forces from python, thus the weird results. It was working as required when I changed both Cython and Python.
Side note, when I reverted the smoothing_scaling == False case to the original equation (by including the (goal-start)*force ) set by Ijspeert, once I resolved the Cython and Python issue.
Thank you so much, and have a great day!
from movement_primitives.
Related Issues (20)
- Integrate ProDMPs
- Doubt about variable 'execution_time' HOT 3
- Which variation of DMPs is implemented? HOT 1
- Phase and forcing_term are not updated inside dmp_open_loop() HOT 6
- Release 0.6.0
- Doubt about implementation of DMP HOT 9
- Implement forcing term in Cython
- Obstacle avoidance
- Release 0.7.0
- Implement pose coupling in Cython
- coupling terms not matching the equation in article HOT 1
- Not able to run the tests HOT 3
- JOSS suggestion: Update Copyright year in LICENSE HOT 1
- JOSS suggestion: Statement of need HOT 1
- JOSS suggestion: Summary HOT 1
- JOSS suggestion: Add statement of need to documentation HOT 1
- Question of time-phase mapping and alpha value for canonical system alpha HOT 10
- Release 0.8.0
- Question for sequential activation of DMPs for multiple subtasks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from movement_primitives.