Today I modified the code to give the robot some steering capability. This meant creating separate throttling variables for each motor whereas previously I had just one variable that controlled both motors simultaneously. Now when the joystick is pushed left or right the code adds to the left and subtracts from the right motor's PID value to result in different throttling between motors.
The robot can now steer but is much less reliable! Strangely, the robot has become less stable as a result of me adding this capability; it is nowhere near as stable as before with the same PID values. I am not sure why the tuning should be different but I suppose I have essentially doubled the computation needed in the subroutine than controls the motors. I have had some attempts at tuning with varied success. It is not being told to move forwards by the way, this is still an effect of drift I think. Please check out the videos below...
P.S. the robot has become a bit of a logistical challenge to test, I think you'll find these amusing :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.