Stanley Lio‎ > ‎

YURT Rover Control System Demo

Note: This page contains slides and codes used for the 2012 York University Rover Team control system tutorial.


Files

You will find the slides and code used in the control system demo at the bottom of this page. A brief description:

  • BusControl.zip and Protocol.zip are the code that implement the communication link between the OBC and the microcontrollers;
  • MicrocontrollerSource.zip is the code for all the controller boxes;
  • Rover Communication System - OBC....docx is a draft of a specification of the entire rover communication framework;
  • meh.pptx is the slide I used in the demo;
  • pyScript.zip contains the Python scripts I showed in the demo, including the script to drive the rover with gamepad;
  • udp.zip contains a sample program from the official Python website showing how to send and receive in UDP.

Inside Protocol.zip and BusControl.zip there is a folder named "html". It is the documentation for the two projects, and "index.html" is the front page. They contain brief description of the methods of the two classes that might help you navigate the source code.



Comment on the demo on Friday Nov. 23, 2012

There were a few things I couldn't get to because we ran out of time:

  • We didn't setup the development environment on your own computers. Depending on the demand I might be able to hold another hacking section just for this;
  • I didn't get to show how you can make the rover follow you using the ultrasonic sensor. But it is a simple enough idea that can be left as exercise. Just replace the code that read the gamepad with code that read and process the ultrasonic sensor readings;
  • I was hoping to show an example of how to send and receive a string using UDP. The official example from Python.org is at the bottom of this page. You can try it out on your own computer. Just two very simple 10-line scripts.
But hey we did gut the rover (and put it back together) so that's an achievement.



Software Packages

Python 2.7.3:
http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi

pyserial (for serial communication):
http://sourceforge.net/projects/pyserial/files/

pygame (for gamepad control):
http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi

EAGLE PCB editor (for those who are interested in making custom electronics):
http://www.cadsoftusa.com/download-eagle/


Instructions to install boost C++ library

Install Visual Studio Express for C++ (latest = 2012. I used 2010):
http://www.microsoft.com/visualstudio/eng/downloads

Download and extract the boost archive into C:\ (latest = 1.52.0. I used 1.48.0):
http://sourceforge.net/projects/boost/files/boost/1.48.0/

cd into the extracted boost folder, then execute

    bootstrap
    .\b2 --build_type=complete
    .\b2 --build_type=complete --with-python --with-system --with-thread --with-date_time



Resource for components

Pololu Simple High-Power Motor Controller:
http://www.pololu.com/catalog/product/1383

Pololu High-Power Motor Drivers:
http://www.pololu.com/catalog/category/82

Sensors from Sparkfun:
https://www.sparkfun.com/categories/23



November 22, 2012



<- HOME

All Rights Reserved. Stanley Lio, 2014

ċ
BusControl.zip
(3718k)
Stanley Lio,
Nov 23, 2012, 8:48 PM
ċ
MicrocontrollerSource.zip
(312k)
Stanley Lio,
Nov 23, 2012, 8:48 PM
ċ
Protocol.zip
(3780k)
Stanley Lio,
Nov 23, 2012, 8:48 PM
ć
meh.pptx
(1028k)
Stanley Lio,
Nov 24, 2012, 3:26 PM
ċ
pyScript.zip
(20k)
Stanley Lio,
Nov 23, 2012, 8:48 PM
ą
Stanley Lio,
Nov 21, 2012, 7:37 PM
ą
Stanley Lio,
Nov 22, 2012, 7:26 PM
ċ
udp.zip
(1k)
Stanley Lio,
Nov 22, 2012, 7:18 PM