MAZE Project challenge


#1

Hello all! So, I’ve gone through all of the Python examples successfully–within their own constraints (Basic control, Basic Servo, Ultrasonic Basic Obstacle Avoider, Browser Streaming Robot, Ultrasonic Servo, Mouse Control). Can I get some street creds?

Now I’d like to start a collaborative project that combines all of the above functions. This will enable the GoPiGo to complete a simple maze, and allow manual mouse override.

Robot setup: GoPiGo with 1) servo and ultrasonic sensor on top, and 2) camera on bottom). See attached picture.

Mode 1. The ultrasonic sensor sweeps while the GoPiGo moves forward at a slower speed.

Mode 2. The GoPiGo accelerates toward an opening once found by the ultrasonic sensor. Servo position returns to forward-facing in this acceleration mode.

Mode 3. GoPiGo stops within 10 cm of next obstacle, backs up 10 cm WHILE doing a servo sweep. Sweep not clear= back up left for additional sweep. If clear, go to mode 2. If not clear, go to mode 4 (Mode 4 the same as mode 3, but with a back left turn, rather than a right turn).

Mode 4. Mouse override. Once the mouse is moved, GoPiGo obeys its commands. Mouse control times out after the mouse is not moved within 5 seconds and the GoPiGo returns to mode 1 (or 3, depending on how close an obstacle is).

Mode 5. This is continuous and runs simultaneously with the other modes–basically that the browser streaming is on so you can see via the camera’s where the bot is going on a tablet, phone, or monitor. Touching the controls would have the same override/timeout effect as mode 4.

The program should end with the giving of a command, like stop (x).

The idea is that students can tweak the values in the code (acceleration times, backup distances, servo sweep speeds, etc.) in order to compete to see whose robot can finish the maze first.

Here’s a google drive folder we can use to collaborate. Anyone can view, but send a share request to me (ianturnercms@gmail.com) and I’ll give you editing permissions so you can upload your text files or anything else in the folder or make comments on the doc that’s in the folder.

Please know that even if no one offers help, I will still try on my own and share my progress on the doc and make the results open for anyone else to try. Helpful replies to this forum post may also be pasted in the doc.

https://drive.google.com/folderview?id=0B6PQFMeX-HXrfmZmSFhTTkh0Umtfc21GLVJFUUZuOEFocWhXMUJ4eUNDVzI2MkhUakNiLTQ&usp=sharing