RGB Swarm Robot Quickstart Guide

From Mech
(Difference between revisions)
Jump to: navigation, search
m (Connecting the e-puck)
(Programming the e-puck)

Revision as of 13:04, 9 September 2009

Contents

This guide was written as a quickstart guide for the RGB Swarm Robot Project, but contains general information about programming e-pucks and using the vision system.

Checklist

  • Physical Set up
    • Projector
    • Tent
  • Computer Programs needed

Computer Setup

  • Download this
  • Set up that

e-puck

e-puck Setup

Preparing the code

  • if you have the HEX file, skip down
  • compiling
  • getting HEX file

Connecting the e-puck

  1. Go to start menu >> control panel >> Bluetooth Devices
  2. Click the 'Add...' button in the lower left of the dialog window
    • Turn on the e-puck that you wish to configure/connect to the computer
    • Check the box next to 'My device is set up and ready to be found.'
    • Continue with the Next button, and the computer will search for your e-puck
  3. Once the computer finds your e-puck, select the appropriate e-puck (should be ID'd by the 4 digit ID number), and assign the 4 digit ID number as the 'passkey' for that e-puck
    • This process reserves a pair of COM(serial) port for that specific e-puck, one as Incoming and the other as Outgoing; each e-puck will have a different pair of ports
  4. Return to the Bluetooth Devices Dialog screen, and click on the COM Ports tab
  5. Check which COM ports are assigned to your e-puck, specifically the Outgoing COM port; this COM port will be used when programming this e-puck with the TinyBootloader program
  • Note: if using a USB Bluetooth dongle, when the dongle is unplugged and replugged it into a different USB port, or a different dongle altogether is used, it may be necessary to repeat these steps for each e-puck that you wish to use
  • Note: these instructions are for using Windows XP Professional Edition. The exact command paths and dialog boxes may differ from OS to OS

Programming the e-puck

Taken from: Swarm E-puck Quickstart Guide: Programming the e-puck

Programming the e-puck requires a specific program, called a bootloader, in order to (re)program the microcontroller. The bootloader makes use of the bluetooth/serial port connection, allowing for wireless programming, as opposed to connecting a specific serial port connector directly to the microcontroller. This expedites the reprogramming process. The bootloader is comprised of two parts, one which operates on the e-puck, writing code to the e-puck microcontroller, and the other, which operates on the computer as user interface. On the e-puck side, the bootloader quickly checks to see if something is trying to re-program the PIC. If so, the bootloader will simply write the new software over the old, and then run the new software. If not, the bootloader simply allows the PIC to run the program currently loaded. The computer side allows a user to select which COM port to program over (allowing one to select which e-puck to program), and selecting what HEX file to program to the e-puck.

To program the e-puck with a bootloader, follow these instructions:

  • Note: you will have to compile and build the C code from the Microchip C compiler, as the .hex file is needed to install onto the e-puck
  1. Start the Tiny Bootloader program on your computer
  2. Click the Browse button and select the .hex file that corresponds to the e-puck code that you want to program
  3. Set 115200 under the Comm dropdown menu, and select the COM port that corresponds with the OUTGOING COM port of the e-puck
  4. Click the Write Flash button
  5. Immediately click the blue reset button on the e-puck
    • Note: The reset button must be clicked before the blue status bar on the Tiny Bootloader dialog screen reaches zero, representing the program timing out.
  6. Once the bootloader starts writing software, the blue status bar will grow, representing code being uploaded and programmed
    • Note: In addition to the blue status bar, a orange LED on the e-puck will light up, signaling that a connection has been made

e-puck Troubleshooting

Machine Vision Localization System

  • Machine Vision Localization System Code

Machine Vision Localization System Setup

Vision System Troubleshooting

Additional Tools

Matlab Tools

Visual Studio Tools

Personal tools