The sensors are working, remote control is working – all that remains is to combine them and provide the Raspberry Tank with its first autonomous capability.
To begin with, I implemented a very simple behaviour, as follows:
- Drive forwards until the range to an obstacle in front of the tank is less than one metre
- Shoot whatever is in front of the tank
- Reverse slightly and turn to the right
- Start driving forwards again, and repeat.
As always, you can download the public domain source code from my GitHub.
In the video below, the tank is having its sensors and autonomous behaviour tested on the bench:
And below, it’s first venture into autonomously navigating the world.
Well, that didn’t go quite according to plan. But it is progress! Next time on the Raspberry Tank Build Diary, we’ll tweak the parameters that autonomy uses and see if we can get a better result!