We've been making use of Pathfinder (thanks!), and believe we have found an error in a computation.
The symptoms it causes if that if you ask for a long move with a max velocity of, say, 140, sometimes the resulting trajectory will have a computed max velocity lower than you would expect (e.g. 131).
As an example, these waypoints:
Waypoint points[] = {{0,0,0},{160, 0, 0}};
with a maxv of 140, maxa of 600, and maxj of 600 result in a trajectory that has a top velocity of 131.
The code in question is here:
https://github.com/JacisNonsense/Pathfinder/blob/master/Pathfinder-Core/src/trajectory.c#L28
That appears to be using this formula:
https://physics.stackexchange.com/questions/34077/maximum-velocity-allowed-for-motion-profile-with-constant-jerk
That code also exactly mirrors the original 254 code, so this computation appears to have originated with the poofs.
However, if you solve the quadratic equation and do the math, it appears as though there should be a '* 8' term, not a '* 4' term. And switching in an 8 for the 4 does seem to improve matters; you get a trajectory with the 140, not the 131.
We've been making use of Pathfinder (thanks!), and believe we have found an error in a computation.
The symptoms it causes if that if you ask for a long move with a max velocity of, say, 140, sometimes the resulting trajectory will have a computed max velocity lower than you would expect (e.g. 131).
As an example, these waypoints:
Waypoint points[] = {{0,0,0},{160, 0, 0}};
with a maxv of 140, maxa of 600, and maxj of 600 result in a trajectory that has a top velocity of 131.
The code in question is here:
https://github.com/JacisNonsense/Pathfinder/blob/master/Pathfinder-Core/src/trajectory.c#L28
That appears to be using this formula:
https://physics.stackexchange.com/questions/34077/maximum-velocity-allowed-for-motion-profile-with-constant-jerk
That code also exactly mirrors the original 254 code, so this computation appears to have originated with the poofs.
However, if you solve the quadratic equation and do the math, it appears as though there should be a '* 8' term, not a '* 4' term. And switching in an 8 for the 4 does seem to improve matters; you get a trajectory with the 140, not the 131.