Getting started

A guide for the electronics and mechanics team, when they need to test.

First of all, you’ll want to get a copy of the code. We’re using git for version control, so you can get that like this on the command line:

$ cd ~/idp_shared/<yourcrsid>
$ git clone ~/idp_shared/Common/repo.git
Initialized empty Git repository in /groups/IB/idp/idp-l205/efw27/repo/.git/
$ cd repo

After you’ve done this once, you should type the following every time the software team change the code:

$ cd ~/idp_shared/<yourcrsid>/repo
$ git pull

Useful programs

The following launches a keyboard interface for remote controlling the robot. Upon startup, it describes the key-mapping:

$ ./test t_remote

To test the competition code, use:

$ ./test t_all

Which allows you to enter the main routine at any point in the sequence

Calibration

To calibrate the eggsensor:

$ ./test dev/t_eggsensor_calib
constructed
initialized
Try and vary the ambient light while sampling
Place over brown egg, and hit enter

This program will expect you to place each egg until it in turn, and will take samples. Do this on the conveyor. Make sure to sample the edges of eggs as well as the centers. Also, spin the creme egg.

Running this will regenerate the egg_stats.cc file. To check the calibration, run the following, which will show which eggs are being read:

$ ./test t_eggidentify
none
none
brown
...

When things go wrong

You’ll get errors if things aren’t working. A common one is:

terminate called after throwing an instance of 'LinkError'
  what():  Host not found on network
./test: line 1: 22780 Aborted                 tests/$1.wifi

If this occurs, the robot is probably not yet powered. Wait for the blue LED. If all fails, pull the plug on it and try again.

Another one is:

terminate called after throwing an instance of 'PortError'
  what():  Port P1 disconnected.
./test: line 1: 22780 Aborted                 tests/$1.wifi

Which indicates a missing or broken electronics board. You can debug further with:

$ ./test t_conns
constructed
initialized
Testing P1... Connected
Testing P2... Connected
Testing P3... Disconnected

If all fails, then the controller itself probably needs its power taken away.

TL;DR: turn it off and on again

Building the docs

This documentation is autogenerated. Building it is slightly involved, and won’t work on the department computers. It requires python and doxygen:

$ pip install breathe sphinx_rtd_theme   # first time only
$ cd docs
$ doxygen
$ make html  # or make.bat html on windows

The docs will be placed in docs/_build/html.