Warthog Low‐Level Setup - norlab-ulaval/Norlab_wiki GitHub Wiki

This page explains the step we went through to configure the Warthog's Low-Level computer on ROS2 Humble and interface it with all the components. In general, we used the scripts provided in this tutorial, but we preferred to run the commands one by one to understand what it does.

Install Ubuntu 22.04

  1. Download the image from here.
  2. Flash a USB key with the image.
  3. Plug it in the computer.
  4. Boot computer and enter BIOS by pressing ESC.
  5. Once in BIOS, boot on the USB key from the "SAVE AND EXIT" tab.
  6. Install Ubuntu normally.
  7. Remove the USB key once finished.

MCU Firmware update

We followed the guide here to update the firmware. The steps are the following:

  1. Install Clearpath Firmware package on your laptop:
sudo apt install ros-humble-clearpath-firmware
  1. Place the MCU in bootloader mode by pressing "BT0" button during boot.
  2. Plug a micro-USB cable between the MCU and your laptop.
  3. Run the Clearpath firmware flash tool:
source /opt/ros/humble/setup.bash
ros2 run clearpath_firmware flash
  1. Select your platform, the script will flash the firmware automatically.
  2. Power cycle the robot.

Environment setup

Most of the environment setup can be done with the Clearpath script available here:

wget -c https://raw.githubusercontent.com/clearpathrobotics/clearpath_computer_installer/main/clearpath_computer_installer.sh && bash -e clearpath_computer_installer.sh

Network

Do not use the Clearpath script to configure the network. Instead, create a Netplan file in /etc/netplan/50-norlab-setup.yaml with the following content:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s31f6:
      dhcp4: 'yes'
      dhcp6: 'no'
    enp5s0:
      addresses:
        - 192.168.131.1/24
      gateway4: 192.168.131.255
      nameservers:
        addresses:
          - 8.8.8.8

Then, apply the config with:

sudo netplan apply

CAN

The CAN bus is necessary to communicate with the motor controllers. To give the user the right to communication over CAN bus, you first need to add <user> to the dialout group.

sudo usermod -aG dialout <user>

When the sevcon_traction node is launched, is you get heartbeat errors, make sure to remove the E-Stop on the robot and the remote to allow the MCU to communicate with the motor controllers.

The configuration of the CAN bus for the batteries is detailed in Warthog Batteries (Sysnergie)

⚠️ **GitHub.com Fallback** ⚠️