Anyway, here is a screen shot of the web control panel for the 'bot. I really should have developed this in something like Python and gotten rid of the latency that a web application entails but I did have a rationale. Namely that as part of my technical education I developed a forms building environment for PHP and that allows me to very easily and quickly deploy a web based application. So here it is.
Under control of this application my 'bot can now do the following things (though still with a couple areas of improvement):
- Move forward or backward at various speeds using the compass to maintain a straight course (tracks do not always pull uniformly).
- Throttle forward speed based on nearness to an object being approached as detected by the ultrasonic range finder.
- Detect obstacles using the four corner IR sensors and stop the 'bot.
- Reverse direction, change course, or stop under command from the web application.
- Pan and tilt the sensor stalk at the front of the robot on which the range finder and webcam reside.
- Use the range finder to scan the area within the pan range of the sensor stalk.
My first incarnation of the interface between the 'bot and this web application was to have the 'bot interact using a simple command/response dialog via HTTP. This doubled the latency for dealing between the controlling app and the 'bot so I implemented a socket based stream for communications. You still have the latency between wet ware and the web application but commands from the web app, and telemetry back, are done in real time. This is described here.
The below screen shots show the result of the ultrasonic scan that matches the photo from the screen shot above. The 'bot is in blue, the darker a return the more confident we are in it's location, and red indicates infinity. This is a very first attempt at this and has much work to do including accounting for the "cone" of coverage the sensor provides.
A third and final screenshot shows the status log display.
No comments:
Post a Comment