Skip to content
Daniel Farrell edited this page Mar 30, 2014 · 16 revisions

This page will detail the software packages and projects required for running our code.

Any change to the codebase that requires additional non-standard packages or libraries should document those changes here. Consider including things like the motivation for the requirement, what goes wrong without it, and how to tell when it's no longer required.

Note that the Dev Environment Setup wiki is designed as a walk-though of how to configure a ready-to-contribute dev environment, whereas this wiki should read more like a dump of independent sections that go into detail about their respective dependencies. Software that is nice to have when creating a dev environment, but not strictly a dependency of our code, doesn't need to be documented here (virtualenv, virtualenvwrapper, pip).

Linux

We only support Linux at the moment, although Mac support will likely eventually happen (shouldn't be a big difference). It likely doesn't matter which distro you use for development. The bot runs off a modified version of Debian, released by the wonderful Robert C. Nelson, for use on a BeagleBone Black.

The IEEE Robotics Team has no intention of supporting Widows, as it's too big of a pain. The community is welcome to add Windows support.

There are a number of ways to get a Linux dev system:

  • Install it natively (drink the Kool-Aid, it's wonderful).
  • Use a VM.
  • Install it on a reasonably fast flash drive. Note that this is different than a "live install", which basically is a copy-on-write system with limitations that don't exist in full installs. This option is meant to imply a full install, with a target drive that happens to be a flash drive instead of an internal HDD or SSD. The Sandisk Extreme USB 3.0 drive is basically an SSD in a flash drive form factor (has an SSD controller and such - it's functionally an SSD). The IEEE Robotics Team may eventually have some of these configured for devs and ready to be loaned out, budget permitting.

Since Debian (runs on the bot) uses APT as its package manager, the wiki will typically provide examples as if the user's package manager is APT. These should cleanly carry over for users of distros that are downstream of Debian, like Ubuntu and Mint. Users of Fedora, RHEL or CentOS typically use yum as their package manager, and can simply replace apt-get install with yum install in most cases (we'll attempt to document exceptions).

Python 3.4.0

We're going to try moving to a current Python version this year, as compared to 2.7.X last year. 3.4.0 is very new, so there's a good chance there's not a binary in your distro's repo (that's the case for Fedora 20, which adds upstream updates very quickly, as of 3/26/14). Given that, we'll compile from source.

Now grab the source from the project's downloads page. For the Gzipped tarball, which I'll be using for this documentation, you can directly grab it here.

If you don't already have a C/C++ compiler, grab one.

Navigate to the directory that contains the tarball, then run:

[~dl]$ tar zxf Python-3.4.0.tgz
[~dl]$ cd Python-3.4.0
[~dl/Python-3.4.0]$ ./configure
<snip lots of output>
[~dl/Python-3.4.0]$ make
<snip lots of output>

Notice this section of the make output, likely fairly close to the end of the flood:

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel      
_lzma                 _ssl                  _tkinter           
readline              zlib                                     
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Those parts of Python will not be supported in the binary I just built. The necessary system libraries used by the Python standard library where not installed, so Python couldn't be compiled to use them. So far, I know that zlib support is required for some virtualenv steps (specifically, mkvirtualenv -p /usr/local/bin/python3.4 vbot). There may be other required packages we find later, or people with other distros may not run into this problem (I'm on Fedora 20).

You can install the required system libraries, then run make again. It should complete much more quickly this time. I suggest doing this to reduce the likelihood of problems later. This is the Fedora syntax, but Debian-world should be similar.

[~dl/Python-3.4.0]$ sudo yum install zlib-devel  # Required for some venv work
[~dl/Python-3.4.0]$ sudo yum install ncurses-devel  # May help with ipython
[~dl/Python-3.4.0]$ sudo yum install readline-devel  # Helps with interpreter behavior
[~dl/Python-3.4.0]$ sudo yum install openssl-devel  # May help with pip
[~dl/Python-3.4.0]$ make

Note that many modules are no longer listed:

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _lzma                 _tkinter                                      
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

You can now proceed with the optional tests and the system-wide install.

[~dl/Python-3.4.0]$ make test  # Optional, don't do if in hurry
<snip lots of output>
[~dl/Python-3.4.0]$ sudo make install
<snip lots of output>

jschornick/i2c_device

i2c_device provides a very cool way of building an I2C library that can support diverse hardware. It accepts a YAML description of the hardware's I2C configuration and provides a Python library for communication with that hardware.

It's recommended to install this project to a virtual environment. The latest version will be installed automatically for you when you run pip install -r requirements.txt against the requirements.txt file in this repo (IEEERobotics/bot). For the sake of documentation, it can also be installed this way:

(vbot) [~]$ pip install git+git://github.com/jschornick/i2c_device.git

IEEERobotics/DMCC_Library

We've contributed to Exadler's Dule Motor Control Cape (DMCC) project by building a fast, native-Python library for their cape.

It's recommended to install this project to a virtual environment. The latest version will be installed automatically for you when you run pip install -r requirements.txt against the requirements.txt file in this repo (IEEERobotics/bot). For the sake of documentation, it can also be installed this way:

(vbot) [~]$  pip install git+git://github.com/IEEERobotics/DMCC_Library.git

Standard Dev Tools

Many of these things you likely already have. For the sake of thoroughness, we'll try to include them here.

C/C++ Compiler

You need these when installing packages from source.

[~]$ sudo yum install gcc gcc-c++

ZeroMQ

ZeroMQ (ZMQ) is a messaging library that's pretty awesome.

TODO: More details TODO: Extract and move to API project when it's spawned

You could install the ZMQ Python bindings with PIP, but since you also need libzmq, which you'll need to get from your system package manager (APT, yum), it's cleaner and less likely to cause confusion if you install PyZMQ from that repo as well.

[~]$ sudo yum install zeromq python-zmq python3-zmq  # May not need Python 2.X bindings