JaciBrunning / Pathfinder

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

Turns are too wide #38

Open sriharis123 opened 6 years ago

sriharis123 commented 6 years ago

When we test straight line profiles, the profiles go the correct distance. We are using Vannaka's motion profile generator, and have also tested using the example provided in your readme, and have determined that curved profiles are too wide with a wheelbase of 2.0 feet for some reason. Increasing this to 3.4 feet in vannaka's and testing it sort of fixed the problem, but we still had to tune the x- and y-coordinates, and sometimes the final angle, to reach a working path. Here is our code: MoveOnPath I understand that this is late in the season, but we would appreciate any kind of help you can offer.

vargoose84 commented 6 years ago

Just a heads up.. this is highly related to Issue (many would say enhancement) https://github.com/JacisNonsense/Pathfinder/issues/36

JaciBrunning commented 6 years ago

Sorry, this slipped under my radar. If the graph is looking reasonable, but your robot isn't following properly, it's usually because of poor parameter tuning. Reduce your max velocity during generation to lower than your theoretical maximum

sriharis123 commented 6 years ago

Could PID also be a problem? Would that make a significant change?

JaciBrunning commented 6 years ago

Tuning is also a very big part of it, yes. In this respect, the kP, kV and kA coefficients are the most important to pay attention to