Robot Cars in Action
Analysing ROS Distribution Capabilities (June 24, 2016)
This post isn't going to be as technical and work-focused as the previous ones. Instead, I wanted to showcase a bit of what one (or four!) of these Raspberry Pi-powered robots can do with ROS and some Python scripting.
Below is Terra at the University of Glasgow Open Day, showcasing a simple QR-tracking program. Using OpenCV and the fairly popular decoding library zbar, Terra's camera can pick up the presence of a QR code in a real-time feed and extracts its information. With the help of a simple mjpg streamer server, this live feed (along with the message of the QR code) is streamed on the network, where any curious prospective student can watch.
But of course it wouldn't be a tracking program without some logic to actually move the wheels and camera. As can be seen from the video below, Terra reacts not just to the presence, but also the position of the QR code in the image. Thus, it moves forwards when the code is too far away, backwards when it comes too close and uses the camera's pan and tilt to re-centre on it. When the code is found to be both too far away and not centred, the wheels do their part in steering the robot's chassis towards it.
The Open Day was an exciting opportunity to talk to students who are still feeling their way around what it means to be a developer and a computer scientist. Many of the people I spoke to were quite keen on getting hands-on experience with gadgets like Terra, but were not sure about the level of programming proficiency needed to do so. Hopefully the revelation that most of the code for Terra's program was written in Python gave them some reassurance that not all neat code needs to be obscure and hard to master!
Yet, as exciting as a single nimble robot is, the goal is to have all 9 scuttling around the office! Below is a sneak peak of Terra and 3 of its siblings (Mercury, Venus and Mars) moving in a formation. This program is still in alpha, so try not to mind the slight "accident" towards the end of the video. :)