sea-bass / pyroboplan

Educational Python library for manipulator motion planning
https://pyroboplan.readthedocs.io
MIT License
216 stars 22 forks source link

Fix trapezoidal velocity trajectory generation time scaling #25

Closed sea-bass closed 4 months ago

sea-bass commented 4 months ago

In the previous implementation, every trajectory used its own limits by only ensuring it finished at the same time. While this worked, it means that technically all the degrees of freedom were not synced up.

In this PR, we change the logic to make sure that a single time scaling is computed with the most limiting speed/acceleration in consideration, and then use that for all degrees of freedom.

This ends up simplifying the math significantly, as there is no longer a quadratic to solve!

github-actions[bot] commented 4 months ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
pyroboplan
   __init__.py00100% 
pyroboplan/core
   __init__.py00100% 
   planning_context.py880%1, 4, 9, 13–15, 17–18
   utils.py85297%155–156
pyroboplan/ik
   __init__.py00100% 
   differential_ik.py871483%146–147, 156–157, 181, 187, 193, 196, 224, 227, 235–236, 241, 247
   nullspace_components.py16160%3, 6, 22, 25, 45–46, 48–54, 57, 75–76
pyroboplan/models
   __init__.py00100% 
   panda.py410100% 
   utils.py40100% 
pyroboplan/planning
   __init__.py00100% 
   cartesian_planner.py92594%115, 139, 143–144, 207
   graph.py400100% 
   rrt.py1582584%129–130, 132–133, 149, 152, 160, 333, 378–383, 387–388, 392–394, 397–398, 406–407, 410–411
   utils.py60100% 
pyroboplan/trajectory
   __init__.py00100% 
   polynomial.py1261885%127, 129–130, 132–134, 136–137, 140–143, 146, 151, 156, 165, 192, 261
   trapezoidal_velocity.py1531888%283–284, 316, 318–322, 324–325, 328–331, 334, 339, 344, 353
pyroboplan/visualization
   __init__.py00100% 
   meshcat_utils.py181138%40–41, 43, 45, 57, 81–82, 109–111, 113
TOTAL83411785% 

Tests Skipped Failures Errors Time
62 0 :zzz: 0 :x: 0 :fire: 17.262s :stopwatch: