Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 41 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@ name: CI

on:
pull_request:
push:
branches:
- '**'
- humble
- jazzy
- kilted
- rolling
workflow_call:
inputs:
branch:
description: "Branch to checkout"
required: false
type: string
default: "rolling"
workflow_dispatch:

jobs:

micro_ros_idf:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
<<<<<<< HEAD
idf_target: [ esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32p4]
idf_version: [ "espressif/idf:release-v4.4", "espressif/idf:release-v5.2", "espressif/idf:release-v5.5" ]
exclude:
Expand All @@ -24,22 +36,25 @@ jobs:
# Skip IDF v5.2 + ESP32-P4 combination
- idf_target: esp32p4
idf_version: espressif/idf:release-v5.2
=======
idf_target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6]
idf_version: [v5.2, v5.3, v5.4]
>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))

container:
image: ${{ matrix.idf_version }}
image: "espressif/idf:release-${{ matrix.idf_version }}"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
path: micro_ros_espidf_component
ref: ${{ inputs.branch || github.ref }}

- name: Dependencies
shell: bash
run: |
apt update
export DEBIAN_FRONTEND=noninteractive
apt install -y git python3-pip
. $IDF_PATH/export.sh
<<<<<<< HEAD
pip3 install catkin_pkg lark-parser colcon-common-extensions empy==3.3.4
# This line avoids the error when using Python < 3.7 https://importlib-resources.readthedocs.io/en/latest/
pip3 install importlib-resources
Expand All @@ -58,6 +73,9 @@ jobs:
run: |
. $IDF_PATH/export.sh
pip3 install setuptools==68.1.2
=======
pip install catkin_pkg colcon-common-extensions lark
>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))

- name: Build sample - int32_publisher
shell: bash
Expand Down Expand Up @@ -95,6 +113,18 @@ jobs:
idf.py set-target ${{ matrix.idf_target }}
idf.py build

<<<<<<< HEAD
=======
- name: Build sample - int32_publisher_custom_transport_usbcdc
shell: bash
if: matrix.idf_target == 'esp32s2' || matrix.idf_target == 'esp32s3'
run: |
. $IDF_PATH/export.sh
cd micro_ros_espidf_component/examples/int32_publisher_custom_transport_usbcdc
idf.py set-target ${{ matrix.idf_target }}
idf.py build

>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))
- name: Build sample - multithread_publisher
shell: bash
run: |
Expand All @@ -105,6 +135,7 @@ jobs:
cd examples/multithread_publisher
idf.py set-target ${{ matrix.idf_target }}
idf.py build
<<<<<<< HEAD

- name: EmbeddedRTPS
shell: bash
Expand All @@ -114,4 +145,6 @@ jobs:
make -f libmicroros.mk clean
cd examples/int32_publisher_embeddedrtps
idf.py set-target ${{ matrix.idf_target }}
idf.py build
idf.py build
=======
>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))
15 changes: 9 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: Nightly

on:
workflow_dispatch:
inputs:
name:
description: "Manual trigger"
schedule:
- cron: '0 4 * * *'
- cron: '0 4 * * *'
workflow_dispatch:

jobs:
micro_ros_idf:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
<<<<<<< HEAD
branch: [rolling, jazzy, humble]
idf_target: [ esp32, esp32s2, esp32c3, esp32s3, esp32c6, esp32p4]
idf_version: [ "espressif/idf:release-v4.4", "espressif/idf:release-v5.2", "espressif/idf:release-v5.5" ]
Expand Down Expand Up @@ -121,3 +118,9 @@ jobs:
cd examples/int32_publisher_embeddedrtps
idf.py set-target ${{ matrix.idf_target }}
idf.py build
=======
branch: [humble, jazzy, kilted, rolling]
uses: ./.github/workflows/ci.yml
with:
branch: ${{ matrix.branch }}
>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,30 @@

# micro-ROS component for ESP-IDF

<<<<<<< HEAD
This component has been tested in ESP-IDF v4.4, v5.2, and v5.5 with ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-P4.
=======
This component has been tested in ESP-IDF v5.2, v5.3, and v5.4 with ESP32, ESP32-S2, ESP32-S3, ESP32-C3 and ESP32-C6.
>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))

## Dependencies

This component needs `colcon` and other Python 3 packages inside the IDF virtual environment in order to build micro-ROS packages:

```bash
. $IDF_PATH/export.sh
pip3 install catkin_pkg lark-parser colcon-common-extensions
pip3 install catkin_pkg colcon-common-extensions lark
```

## Middlewares available

This package support the usage of micro-ROS on top of two different middlewares:

- [eProsima Micro XRCE-DDS](https://micro-xrce-dds.docs.eprosima.com/en/latest/): the default micro-ROS middleware.
- [embeddedRTPS](https://github.com/embedded-software-laboratory/embeddedRTPS): an experimental implementation of a RTPS middleware compatible with ROS 2.
- [embeddedRTPS](https://github.com/embedded-software-laboratory/embeddedRTPS): an experimental implementation of a RTPS middleware compatible with ROS 2. (CURRENTLY NOT WORKING)

In order to select it, use `idf.py menuconfig` and go to `micro-ROS Settings > micro-ROS middleware`

## Usage

You can clone this repo directly in the `components` folder of your project.
Expand All @@ -34,7 +40,11 @@ In order to test a int32_publisher example:
```bash
. $IDF_PATH/export.sh
cd examples/int32_publisher
<<<<<<< HEAD
# Set target board [esp32|esp32s2|esp32s3|esp32c3|esp32c6|esp32p4]
=======
# Set target board [esp32|esp32s2|esp32s3|esp32c3|esp32c6]
>>>>>>> d749ff1 (Multiple CI and README.md Improvements (#324))
idf.py set-target esp32
idf.py menuconfig
# Set your micro-ROS configuration and WiFi credentials under micro-ROS Settings
Expand All @@ -61,19 +71,16 @@ docker run -it --rm --net=host microros/micro-ros-agent:humble udp4 --port 8888
It's possible to build this example application using the official Espressif [docker images](https://hub.docker.com/r/espressif/idf), following the same steps:

```bash
docker pull espressif/idf:release-v5.2
# Run ESP-IDF container
docker run --name micro-ros-espidf-component-test -it espressif/idf:release-v5.2 bash
docker run --name micro-ros-espidf-component -it espressif/idf:release-v5.4 bash

git clone https://github.com/micro-ROS/micro_ros_espidf_component.git
git clone -b rolling https://github.com/micro-ROS/micro_ros_espidf_component.git
cd micro_ros_espidf_component/

# Install dependencies
pip3 install catkin_pkg lark-parser colcon-common-extensions
pip install catkin_pkg colcon-common-extensions lark

$IDF_PATH/export.sh
cd examples/int32_publisher
# Set target board [esp32|esp32s2|esp32s3|esp32c3]
# Set target board [esp32|esp32s2|esp32s3|esp32c3|esp32c6]
idf.py set-target esp32
idf.py menuconfig
# Set your micro-ROS configuration and WiFi credentials under micro-ROS Settings
Expand Down