In undergrad I had a very simple bot that basically just avoided obstacles but didn't really do any planning
. My setup was pretty much just a Lynxmotion tank base and two 80cm range finders - one for the left and another for the right. That was 3 years ago and worked really decent for what I was trying to accomplish, but now I'd like to try and tackle something a little more advanced and would love some input from the community here. I still want to stick with autonomous path planning.
Here are the materials I have currently:
- Lynxmotion tank base
- Sabertooth motor controller
- Upgraded motors - 12v 253rpm
- Arduino Diecimilia
- Sharp G12 80cm range finder (x2)
- Hitec servo
- digital compass
So... the plan I have for now was something along the lines of mounting one of the range finders to the server and making my own ghetto laser scanner. The problem I've thought of so far with this is that the range finder only polls every 40ms; the fastest my servo can scan is about 1deg/3ms, so about 1080ms for a full 180-sweep and back (0 to 179 -> 179 to 0). Because of this, I think I can only poll every 10 degrees or so.
From here, I would read the signal and update an array that maintains a map of what's in front of me. An issue I've thought of for this is that the array won't be able to keep a history (i.e., objects beside and behind me) because I don't have an accurate way of measuring speed... I'm unsure if an encoder exists for my motor (and I'm really not sure how to use one anyways).
Once the array has been updated (e.g., after a full sweep of the range finder) I would run some sort of algorithm on it to determine the vector to use for my motors (not really sure what to do here yet - been looking up some path planning algorithms to help me out but still a little lost).
So basically, the plan is:
Do a single sweep of the range finder --> Update array/map with readings --> Adjust motors based on vectoring algorithm --> Repeat
One of the major issues I've considered with this is the time for a single loop. Obviously, I'd like the bot to move as quickly as possible. However, with a single sweep taking 1000ms+, I can't imagine it'd be safe to go any faster than a few feet a second (if that!). My top speed currently is around 5ft / second.
Any suggestions for how to improve my plan? Or what I could use the additional range finder/compass for?
Eventually I'd like to do some neat displays on my LCD - maybe showing obstacles as they appear in front of me... but that's farther down the road.