Robot Control Library
|
BeagleBoard.org 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.
BeagleBoard.org graciously hosts the latest stable librobotcontrol package in their repositories. On a BeagleBoard product, the package can easily be updated:
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.
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.
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.
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.
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.
This step is automatically performed when using the install.sh 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.
After reboot, check that the right device tree is loaded with the rc_model program which will print something like this:
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.
Once everything is installed, run the rc_test_drivers program to confirm functionality.
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.