Install Barrett System under Ubuntu 14.04.1 LTS with Xenomai 2.6.4

Notice - Important Compatibility Notes

This software is NOT meant for use with the WAM's internal PC/104. It is configured for use with external PC's, and has only been tested with the following hardware configuration:

  • Motherboard: Advantech AIMB-584QG2-00A1E (Socket 1150, Broadwell)
  • Processor: Intel Core i3-4330 (Dual-core, 3.5GHz)
  • CAN Card: Dual-port PEAK-System PCI with 500V isolation, installed in 2nd PCI slot

These instructions use the Kernel detailed here: Ubuntu 14.04.1 Kernel

Before following these instructions, you should install a copy of Ubuntu 14.04.1, WITHOUT downloading any additional updates.

Install kernel from Debian

Download custom kernel

sudo wget http://web.barrett.com/support/WAM_Installer/linux-image-3.14.17-xenomai-2.6.4.barrett_amd64.deb
sudo wget http://web.barrett.com/support/WAM_Installer/linux-headers-3.14.17-xenomai-2.6.4.barrett_amd64.deb

Install custom kernel

sudo dpkg -i linux-image-3.14.17-xenomai-2.6.4.barrett_amd64.deb
sudo dpkg -i linux-headers-3.14.17-xenomai-2.6.4.barrett_amd64.deb

Install Xenomai

cd /usr/src
sudo wget http://web.barrett.com/support/WAM_Installer/xenomai-2.6.4.tar.bz2
sudo tar -xjf xenomai-2.6.4.tar.bz2
sudo rm xenomai-2.6.4.tar.bz2

Some updating for GRUB

sudo update-initramfs -c -k "3.14.17-xenomai-2.6.4.1"

Set up Xenomai

sudo addgroup xenomai
sudo usermod -aG xenomai robot

Use the following command to identify the xenomai group id number

XENGRPNUM=$(egrep -i "^xenomai" /etc/group | cut -d':' -f 3)

Add kernel option with group id

sudo sed -i "s/quiet\ splash/quiet\ splash\ xeno_nucleus.xenomai_gid=$XENGRPNUM/" /etc/default/grub

Update rc.local

sudo sed -i '/exit\ 0/ i\/usr/xenomai/sbin/rtcanconfig\ rtcan0\ -b\ 1000000\ -c\ none\ start' /etc/rc.local
sudo sed -i '/exit\ 0/ i\/usr/xenomai/sbin/rtcanconfig\ rtcan1\ -b\ 1000000\ -c\ none\ start' /etc/rc.local

Update your grub2 to reflect recent changes

sudo update-grub
#Install Grub Customizer to graphically make our new kernel the default
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install -y grub-customizer

Open the Grub 2 GUI and move kernel 3.14.17-xenomai-2.6.4 to the top of the list and save the configuration

sudo grub-customizer

Build Xenomai userspace libs

cd /usr/src/xenomai-2.6.4
sudo ./configure --enable-dlopen-skins
sudo make
sudo make install
sudo chgrp xenomai /dev/rtheap
sudo chgrp xenomai /dev/rtp*

Restart your PC to complete Xenomai Setup

sudo shutdown -r now

Install Barrett Technology software

sudo apt-get update
sudo apt-get install -y g++ cmake libncurses5-dev spell subversion ssh python-dev python-argparse libeigen3-dev libboost1.46 libgsl0-dev libxenomai-dev libboost-all-dev libboost-thread-dev libboost-python-dev python-visual libgtkglextmm-x11-1.2-dev git

wget http://web.barrett.com/support/WAM_Installer/libconfig-barrett_1.4.5-1_amd64.deb
sudo dpkg -i libconfig-barrett_1.4.5-1_amd64.deb


#Get the latest compatible version of libbarrett
git clone https://git.barrett.com/software/libbarrett.git
cd libbarrett
git checkout release-1.3.0
cmake .
make
sudo make install
mv .bash_aliases ../
cd
. ~/.bashrc

sudo bash
echo /usr/xenomai/lib/ | cat > /etc/ld.so.conf.d/xenomai.conf
ldconfig
exit

#Install Xenomai 2.6.4 version of btclient and bash aliases
git clone -b proficio_p3-svn https://git.barrett.com/software/btclient.git ~/btclient
cd ~/btclient
sh makeall
mv .bash_aliases ../
cd
. ~/.bashrc
Last modified 3 years ago Last modified on Jan 20, 2021, 6:50:54 PM