Code Monkey home page Code Monkey logo

movement_primitives's People

Contributors

alexanderfabisch avatar buschbapti avatar codingcatmountain avatar eeberhard avatar jkklemm avatar maotto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

movement_primitives's Issues

Not able to run the tests

I am trying to run the tests. I have installed the repo using:

  1. Cloning the repo
  2. Running python3 -m pip install -e ".[all]"

I also install tests dependencies using:

  1. python3 -m pip install -e ".[test]"

When I run the test command highlighted in the README, I get the following error:

gautamsharma@MacBook-Pro-3 movement_primitives % python3 -m nose test
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/opt/homebrew/lib/python3.11/site-packages/nose/main.py", line 8, in
run_exit()
File "/opt/homebrew/lib/python3.11/site-packages/nose/core.py", line 118, in init
unittest.TestProgram.init(
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/main.py", line 101, in init
self.parseArgs(argv)
File "/opt/homebrew/lib/python3.11/site-packages/nose/core.py", line 179, in parseArgs
self.createTests()
File "/opt/homebrew/lib/python3.11/site-packages/nose/core.py", line 193, in createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/loader.py", line 481, in loadTestsFromNames
return unittest.TestLoader.loadTestsFromNames(self, names, module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/loader.py", line 220, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/loader.py", line 220, in
suites = [self.loadTestsFromName(name, module) for name in names]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/loader.py", line 454, in loadTestsFromName
return LazySuite(
^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/suite.py", line 53, in init
super(LazySuite, self).init()
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/suite.py", line 22, in init
self._tests = []
^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/suite.py", line 106, in _set_tests
if isinstance(tests, collections.Callable) and not is_suite:
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Callable'

My system info as follows:

gautamsharma@MacBook-Pro-3 movement_primitives % system_profiler SPHardwareDataType
**Hardware:

Hardware Overview:

  Model Name: MacBook Pro
  Model Identifier: MacBookPro18,3
  Model Number: MKGQ3LL/A
  Chip: Apple M1 Pro
  Total Number of Cores: 10 (8 performance and 2 efficiency)
  Memory: 16 GB
  System Firmware Version: 10151.81.1
  OS Loader Version: 10151.81.1
  Serial Number (system): M2J4FMXJJM
  Hardware UUID: 9E39F940-63A8-50ED-AC31-7FB37BB65822
  Provisioning UDID: 00006000-001A21C91121801E
  Activation Lock Status: Enabled**

JOSS suggestion: Statement of need

After reading the draft, I got a sense that movement_primitives does claim to be faster than other repos in the same space. If that's the case, then it will be good to add that to the "Statement of Need".

Also, is there any way I can reproduce the results?

CartesianDMP object has no attribute forcing_term

I would like to save the weights of a trained CartesianDMP. There is no overloaded function get_weights() so I guess the one from the DMP base class should work. However, when calling it it raises the error in the title:

AttributeError: 'CartesianDMP' object has no attribute 'forcing_term'

Do you know what could be the issue here? Thanks in advance.

Doubt about implementation of DMP

Hi,

According to the code, the _dmp.py has been implemented following A.J. Ijspeert, J. Nakanishi, H. Hoffmann, P. Pastor, S. Schaal:
Dynamical Movement Primitives: Learning Attractor Models for Motor Behaviors (2013), Neural Computation 25(2), pp. 328-373, doi:
10.1162/NECO_a_00393, https://ieeexplore.ieee.org/document/6797340

I am going through the code and I have doubts about equation 2.3 in the paper. During the calculation of the forcing term, I could not find the (g-y0) term in the imlementation, and I have not been able to find it in the function dmp_step_euler. I would have expected to have a (g-y0) term in there.

I was hoping you could help me understand this better. Any assistance you could provide would be greatly appreciated.

Phase and forcing_term are not updated inside dmp_open_loop()

First of all thank you for sharing this great repo. It has helped me a lot to understand the theory behind DMPs.

I have been doing some experiments with your code and when changing the run_t to a different value from the original execution_time I have detected that the algorithm does not correctly adapt to the new run_t.

If run_t < execution time, the movement does not adapt and it is like the result is cut. If run_time > execution time, during that extra time the last position is kept.

I think the problem is that the phase and forcing_terms are not updated inside dmp_open_loop. It is not done either in dmp_step_euler.

I have tried to fix it myself with no luck, because I completely loose the shape of the resulting curve.

Could you help me with this?

A Problem about CartesianDMP due to the parameter 'dt'...

Hi, this package is very very very good, it do really help me to learn about the Learn from Demonstrations. But last night, I find a problem about open_loop, which is function included in the CartesianDMP class. The problem is the length about the python list, which named Yr in this function. And I have checked the source code, I found : My Y, which is passed to cartesian_dmp.imitate(T,Y), it's length is 600; And Yp in CartesianDMP.open_loop(), which returned by dmp_open_loop, it's length is 600, which are correct, but the length Yr in CartesianDMP.open_loop() is 601. I believe the relationship about T and dt in dmp_open_loop() and dmp_open_loop_quaternion() has some problem. Please Check! The T in dmp_open_loop() is initialized via this way : T=np.arange(start_t, run_t + dt, dt) , and the T in dmp_open_loop_quaternion() is initialized via this way: T=[start_t], which start_t is 0.0, and in a loop , last_t = t, t+=dt, T.append(t).

Which variation of DMPs is implemented?

Hey! First of all thank you for this amazing library 😄

I would like to ask if the DMP class is implemented using the variations proposed in [1] ( 2.1.8 section) or it is the "traditional" one. I can't really find the answer looking in to the code.

As you can see there is a bump at the beginning of the acceleration and I don't know if it may be solved by implementing the variations of Peter Pastor or the one proposed in [1].
imagen

Thank you in advance!

[1] Auke Jan Ijspeert, Jun Nakanishi, Heiko Hoffmann, Peter Pastor, Stefan Schaal; Dynamical Movement Primitives: Learning Attractor Models for Motor Behaviors. Neural Comput 2013; 25 (2): 328–373. doi: https://doi.org/10.1162/NECO_a_00393

Release 0.7.0

Feature

  • Add smooth adaptation to new goals introduced by Pastor

Documentation

  • Switch to Sphinx documentation

Testing

  • Increase code coverage from 89% to 94%

Doubt about variable 'execution_time'

Hi,

I am trying to understand your implementation and when analyzing the formula related to the rollout of the DMP, (see this line:

ydd = (alpha_y * (beta_y * (goal_y - current_y)
), I am not sure about the relation between the variable 'execution_time' and the 'tau' variable from the theory of the paper 'Dynamical movement primitives: Learning attractor models for motor behaviors' .

The division with the squared of 'execution_time' in

+ f + coupling_sum) / execution_time ** 2
confuses me. Would you have any reference paper where I could check this up?

Thank you for your time.

Release 0.6.0

Performance

  • Fast stepwise DMP execution

Bugfixes

  • Fix numerical error in Cartesian DMP open loop execution (behavior is similar to other DMP types now)
  • Make execution_time of DMPs adaptable

Can this repo for the periodic motion and orientation?

Thanks for sharing. Though DMPs are widely used to encode point-to-point movements, implementing the periodic DMP for translation and orientation is still challenging. Can this repository achieve these? If possible, would you provide any examples?

JOSS suggestion: Summary

It will be good to add a figure describing what exactly the movement primitives are trying to learn or imitate for non specialist audience. It can be a graph similar to the one in the README. Something to let the reader visually know what the goal policy is that the movement primitives are trying to imitate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.