JaciBrunning / Pathfinder

Cross-Platform, Multi-Use Motion Profiling and Trajectory Generation
MIT License
255 stars 78 forks source link

Allow TankModifier to produce negative velocity for inside wheel on tight curves #50

Open DrewTheRat opened 6 years ago

DrewTheRat commented 6 years ago

For Issue #36 I modified the logic in tank.c to detect when the left or right path is moving in the opposite direction as the original path. In such cases, I negate the distance which in turn generates a negative velocity.

I tested a bunch of tight turns, and the velocity goes negative as expected (i.e. when the inside path goes back on itself)

vargoose84 commented 6 years ago

Could this now work with waypoint 0,0,0 to 0,0,90(degrees). Previously and understandably it would produce sigsegs

DrewTheRat commented 6 years ago

It won't do that. It only addresses sharp turns in the rank modifier.