SO this year it seemed fate wouldn’t allow me to get my usual annual robotics fix through Eurobot; I’m at uni the week of the UK competition studying for my masters.
Instead, myself and a couple of colleagues have decided to put a few days work into the Cloud Robotics Hackathon. The theme this year surrounds remote robot monitoring, which, given our involvement in a telematics project at work, suits us down to the ground.
Project: Remote Simultaneous Localis(z)ation and Mapping (SLAM) using cloud services
The plan is to convert the robot we entered into Eurobot last year to transmit data to the ‘cloud’ web service, myrobots.com. It will roam around a room, scanning its path with infrared sensors, and transmit these readings along with encoder readings. This information will then be used to construct a map of the robot’s environment. Myrobots will be used to display robot status information, and alerts about changes in the environment.
As the robot already has a CAN bus on board, we will be using a proprietary CAN data logger and GPRS transmitter that will give us web-side access to the data. Some post-processing will be required in order to convert the odometry readings to x, y distances from an origin, and to translate the distance sensor readings into a scatter plot of known objects in the room. Once this has been processed, the data will be logged using the myrobots API, and displayed on a web front-end along with a canvas drawing of the robot’s known environment.
That’s the plan anyway…
The requirements of the Eurobot competition are very different to CRH. The robot was pre-programmed to follow a specific path, (for example, North 500, West 250, etc, etc.) using the encoders to recognise when it had completed a path step, before moving on to the next one. For this task, the robot will be free-roaming, using the encoders to measure how far it’s travelled, but not to dictate the distance TO travel. This will require a fairly extensive re-factoring of the software from Eurobot.
Today I have dug out the old machine, and given it a once-over. There was quite a bit to do in terms of electrics, as there were things such as the automatic shut-off relays, pull-cord starter, etc that won’t be required for this. So I removed them, and re-routed the power wiring to supply power to the two control boards, and the motor controllers. The robot image below pretty much describes the state of the robot when I started today:
I also removed the Sharp infrared distance sensors from the rear of the robot and fitted them to the ‘lid’ along with the ultra-sonic. These sensors will work together to give us the directional wall distance measurements, with the ultrasonic providing us with an obstacle-avoidance zone that will detect anything that falls in between the IRs.
The plan will be for the robot to travel forwards, taking distance measurements from the IRs until the ultrasonic picks up an object that is too close. The robot will then rotate on the spot until the ultrasonic reading is over an allowable range, before moving forwards again.
In terms of software, I started to strip out some of the path-following code from the main control software, and got it to the point where it would start up, and turn the motors indefinitely. This means that it is now not looking for the target encoder readings that it was looking for before. (WIN)
I’ve also done some work on the motor control strategy. For the Eurobot competition, the speed of the motors were reduced if their side was found to be traveling further than the other. This resulted in the robot veering off course somewhat. Looking at the way dual motor controllers work, it seems that a similar speed comparison is done, but the speed of only one wheel is varied, faster or slower, to keep the robot in a straight line. I’m hoping that I’ll be able to do something similar in software.
Unfortunately the batteries are now flat (both mine and the robot’s) so I will have to complete this tomorrow.
Tomorrow should see the robot driving in a straight line, and I will try get an update on what my web-side teammate, Toby Pinder (@tobypinder) has achieved.