Closed lopsided98 closed 8 years ago
I copied the pathfinder_modify_tank() function into my Java code and made minimal modifications so that it was valid Java, and it is working correctly. I did not change any of the math. This seems to indicate that the bug is in the code that interfaces with the Java library.
I forgot to mention, I am using v1.3, and it did not fix the problem.
Did not work for me neither
@lopsided98 Can you send me your code as modified in Java?
Nevermind, found a fix.
Grab release v1.4
When a valid trajectory is modified using a TankModifier, it creates invalid left and right trajectories. The velocity, acceleration and jerk are much higher than the limits specified in the config.
The velocity reaches a max value, and then never decreases. The max velocity in influenced by the period and the wheelbase width. A smaller period causes a larger max velocity. The max velocity is also proportional to the wheelbase width.
Looking more closely at the velocities, I noticed that they do increase and decrease. Once the velocity reaches its large value by the second point, it increases very slightly and then decreases by the end of the trajectory.
Here is an example of the velocities of the left side of a trajectory that drives straight forward, with period = 0.01 s and wheelbase width = 0.5 m.