hungpham2511 / toppra

robotic motion planning library
https://hungpham2511.github.io/toppra/index.html
MIT License
625 stars 170 forks source link

Final Trajectory Violates Acceleration Limits #41

Closed EdsterG closed 5 years ago

EdsterG commented 5 years ago

I've noticed that the optimized trajectories coming out of instance.compute_trajectory don't respect the acceleration limits. When I evaluate the trajectory at every point on ss_waypoints, at times the acceleration is almost double the limit.

EdsterG commented 5 years ago

Was actually a bug in my code.

cbames commented 5 years ago

I'm running into a similar problem, what was the bug in your code?

mrunaljsarvaiya commented 5 years ago

Any updates on this? I'm having the same problem

hungpham2511 commented 5 years ago

Can you post a minimal example that demonstrate the issue?

Bests,

Hung


From: Mrunal Sarvaiya notifications@github.com Sent: Friday, July 12, 2019 7:30:41 AM To: hungpham2511/toppra Cc: Subscribed Subject: Re: [hungpham2511/toppra] Final Trajectory Violates Acceleration Limits (#41)

Any updates on this? I'm having the same problem

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/hungpham2511/toppra/issues/41?email_source=notifications&email_token=ACKD6TARCZXFRCGALCGKMCTP667CDA5CNFSM4HGB7HN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYIHPA#issuecomment-510690236, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACKD6TAC7JQ72WB6RNHBL2TP667CDANCNFSM4HGB7HNQ.

mrunaljsarvaiya commented 5 years ago

Thanks for the quick reply @hungpham2511 ! Here is a minimal example to demonstrate the issue. Code and data for the test can be found here

Test description

The toppra_test.npy file contains data for a trajectory that has 384 points for a 7 DOF robot. Most of the code in toppra_example.py is taken from the toppra tutorial here

After sampling the generated trajectory to get the velocity and acceleration data, the maximum acc and vel per robot joint is found. Since the acc and vel limits are symmetric, the maximum acc and vel values are found by taking the max over their absolute values.

Expected results

It is expected that the maximum velocity and acceleration per joint is lower than their corresponding limits

Results

The results below show that the limits are not respected:

Joint 1: Vel limit: 0.87, Acc limit: 0.8 Max Vel: 0.72, Max Acc: 1.02

Joint 2: Vel limit: 0.87, Acc limit: 0.8 Max Vel: 0.57, Max Acc: 1.04

Joint 3: Vel limit: 0.87, Acc limit: 0.8 Max Vel: 0.59, Max Acc: 1.30

Joint 4: Vel limit: 0.87, Acc limit: 1.0 Max Vel: 0.62, Max Acc: 1.48

Joint 5: Vel limit: 0.87, Acc limit: 1.0 Max Vel: 0.88, Max Acc: 1.40

Joint 6: Vel limit: 0.87, Acc limit: 1.0 Max Vel: 0.85, Max Acc: 1.20

Joint 7: Vel limit: 0.87, Acc limit: 1.0 Max Vel: 0.82, Max Acc: 1.41