Robot Control Library
Installation & Checking Functionality

Method 1: Use Official BeagleBone Image (recommended) official images come with the librobotcontrol package preinstalled. Follow the instructions at Updating BeagleBone Image to make sure you are running the correct image.

After flashing a new image simply reconfigure the package to set the the device tree and configure which program you may want to start automatically on boot.

sudo dpkg-reconfigure librobotcontrol graciously hosts the latest stable librobotcontrol package in their repositories. On a BeagleBoard product, the package can easily be updated:

sudo apt update && sudo apt upgrade librobotcontrol

Method 2: Install from Debian Package or Repository

For installation on other platforms, we provide 32bit armhf and 64-bit x86_64 Debian packages on the GitHub releases page. These can be downloaded and installed like any other debian package. Obviously change the name of the file in the command below to match that of the file you downloaded.

sudo dpkg -i librobotcontrol_1.0.2_amd64.deb
sudo dpkg -i librobotcontrol_1.0.2_armhf.deb

This package installation will also configure the device tree if you are installing on a BeagleBone Black or Black Wireless. Remember this package is still BeagleBone-focused and many of the functions are not applicable to other platforms. However many of them are platform-independent so we provide these packages.

Method 3: Installing From Source (not recommended)

If you insist on compiling and installing from source instead of using the debian packages above, or are king enough to help beta-test and contribute source code then you are welcome to fork the librobotcontrol repository.

An installer script exists to help compile and install from source.

debian@beaglebone:~/librobotcontrol$ ./
To continue, enter 1 to compile and install on BeagleBone
enter 2 for other platforms (Raspberry Pi, x86, etc..)

Option 2 will only install the library and examples, whereas option 1 will also do the following beaglebone-specific steps: compile and install PRU binaries, enable systemd services, and setup the Robotics Cape device tree if necessary.

Each section of the source code (library, examples, project_template, pru_firmware, & services) have their own independent Makefile. If you only want to compile and test one section such as the library itself, just cd to the library folder and make && sudo make install in just that one directory to avoid recompiling everything unnecessarily.

Additional step for BB Black and Black Wireless with Robotics Cape

After flashing a BeagleBone Black or Black Wireless with a clean image it is necessary to tell it use the Robotics Cape device tree so all of the header pins are configured correctly and all of the necessary drivers will load. This is not necessary for the BeagleBone Blue or when installing a debian package manually.

You can manually setup the device tree following command.

sudo reboot

This step is automatically performed when using the helper script described above as well as when installing, updating, or reconfiguring the debian package which you likely did if installing from source or installing the debian package manually. It is, however, safe to run in all conditions if you are unsure of whether you need to configure the device tree or not.

To revert to the standard device tree, replace uEnv.txt with the backup that was created by the previous step.

sudo cp /boot/uEnv.txt.backup /boot/uEnv.txt
sudo reboot

After reboot, check that the right device tree is loaded with the rc_model program which will print something like this:

debian@beaglebone:~$ rc_model
Currently running on a:

On the BeagleBone Blue, expect it to say BB_BLUE. If you are using the RoboticsCape on a BealgeBone Black or Black Wireless, make sure it says BB_BLACK_RC or BB_BLACK_W_RC.

Checking Functionality

Once everything is installed, run the rc_test_drivers program to confirm functionality.

debian@beaglebone:~$ rc_test_drivers
Kernel: 4.14.54-ti-r63 Debian Image 2018-07-15
Debian: 9.5
PASSED: gpio 0
PASSED: gpio 1
PASSED: gpio 2
PASSED: gpio 3
PASSED: pwm1
PASSED: pwm2
PASSED: eqep0
PASSED: eqep1
PASSED: eqep2
PASSED: pru-rproc
PASSED: uart1
PASSED: uart2
PASSED: uart4
PASSED: uart5
PASSED: i2c1
PASSED: i2c2
Currently running on a:
Robot Control library Version:

Any image after 7-15-2018 should pass all tests. If this test indicates that the PRU and ADC are malfunctioning then the bootloader need to be updated by flashing the built-in eMMC storage as described in Updating BeagleBone Image section.