Version 8 (modified by bz, 16 months ago) (diff)

--

Ubuntu 20.04, low-latency, non-realtime

Start by installing Ubuntu 20.04.

Install Peak CAN card hardware:

  • PCAN-PCI
  • PCAN-PCIe
  • PCAN-USB
  • PCAN-ISA

NOTE: These cards are supported by the SocketCAN driver built into Linux, however, we have found that the SocketCAN txbuffer can occasionally fail to send CAN frames without reporting an error, and this causes the WAM to E-Stop itself unexpectedly. This can happen a few seconds, a few minutes, or even several hours after starting a WAM application. Fortunately, Peak offers an alternative driver (pcan) which is still socket-based but avoids this SocketCAN bug.

Then install git:

sudo apt install git

Download the libbarrett source code:

cd && git clone -b feature/ubuntu2004 https://git.barrett.com/software/libbarrett

Install the libbarrett software dependencies and scripts. This will replace the standard kernel with one compiled for low interrupt latency.

cd ~/libbarrett/scripts && ./install_dependencies.sh

For PCAN-ISA only:

sudo cat <<EOF >/etc/modprobe.d/pcan.conf
options pcan type=isa,isa io=0x300,0x320 irq=7,5
install pcan modprobe --ignore-install pcan
EOF

Remove the generic Linux kernel, then reboot:

sudo apt autoremove --purge linux-image-generic
sudo reboot
}}

Build and install the Peak pcan driver:
{{{
sh ~/libbarrett/scripts/install-pcan.sh
}}}

Build libbarrett:
{{{
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cd ~/libbarrett && cmake .
make -j$(nproc)
}}}

Install libbarrett:
{{{
sudo make install
}}}

Build the libbarrett example programs:
{{{
cd ~/libbarrett/examples && cmake .
make -j$(nproc)
}}}

Get the WAM ready:
  * Connect the WAM's CAN cable to the first port of your CAN device.
  * Turn on the WAM.
  * Ensure both E-Stop buttons are released by turning them a quarter-turn clockwise.

Then run an example program:
{{{
./ex04_display_basic_info
}}}

Press Shift+Idle on the WAM's Control Pendant to exit this application.

= Installing ROS =
If your application is based on ROS, you can continue by [http://wiki.ros.org/noetic/Installation/Ubuntu installing ROS Noetic].

Then install our [https://git.barrett.com/software/barrett-ros-pkg barrett-ros-pkg].