<aside> 📌

Background Info

Each Team must provide a 2.5" SATA SSD with their specific OS and software installed. These SSDs will be fitted to a compatible Caddy which will be placed in the CQ67G Vehicle PC Base Platform by Event Officials prior to each Team's competition runs.

Teams are responsible for maintaining, setting up and testing their own SSD(s) as required. This includes ensuring compatibility with the CQ67G Vehicle PC Base Platform hardware (i.e. OS driver compatibility).

Core Sim Setup

<aside> ⚠️

Known issues

</aside>

  1. Flash Ubuntu 20.04 ISO onto external USB

  2. Reboot and go into your BIOS

    1. Disable secure boot if possible (you may want to disable BitLocker encryption in windows beforehand if you have this enabled to avoid frequent BitLocker key requests when starting Windows again)
    2. Change the boot order and dual boot into the USB
  3. Install Ubuntu onto external SSD

  4. Dual boot into SSD

  5. Update and upgrade Ubuntu

    sudo apt update && sudo apt upgrade -y
    
  6. Install ROS 2 Galactic for Ubuntu (Debian): https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html

    1. Set Locale

      locale  # check for UTF-8
      
      sudo apt update && sudo apt install locales
      sudo locale-gen en_US en_US.UTF-8
      sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
      export LANG=en_US.UTF-8
      
      locale  # verify settings
      
    2. Update

      cd ~
      sudo apt update
      sudo apt install software-properties-common
      sudo add-apt-repository universe
      
    3. Install ROS 2 Galactic from binaries:

      sudo apt install curl
      sudo curl -sSL <https://raw.githubusercontent.com/ros/rosdistro/master/ros.key> -o /usr/share/keyrings/ros-archive-keyring.gpg
      echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] <http://packages.ros.org/ros2/ubuntu> $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
      
      sudo apt update && sudo apt upgrade -y
      
    4. Install dev tools

      sudo apt install ros-dev-tools
      
    5. Source setup script

      echo "source /opt/ros/galactic/setup.bash" >> ~/.bashrc
      source ~/.bashrc
      
  7. Clone core-sim repository using SSH

    1. Setup SSH key in GitHub: https://docs.github.com/en/authentication/connecting-to-github-with-ssh

      1. Generate SSH key

        ssh-keygen -t ed25519 -C "[email protected]"
        
      2. Add the key to the ssh-agent

        ssh-add ~/.ssh/id_ed25519
        

      echo "source /opt/ros/galactic/setup.bash" >> ~/.bashrc

      1. Add the key to the bristol-fsai GitHub account
        1. (Ask committee to do this, or add it yourself by logging in with bristol-fsai password and 2FA)
  8. Install some dependencies for core-sim

    sudo apt install libgazebo11-dev ros-galactic-gazebo-ros-pkgs ros-galactic-joint-state-publisher ros-galactic-xacro ros-galactic-ackermann-msgs
    # You may also want to install these:
    sudo apt install ros-galactic-gazebo-plugins libyaml-cpp-dev ros-galactic-rqt ros-galactic-rqt-common-plugins ros-galactic-ament-package
    
  9. Follow setup instruction in eufs_sim ‘Getting started guide’: https://gitlab.com/eufs/eufs_sim/-/wikis/Getting-Started-Guide

    1. Install colcon (using pip3) (if not already installed)

      sudo apt install python3-pip
      pip3 install colcon-common-extensions -U
      
    2. Set EUFS_MASTER env variable (remember to change /path/to/core-sim)

      # Add source to .bashrc so it's sourced on startup
      echo "export EUFS_MASTER=/path/to/core-sim/" >> ~/.bashrc
      source ~/.bashrc
      
    3. Install rosdep (if not installed already)

      sudo apt install python3-rosdep
      
    4. Initialise rosdep

      sudo rosdep init
      rosdep update
      
  10. Follow setup instructions in core-sim README

    <aside> 📢

    Remember to switch to the right branch

    </aside>

    1. Install ROS dependencies for EUFS sim

      rosdep install --from-paths $EUFS_MASTER --ignore-src -r -y
      
    2. Install Perception module dependencies

      sudo pip install -r eufs_sim/perception/requirements.txt
      pip install --upgrade numpy
      sudo apt install ros-galactic-vision-msgs
      
    3. Colcon build

      <aside> ⚠️

      The zed-ros2-wrapper requires cmake-args

      </aside>

      colcon build --symlink-install
      # If using zed-ros2-wrapper package
      colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release
      
    4. Source overlay

      source install/setup.bash
      
  11. Launch core-sim to see if everything launches as expected

  12. To commit changes to core-sim, add bristol-fsai git credentials

    git config --global user.name "bristol-fsai"
    git config --global user.email "[email protected]"
    

CAN Bus Setup