Note: Last updated for ROS Humble. For the latest documentation, always check the official website and code repositories.

Setting up a micro-ROS development environment

micro-ROS for PlatformIO (WIP)

With PlatformIO, you can develop for Arduino, Teensy, Pico and many more boards. As of 2024, MRG will be using PlatformIO for development.

  1. Install Visual Studio Code
  2. Install the PlatformIO extension from the extensions menu
  3. Go to the PlatformIO extension menu to complete installation
    1. You may need to run sudo apt install python3-venv for the installer to find your Python installation if you are using Ubuntu
  4. Follow instructions at the micro-ROS PlatformIO repository

micro-ROS for Arduino and PJRC Teensy (Recommended)

This approach was last updated in 2024.

We will use Arduino IDE 2.x as it allows for easier management of Teensyduino versions, which is necessary when working with different ROS versions.

  1. Install Arduino IDE 2.x
  2. For Teensy, go to the PJRC documentation and follow the instructions for installing Teensyduino
    1. Select the Teensy library version number appropriate to your ROS version
      1. For Humble and Foxy, use 1.57.x
  3. Install micro-ROS library from https://github.com/micro-ROS/micro_ros_arduino using instructions in the README
    1. If using Arduino Due (SAM) or Teensy, make sure to patch using instructions in micro-ROS README file. Make sure to set the Teensyduino library version and Arduino path properly.
      1. The path will look like:
        1. On Linux: .arduino15/packages/teensy/hardware/avr/
        2. On Windows, go to your %AppData% local folder

micro-ROS for Raspberry Pi Pico

More experienced developers may opt for a more classical development experience. The Raspberry Pi Pico is one board that requires a more hands-on compiling process.

micro-ROS agent