SOFTWARE
Changing hardware is slow and potentially expensive. Changing software can be fast and cheap. Prof. Revzen and his team at the University of Michigan BIRDS (Biologically Inspired Robotics and Dynamical Systems) Lab developed PyCKBot specifically to it as easy as possible to quickly code software for robots. This frees up your time and resources to address hardware challenges.
Meet PyCKBot
PyCKBot is a free, open-source software library. It runs on Linux—a free, open-source operating system that you can install on basically any old computer.
PyCKBot comes with many tools that greatly reduce your frustration in programming, testing, debugging, and running a robots. These features include:
- “Brain-in-a-Jar” mode–run your code with no robot attached
- Posable programming–quickly prototype robot motion by recording sequences of poses for playback
- Control options–control your robot via tether or wireless using almost any device: keyboard, mouse, trackpad, joystick, game controller, MIDI device, etc.
- Feedback–PyCKbot has many ways to tell you what is happening inside the software in real time: graphical feedback, logs, messages printed to the terminal, speech synthesis, etc.
- Naming modules–PyCKbot makes it simple to give modules easily recognizable names (like “right wheel” or “left rear leg”). This makes it much easier to write code that’s easier to understand, maintain, and debug.
Getting Started with Robot Software: Build a Robot-Brain-on-a-Stick

The “Robot Brain-on-a-Stick” is a bootable USB flash drive that holds all the software you need to run your robots and store your work. Plug it into any Intel-based computer, boot up, and you (and you’re projects) are ready to go. For just a few dollars, each student can have their own Brain-on-a-Stick: easy to backup, easy to carry from class to home to computer lab to wherever, no one arguing about who’s using whose computer. Bliss!
Building your brain-on-a-stick is a three-step process:
- Prep the flash drive with Xubuntu—Install a bootable version of Xubuntu (an attractive, easy-to-use flavor of Linux) on your USB flash drive.
- Add PyCKBot—Download and install the PyCKBot software library
- Add Pololu Maestro Control Center—Install free software from Pololu (the manufacturer of the control board we’ll be using) so you can test and troubleshoot your robot hardware
Please note: Building your first Brain-on-a-Stick can take a few hours, most of it spent sitting around waiting for processes to finish. Once you’ve made and tested your first one, you can quickly clone it and hand out clones to your students.
You Will Need
- An Intel-based computer. These instructions have been tested on older refurbished PC and Macbook laptops operating Windows 10 and macOS as old as version 10.14, as well as a fairly generic Chromebook.
- One ore more USB flash drives. We used an old SanDisk Cruzer 8 GB USB 2.0 Flash Drive; something like this is fine.
- If you are using a Windows-based computer, you only need one USB flash drive.
- If you are using a macOS you’ll need two USB flash drives.
- If you are using a Chromebook you’ll need three USB flash drives.
- A good Internet connect.
1. Create a bootable Xubuntu Flash Drive
The first part of this process—creating the bootable Xubuntu flash drive—is much easier on Windows than it is on a Mac or Chromebook. Fortunately, a flash drive created on a Windows machine using these instructions WILL WORK on any Intel-based computer, including Macs and Chromebooks. We strongly advise using a Windows computer for this first step.
That said, you are certainly welcome to dig whichever grave you chose. We’ve provided separate walk-thrus for Windows, Macs, and Chromebooks computers:
- Windows 10 instructions
- macOS (10.14 and later) instructions
- Chromebook instructions
Once you’ve used the above instructions to make a bootable Xubuntu flash drive, you can move on to the next step (“Install PyCKBot”).
2. Install PyCKBot
Once you’ve finished creating your bootable Xubuntu USB flash drive, the steps are all the same, regardless of what type of computer you’ve cobbled together (pretty slick, right?)
- Make sure your computer is on and running in Xubuntu.
- Open the web browser and download this “public-net-installer” shell script. Save it to the Desktop (your browser may open it instead of downloading, because the script is a text file. If that happens, you can just save the page to your Desktop as “public-net-installer.sh“)
- Open the Terminal Emulator and navigate to your Desktop (probably by typing cd Desktop and hitting Enter)
- Run the script by typing bash public-net-installer.sh into the Terminal window and hitting Enter. (This will install pyckbot in the “persistant” storage on the USB thumb drive, alongside the Xubuntu OS.)
- Get an error? No big deal; the script is gathering many packages from all over the place. An error usually means something was temporarily offline. Just try running the script again.
- Once the script finishes without errors, test PyCKBot:
- In the Terminal Emulator navigate to your pyckbot/demos folder (probably by typing cd ~/pyckbot/demos and hitting Enter)
- Run the script demo-flatscript.py (type python3 demo-flatscript.py and hit Enter)
- A new blank window titled “pygame” should pop open. Meanwhile, a bunch of stuff will scroll across the terminal window where you typed python3 demo-flatscript.py, ending with something like “
0.03: (say) starting
“, at which time you’ll hear a computerized voice say “Starting!” If all that happens, good! Click on the pygame and hit Q (or select the Terminal window and hit Ctrl-c) to kill the script. - Didn’t work? Try re-running public-net-installer.sh by doing step #4 above once more. If it still doesn’t work, then zap the pyckbot directory (i.e., from the Terminal type rm -rf ~/pyckbot and hit Enter) and then run public-net-installer.sh once more, for a clean install.
3. Install Pololu Maestro Control Center
- Open the web browser, go to https://www.pololu.com/docs/0J40/3.b, and download and install Pololu Maestro Control Center (i.e., MCC) for Linux
- Before the MCC will run, you’ll need to update a few libraries in Xubuntu. (This is discussed in the README.TXT you downloaed with MCC, and located in the folder “/maestro-linux”.) Updating these libraries is really easy
- Open the Terminal Emulator, navigate to the MCC folder (probably by typing /maestro-linux and hitting Enter). Run the following commands:
- sudo apt-get install libusb-1.0-0-dev mono-runtime libmono-system-windows-forms4.0-cil and hit Enter.
- The process will start (lots of lines scrolling across the screen), then periodically pause and ask you if you want to do this or that. Answer “Yes” by hitting Y and then Enter
- When that’s all finished run: sudo cp 99-pololu.rules /etc/udev/rules.d/ and then hit Enter (you’ll get no feedback from the computer, and that’s fine)
- Finally, run sudo udevadm control --reload-rules hit Enter (again, you’ll get no feedback from the computer)
- Done! To launch the MCC from the Terminal Emulator, make sure you’re in the right folder (“/maestro-linux“), then type ./MaestroControlCenter and hit Enter
- If you get an error message that says something like “
cannot execute binary file
“, then try running the program with the mono command: mono ./MaestroControlCenter)
- If you get an error message that says something like “
Finishing Up
You can now clone this thumb drive, and give each student their own “Brain-on-a-Stick.” On first use, have students set a password for the system and fill out the “About Me” for their brain-on-a-stick. (This will make your life easier when there are six identical unlabeled flash drives all abandoned on the same table. Remind them to write down this password and keep it safe, as you have no way to recover it).
To set up the password:
- Boot into Xubuntu
- Open the Terminal Emulator
- Type “passwd” and hit Enter
- It will request a “
New password
“ - Enter the new password, hit Enter, and then confirm the new password.
To set up the “About Me”:
- Boot into Xubuntu (if you aren’t already booted up)
- Click the little mouse icon in the upper left corner
- Click “All Applications“
- Launch “About Me“
- Fill out the “Mugshot” card
- When you click “Apply” it will request a password—use the one from Step #5 above
Now, if you find a stray flash drive you can launch Xubuntu and check About Me to see whose it is.
Next Steps
Your software is all ready. Next step: Build your Hardware.