Hi Bernard
As the weather is getting better I am about to start working on the Ardumower again. Have you upgraded your software any further. If so if you like I can load it up and have a play
Second some advise if you would be so kind
I have been writing my own code for an
Arduino mega to control a differential drive rover that uses a compass (HMC6343 tilt adjusted compass) and an FTK gps for feedback and control. Even though the
RTK gps is supposed to be very accurate the rover still does not follow my desired course as closely as I want. I am working to fix this. Currently the rover is off course by up to 1 to 2m and I can accept up to 15-30 cm.
RTK is supposed to be accurate to 2cm so the inaccuracy is likely come from the code, motors and ground conditions.
I want the Rover to drive a reasonably straight line between its current position and the next way point and then make a 180 degree turn at the end of a lane and then drive the next lane. The lanes are defined by waypoints.
Currently I use the gps to work out a target heading from the rover to the next WP and the compass to provide the current heading. The difference between the two is the heading error. I then use the heading error to drive the motors differentially to reduce the error heading and drive in a straight line to the WP. In general this is working. However the rover is still weaving around. I want to reduce the weaving.
I will enclose a video later to show you the behavior of my rover.
Can you advise me the best/simplest way to get a rover to drive a straight course along a slightly sloping area with accurate GPS and Compass and to stay on course.
I have just tried to average the compass values in to a 4 point average. This did not lead to a big improvement.
Next I will introduce a PID on the heading error to see if that improves things
After this maybe to use encoders for both wheels with PID's
then Kalman filters
If you have experience can you suggest what be the most logical implementation of these solutions from most simple to most complicated
Also are you aware of any books on these control subjects
Regards
Max