Skip to content

Commit 5c0322e

Browse files
Multiple CI and README.md Improvements (backport #324) (#341)
Also removed CI compatibility and mentions of ESP-IDF v4.4 as it's been declared EOL by Espressif. (cherry picked from commit d749ff1) Co-authored-by: Aarav Gupta <aarav@spikonado.com>
1 parent 160b103 commit 5c0322e

3 files changed

Lines changed: 35 additions & 171 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,44 @@ name: CI
22

33
on:
44
pull_request:
5+
push:
56
branches:
6-
- '**'
7+
- humble
8+
- jazzy
9+
- kilted
10+
- rolling
11+
workflow_call:
12+
inputs:
13+
branch:
14+
description: "Branch to checkout"
15+
required: false
16+
type: string
17+
default: "rolling"
18+
workflow_dispatch:
719

820
jobs:
9-
1021
micro_ros_idf:
1122
runs-on: ubuntu-latest
1223
strategy:
1324
fail-fast: false
1425
matrix:
15-
idf_target: [ esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32p4]
16-
idf_version: [ "espressif/idf:release-v4.4", "espressif/idf:release-v5.2", "espressif/idf:release-v5.5" ]
17-
exclude:
18-
# Skip IDF v4 + ESP32C6 combination
19-
- idf_target: esp32c6
20-
idf_version: espressif/idf:release-v4.4
21-
# Skip IDF v4 + ESP32-P4 combination
22-
- idf_target: esp32p4
23-
idf_version: espressif/idf:release-v4.4
24-
# Skip IDF v5.2 + ESP32-P4 combination
25-
- idf_target: esp32p4
26-
idf_version: espressif/idf:release-v5.2
26+
idf_target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32p4]
27+
idf_version: [v5.2, v5.3, v5.4, v5.5]
2728

2829
container:
29-
image: ${{ matrix.idf_version }}
30+
image: "espressif/idf:release-${{ matrix.idf_version }}"
3031

3132
steps:
32-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v6
3334
with:
3435
path: micro_ros_espidf_component
36+
ref: ${{ inputs.branch || github.ref }}
3537

3638
- name: Dependencies
3739
shell: bash
38-
run: |
39-
apt update
40-
export DEBIAN_FRONTEND=noninteractive
41-
apt install -y git python3-pip
42-
. $IDF_PATH/export.sh
43-
pip3 install catkin_pkg lark-parser colcon-common-extensions empy==3.3.4
44-
# This line avoids the error when using Python < 3.7 https://importlib-resources.readthedocs.io/en/latest/
45-
pip3 install importlib-resources
46-
# this installs the modules also for global python interpreter, needed for IDF v5
47-
# IDF 5.5 uses Python 3.12 which has externally-managed-environment protection
48-
if [ "${{ matrix.idf_version }}" == "espressif/idf:release-v5.5" ]; then \
49-
/usr/bin/pip3 install --break-system-packages catkin_pkg lark-parser colcon-common-extensions empy==3.3.4 importlib-resources; \
50-
else \
51-
/usr/bin/pip3 install catkin_pkg lark-parser colcon-common-extensions empy==3.3.4 importlib-resources; \
52-
fi
53-
54-
# This line can be removed when https://github.com/colcon/colcon-python-setup-py/issues/56 is solved
55-
- name: Patch setuptools
56-
shell: bash
57-
if: matrix.idf_version == 'espressif/idf:release-v4.4'
5840
run: |
5941
. $IDF_PATH/export.sh
60-
pip3 install setuptools==68.1.2
42+
pip install catkin_pkg colcon-common-extensions lark
6143
6244
- name: Build sample - int32_publisher
6345
shell: bash
@@ -97,7 +79,7 @@ jobs:
9779
9880
- name: Build sample - int32_publisher_custom_transport_usbcdc
9981
shell: bash
100-
if: (matrix.idf_target == 'esp32s2' || matrix.idf_target == 'esp32s3') && matrix.idf_version == 'espressif/idf:release-v5.2'
82+
if: matrix.idf_target == 'esp32s2' || matrix.idf_target == 'esp32s3'
10183
run: |
10284
. $IDF_PATH/export.sh
10385
cd micro_ros_espidf_component/examples/int32_publisher_custom_transport_usbcdc
@@ -114,13 +96,3 @@ jobs:
11496
cd examples/multithread_publisher
11597
idf.py set-target ${{ matrix.idf_target }}
11698
idf.py build
117-
118-
- name: EmbeddedRTPS
119-
shell: bash
120-
run: |
121-
. $IDF_PATH/export.sh
122-
cd micro_ros_espidf_component
123-
make -f libmicroros.mk clean
124-
cd examples/int32_publisher_embeddedrtps
125-
idf.py set-target ${{ matrix.idf_target }}
126-
idf.py build

.github/workflows/nightly.yml

Lines changed: 6 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,16 @@
11
name: Nightly
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
name:
7-
description: "Manual trigger"
84
schedule:
9-
- cron: '0 4 * * *'
5+
- cron: '0 4 * * *'
6+
workflow_dispatch:
107

118
jobs:
129
micro_ros_idf:
13-
runs-on: ubuntu-latest
1410
strategy:
1511
fail-fast: false
1612
matrix:
17-
branch: [rolling, jazzy, humble]
18-
idf_target: [ esp32, esp32s2, esp32c3, esp32s3, esp32c6, esp32p4]
19-
idf_version: [ "espressif/idf:release-v4.4", "espressif/idf:release-v5.2", "espressif/idf:release-v5.5" ]
20-
exclude:
21-
# Skip IDF v4 + ESP32C6 combination
22-
- idf_target: esp32c6
23-
idf_version: espressif/idf:release-v4.4
24-
# Skip IDF v4 + ESP32-P4 combination
25-
- idf_target: esp32p4
26-
idf_version: espressif/idf:release-v4.4
27-
# Skip IDF v5.2 + ESP32-P4 combination
28-
- idf_target: esp32p4
29-
idf_version: espressif/idf:release-v5.2
30-
31-
32-
container:
33-
image: ${{ matrix.idf_version }}
34-
35-
steps:
36-
- uses: actions/checkout@v2
37-
with:
38-
path: micro_ros_espidf_component
39-
ref: ${{ matrix.branch }}
40-
41-
- name: Dependencies
42-
shell: bash
43-
run: |
44-
apt update
45-
export DEBIAN_FRONTEND=noninteractive
46-
apt install -y git python3-pip
47-
. $IDF_PATH/export.sh
48-
pip3 install catkin_pkg lark-parser empy==3.3.4 colcon-common-extensions
49-
# This line avoids the error when using Python < 3.7 https://importlib-resources.readthedocs.io/en/latest/
50-
pip3 install importlib-resources
51-
# this installs the modules also for global python interpreter, needed for IDF v5
52-
# IDF 5.5 uses Python 3.12 which has externally-managed-environment protection
53-
if [ "${{ matrix.idf_version }}" == "espressif/idf:release-v5.5" ]; then \
54-
/usr/bin/pip3 install --break-system-packages catkin_pkg lark-parser colcon-common-extensions importlib-resources; \
55-
else \
56-
/usr/bin/pip3 install catkin_pkg lark-parser colcon-common-extensions importlib-resources; \
57-
fi
58-
59-
# This line can be removed when https://github.com/colcon/colcon-python-setup-py/issues/56 is solved
60-
- name: Patch setuptools
61-
shell: bash
62-
if: matrix.idf_version == 'espressif/idf:release-v4.4'
63-
run: |
64-
. $IDF_PATH/export.sh
65-
pip3 install setuptools==68.1.2
66-
67-
- name: Build sample - int32_publisher
68-
shell: bash
69-
run: |
70-
. $IDF_PATH/export.sh
71-
cd micro_ros_espidf_component/examples/int32_publisher
72-
idf.py set-target ${{ matrix.idf_target }}
73-
idf.py build
74-
75-
- name: Build sample - low_consumption
76-
shell: bash
77-
if: matrix.idf_target != 'esp32c3' && matrix.idf_target != 'esp32s3' && matrix.idf_target != 'esp32c6' && matrix.idf_target != 'esp32p4'
78-
run: |
79-
. $IDF_PATH/export.sh
80-
cd micro_ros_espidf_component/examples/low_consumption
81-
idf.py set-target ${{ matrix.idf_target }}
82-
idf.py build
83-
84-
- name: Build sample - handle_static_types
85-
shell: bash
86-
run: |
87-
. $IDF_PATH/export.sh
88-
cd micro_ros_espidf_component/examples/handle_static_types
89-
idf.py set-target ${{ matrix.idf_target }}
90-
idf.py build
91-
92-
- name: Build sample - int32_publisher_custom_transport
93-
shell: bash
94-
run: |
95-
. $IDF_PATH/export.sh
96-
cd micro_ros_espidf_component
97-
make -f libmicroros.mk clean
98-
sed -i 's/DRMW_UXRCE_TRANSPORT=udp/DRMW_UXRCE_TRANSPORT=custom/' colcon.meta
99-
cd examples/int32_publisher_custom_transport
100-
idf.py set-target ${{ matrix.idf_target }}
101-
idf.py build
102-
103-
- name: Build sample - multithread_publisher
104-
shell: bash
105-
run: |
106-
. $IDF_PATH/export.sh
107-
cd micro_ros_espidf_component
108-
make -f libmicroros.mk clean
109-
sed -i 's/DRMW_UXRCE_TRANSPORT=udp/DRMW_UXRCE_TRANSPORT=custom/' colcon.meta
110-
cd examples/multithread_publisher
111-
idf.py set-target ${{ matrix.idf_target }}
112-
idf.py build
113-
114-
- name: EmbeddedRTPS
115-
if: ${{ matrix.branch == 'humble' }}
116-
shell: bash
117-
run: |
118-
. $IDF_PATH/export.sh
119-
cd micro_ros_espidf_component
120-
make -f libmicroros.mk clean
121-
cd examples/int32_publisher_embeddedrtps
122-
idf.py set-target ${{ matrix.idf_target }}
123-
idf.py build
13+
branch: [humble, jazzy, kilted, rolling]
14+
uses: ./.github/workflows/ci.yml
15+
with:
16+
branch: ${{ matrix.branch }}

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@
33

44
# micro-ROS component for ESP-IDF
55

6-
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.
6+
This component has been tested in ESP-IDF v5.2, v5.3, v5.4, and v5.5 with ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, and ESP32-P4.
77

88
## Dependencies
99

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

1212
```bash
1313
. $IDF_PATH/export.sh
14-
pip3 install catkin_pkg lark-parser colcon-common-extensions empy==3.3.4
14+
pip3 install catkin_pkg colcon-common-extensions lark
1515
```
1616

1717
## Middlewares available
1818

1919
This package support the usage of micro-ROS on top of two different middlewares:
20+
2021
- [eProsima Micro XRCE-DDS](https://micro-xrce-dds.docs.eprosima.com/en/latest/): the default micro-ROS middleware.
21-
- [embeddedRTPS](https://github.com/embedded-software-laboratory/embeddedRTPS): an experimental implementation of a RTPS middleware compatible with ROS 2.
22+
- [embeddedRTPS](https://github.com/embedded-software-laboratory/embeddedRTPS): an experimental implementation of a RTPS middleware compatible with ROS 2. (CURRENTLY NOT WORKING)
2223

2324
In order to select it, use `idf.py menuconfig` and go to `micro-ROS Settings > micro-ROS middleware`
25+
2426
## Usage
2527

2628
You can clone this repo directly in the `components` folder of your project.
@@ -61,19 +63,16 @@ docker run -it --rm --net=host microros/micro-ros-agent:jazzy udp4 --port 8888 -
6163
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:
6264

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

68-
git clone https://github.com/micro-ROS/micro_ros_espidf_component.git
68+
git clone -b jazzy https://github.com/micro-ROS/micro_ros_espidf_component.git
6969
cd micro_ros_espidf_component/
7070

7171
# Install dependencies
72-
pip3 install catkin_pkg lark-parser colcon-common-extensions
72+
pip install catkin_pkg colcon-common-extensions lark
7373

74-
$IDF_PATH/export.sh
7574
cd examples/int32_publisher
76-
# Set target board [esp32|esp32s2|esp32s3|esp32c3]
75+
# Set target board [esp32|esp32s2|esp32s3|esp32c3|esp32c6]
7776
idf.py set-target esp32
7877
idf.py menuconfig
7978
# Set your micro-ROS configuration and WiFi credentials under micro-ROS Settings

0 commit comments

Comments
 (0)