<aside> 📌

This page describes how to setup the bootable SSD which will be inserted into the ADS-DV InCarPC SATA caddy at competition.

</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 SSD

  2. Dual boot into SSD

  3. Update

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

    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
    sudo apt install ros-galactic-desktop python3-pip python3-rosdep
    echo "source /opt/ros/galactic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  5. Install Colcon

    sudo sh -c 'echo "deb [arch=amd64,arm64] <http://repo.ros2.org/ubuntu/main> `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
    curl -s <https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc> | sudo apt-key add -
    pip3 install colcon-common-extensions -U
    
  6. Install dependencies for core_sim to work

    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
    
  7. Setup SSH key in GitHub - guide.

  8. Clone core-sim repository

  9. Follow setup instructions in core-sim README file

  10. Launch core-sim to see if everything launches as expected

CAN Bus Setup

  1. Install dependencies (see setup.sh for more info)

    # these commands may need to be used once:
    sudo modprobe can_dev
    sudo modprobe can
    sudo modprobe can_raw
    sudo modprobe vcan
    sudo apt install can_utils
    
    # NOTE: the above have been tested with PEAK-CAN hardware only
    
  2. FS-AI_API requires ****first command in setup.sh to be run for CAN Bus link. The other two commands are to setup virtual connection

    1. Option 1: Link Can bus:

      # can0 hardware at 500kbps
      sudo ip link set up can0 type can bitrate 500000
      
    2. Option 2: Setup virtual connection:

      # vcan0 for testing without hardware
      sudo ip link add dev vcan0 type vcan
      sudo ip link set vcan0 up
      
    3. Option 3: Bring down or reset links:

      sudo ip link set can0 down
      sudo ip link delete can0
      
  3. [WIP] Test CAN bus link is setup

    1. Using VCU
    2. Using Virtual CAN
    3. Simulate CAN
      1. Setting simulate_can_ = 0 in core-sim/ros_can/include/ros_can.hpp initialises the FS-AI_API in simulation mode (see FS-AI_API docs)
        • NOTE: The simulated data is not representative of vehicle operation and simply changes on each call of fs_ai_api_vcu2ai_get_data()