Aerial Robotics IITK
  • Introduction
  • Danger Zone
  • Tutorials
    • Workspace Setup
      • Installing Ubuntu
      • Basic Linux Setup
      • Spruce up your space
      • ROS Setup
      • PX4 Setup
        • PX4 Toolchain Setup
      • Ardupilot Setup
      • Installing Ground Control Station
        • QGroundControl
        • Mission Planner
      • ArduPilot Setup on Docker
      • PX4 Setup on Docker
    • How to Write a ROS Package
      • ROS Package
      • Node Handles, Parameters, and Topics
      • Coding Standards
      • Custom mavros message
      • Transformations
      • Conversions
    • Cheatsheets
      • CMakeCheatsheet
      • GitCheatsheet
      • LatexCheatsheet
      • Markdown Cheatsheet
    • Miscellaneous
      • Odroid XU4 Setup
      • Simulation using Offboard Control
        • Enable Offboard Mode in PX4
      • Writing a UDev rule
      • Sensor fusion
    • Reference wiki links
  • Concepts
    • Quaternions
      • Theory
    • Kalman Filters
    • Rotations
    • Path Planning
      • Grassfire Algorithm
      • Dijkstra Algorithm
      • A* Algorithm
      • Probabilistic Roadmap
      • RRT Algorithm
      • Visibility Graph Analysis
    • Lectures
      • Aerial Robotics
      • Avionics
      • Control Systems: Introduction
      • Control Systems: Models
      • Inter IIT Tech Meet 2018
      • Kalman Filters
      • Linux and Git
      • Git Tutorial
      • ROS
      • Rotorcraft
      • Software Training
  • Control System
    • Model Predictive Control
      • System Identification
      • Sample SysId Launch Files
      • Running MPC
        • MPC with Rotors
        • MPC with PX4 Sim
        • MPC with ROS
      • References
    • PID Controller
      • Introduction
      • Basic Theory
  • Estimation
    • Visual-Inertial Odometry
      • Hardware Requirements
      • Visual-Inertial Sensing
      • DIYing a VI-Sensor
    • Setup with VICON
    • Odometry from pose data
  • Computer Vision
    • Intel RealSense D435i setup for ROS Noetic
    • IntelRealSense D435i Calibration
    • Camera Calibration
    • ArUco ROS
  • Machine Learning
    • Datasets
  • Hardware Integration
    • Configuring Radio Telemetry
    • Setting up RTK + GPS
    • Integration of Sensors with PixHawk
      • Connecting Lidar-lite through I2C
    • Connections
    • Setting up Offboard Mission
      • Setting up Companion Computer
        • Raspberry Pi 4B Setup
        • Jetson TX2 Setup
      • Communication Setup
      • Guided mode
    • Miscellaneous
  • Resources
    • Open-source algorithms and resources
    • Courses
      • State Space Modelling of a Multirotor
      • Path Planning Lecture
      • Introduction to AI in Robotics
      • RRT, RRT* and RRT*- Path Planning Algorithms
    • Useful Reading Links
      • Aerial Robotics
      • Books
      • Computer Vision and Image Processing
      • Courses on AI and Robotics
      • Deep Neural Network
      • Dynamics and Controls system
      • Motion Planning
      • Probabilistic Robotics
      • Programming
      • Robotics Hardware
      • Miscellaneous and Awesome
    • Online Purchase websites
  • Competitions
    • Inter-IIT TechMeet 8.0
    • Inter-IIT TechMeet 9.0
    • IMAV 2019, Madrid, Spain
    • Inter-IIT TechMeet 10.0
    • Inter-IIT TechMeet 11.0
Powered by GitBook
On this page

Was this helpful?

  1. Hardware Integration
  2. Setting up Offboard Mission
  3. Setting up Companion Computer

Raspberry Pi 4B Setup

This guide outlines the process of setting up a Raspberry Pi onboard companion computer without the need for a mouse or keyboard, using Ubuntu 20.04 Server Image.

Flashing OS on the Board

  1. Install rpi-imager

    • Run sudo apt install rpi-imager to install the Raspberry Pi Imager.

    • Insert the microSD card into your computer.

  2. Choose OS and Storage

    • Open Raspberry Pi Imager and select "Choose OS".

    • Navigate to the Ubuntu 20.04 Server image.

    • Select your microSD card under "Choose Storage".

  3. Configure Settings

    • Click on the settings icon.

    • Enable "Enable SSH".

    • Set a username and password (e.g., "pi").

    • Configure wireless LAN to connect to your Wi-Fi network.

  4. Write OS to microSD

    • Click "Write" to write the OS to the microSD card.

  5. Boot the Board

    • Insert the microSD card into the board.

    • Check the LED status to confirm booting from the card.

Setting up Ubuntu Server Image for ARIITK

  1. Basic Linux Setup

    sudo apt-get update
    sudo apt-get upgrade
    timedatectl set-local-rtc 1 --adjust-system-clock
    sudo apt-get install git
  2. ROS Setup

    # Setup sources.list
    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    
    # Setup keys
    sudo apt install curl
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
    
    # Installation
    sudo apt update
    sudo apt install ros-noetic-base
    
    # Initialize rosdep
    sudo apt install python3-rosdep
    sudo rosdep init
    rosdep update
    
    # Setup environment
    echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
    # Fulfill dependencies
    sudo apt install python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
  3. MAVROS Setup

    # install some dependencies
    sudo apt install python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
    
    # install MAVROS
    sudo apt-get install ros-noetic-mavros ros-noetic-mavros-extras
    
    cd ~/
    
    wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
    sudo chmod a+x install_geographiclib_datasets.sh
    sudo ./install_geographiclib_datasets.sh
    
    # Install catkin tools
    sudo apt-get install python3-catkin-tools
    
    # Updating MAVProxy and pymavlink (new versions released now and then)
    sudo pip install --upgrade pymavlink MAVProxy
    
    #Setup MAVROS to begin communication
    cd ~/
    
    # Setup MAVROS workspace
    mkdir -p ~/ardupilot_ws/src
    cd ~/ardupilot_ws
    catkin init
    
    # Create launch file for MAVROS
    cd src
    mkdir launch
    cd launch
    roscp mavros apm.launch apm.launch
    sudo gedit apm.launch #opens a text editor, follow the next command (you can also do it using any other editor of your choice, for eg. by using 'code .' commmand)
    
    #To proxy to a Ground Control Station like QGC or Mission Planner on ground we just need to modify the first line to <arg name="fcu_url" default="udp://:{ground-port}@{ground-hostname}" />. save you file and launch it with-
    cd ~/ardupilot_ws/src/launch
    roslaunch apm.launch
    
  4. QGC Setup

    To configure QGroundControl for communication with MAVROS:

    1. Open QGroundControl

      • Launch QGroundControl on your ground station device.

    2. Configure UDP Settings

      • Navigate to 'Application Settings'.

      • Go to the 'Comm Links' tab.

      • Click 'Add' in the options menu.

      • Select 'Type' as 'UDP'.

      • Enter the{ground-port} in "Port" and {ground-hostname} in "Server Addresses (optional)"

    3. Connect

      • Click "OK" to save the settings.

      • Click on the "Connect" tab to establish the connection from side menu

    Ensure that your onboard companion computer and ground station are connected to the same LAN setup via a router for proper communication.

Ensure both the board and the ground station are connected to the same LAN setup for the proxy to work.

PreviousSetting up Companion ComputerNextJetson TX2 Setup

Last updated 1 year ago

Was this helpful?