dfki-ric / movement_primitives

Dynamical movement primitives (DMPs), probabilistic movement primitives (ProMPs), and spatially coupled bimanual DMPs for imitation learning.
https://dfki-ric.github.io/movement_primitives
Other
145 stars 39 forks source link

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

Closed CodingCatMountain closed 1 year ago

CodingCatMountain commented 1 year ago

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).

CodingCatMountain commented 1 year ago

Hey, Sir @AlexanderFabisch . I have create a PR about this problem. I hope I can help to address this problem.

AlexanderFabisch commented 1 year ago

@CodingCatMountain Do you have a specific example that fails? What is execution_time, dt, etc.?

AlexanderFabisch commented 1 year ago

OK, execution_time=6.0 and dt=0.01 seems to trigger the error.

AlexanderFabisch commented 1 year ago

Should be fixed with #20. Let us know if anything is missing!