parallaxinc / Simple-Libraries

Contents of the SimpleIDE workspace folder and its Parallax Learn Simple Libraries subfolder.
http://learn.parallax.com/propeller-c-set-simpleide/update-your-learn-folder
21 stars 21 forks source link

servo360 - try adding delay in calculated distance during acceleration #149

Open AndyLindsay opened 6 years ago

AndyLindsay commented 6 years ago

This could help remedy two issues:

servo360 - ActivityBots fishtails in transitions out of turns at high speeds The reason the AcivityBot fishtails during high speed turns is because the error calculation between calculated and measured distance gets really large because there is a several pulse delay between a change in signal pulse and servo action. After the accelerations are done, the control system compensates for the accumulated error. By adding a several pulse delay to the distance recalculations, the control system won't have to make up for a large error.

servo360 - ActivityBots with similarly asymmetric zero speed deadband not meeting navigation goals "Maybe" preventing the large errors will allow the control system settings to be increased slightly to address any curving with mismatched servos.

AndyLindsay commented 6 years ago

(step 1)

Added as commented code (that does work). Needs either tuning or extra conditions so that it doesn't introduce errors when slowing down to a stop.

https://github.com/parallaxinc/Simple-Libraries/tree/68fea9edeb6edadeed65b07f55c4dccf6949ba48