Robomagellan (Let’s not over-think this little problem)

The first of 2 Robomagellan competitions in my area was held this weekend. This one was more of a “lite” version of the one that will be in august and there were only 3 entries. I actually did better than last time by actually getting close to one cone in my last run. I would have done quite a bit better if not for one minor problem, I would start a run and conestoga would promptly make a right turn and head toward a retaining wall. The first time it happened I took it the building that we were using as a sort of staging area and plugged it into a monitor and keyboard and took a look at the data conestoga had collected (conestoga saves everything it senses or does when “running” to a csv file, it also records time stamped video information from the 2 forward facing cameras. It does all of this and the work of running conestoga using only about 50% on each core of a core 2 duo processor).

I initially misinterpreted some compass data and made a software tweak based on that which made things worse on the next run. After looking at the next run data I realized that I had misinterpreted the data and set things back as they were. I did several short runs trying to find out what the problem was each time going back and looking at the data and making small software tweaks. Things didn’t really get better until the last run I made when conestoga headed for and reached the first cone reasonably well but by that time my batteries were running low and I had to shut conestoga down (I use sla batteries running them too low will damage them)

After getting home later I decided to look at the data again and the answer to the problem was immediately apparent (which, of course, it wasn’t at the competition). Since conestoga was turning at the competition I concentrated on the compass and steering code. When I sat down and looked at the data in the comfort of my basement over a cold beer I realized that I would start a run BEFORE the gps had a good lock and conestoga would run off in a random direction because it didn’t know where it was. Every time I would do a run I would try to get going a quickly as possible so that I would use the least amount of battery power and because of that I had problems. Had I waited a minute or two I would have been ok (conestoga warm starts the gps every time it’s “program” is run). On the last run conestoga started in a direction that didn’t run it into some obstacle so I let it continue it finally got a gps lock and continued on it’s way to the first cone. I had, however, tweaked the steering code to the point that steering was very sluggish (it was taking conestoga 10 seconds to make a 35 degree correction) so it couldn’t turn very quickly or sharply but even with that it did reasonably well.

I had also installed a doppler microwave radar on conestoga that was actually very effective at detecting obstructions especially when used in conjunction with an ir line laser and a webcam hacked to only see ir (conestoga has two cameras one sees normally for detecting cones the other in ir for collision avoidance). However I had to turn it off because I had mounted it too low and high blades of grass would set it off.

Conestoga stops when the microwave trips the microwave code then has the line laser routine blink at the obstruction and compare camera images to see if the obstruction had moved away or was still there. For example, a person walking too closely in front of conestoga would trip the microwave and conestoga would stop but after they moved conestoga would continue on it’s way. If the obstruction did not move conestoga would back up a bit do a 90 degree turn drive a meter or so then continue the run. I found that, in addition to the need to raise the doppler module higher, the “blink” time between the images being compared needed to be lengthened to give people more time to move. All in all I think the doppler microwave radar is very effective for collision avoidance as it will detect both a brick wall and a bush reliably (which can’t be said for ultrasonic sensors) and they are reletively cheap, $20 – $30 for modules whose outputs are ttl compatible. Here is a link to some video showing the microwave/line laser collision avoidance working (and detecting tall grass). Jump to about 1 minute 10 seconds in the video.

There was a bit of hilarity when on one of the runs conestoga had detected a person in front of it and went into it’s collision avoidance routine while it was doing that people gathered around in a bit of a circle to watch it and it basically could not find its way out so it would backup turn, backup turn…, it reminded me of a bug in a jar.

I had a lot of fun and learned a lot.

HL

Me and my nephew at may robomagellan.

Me and my nephew at may robomagellan.

Conestoga at May 2013 Robomagellan

Conestoga at May 2013 Robomagellan

This entry was posted in Conestoga and Robomagellan. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *