diff --git a/.github/workflows/upload-esp-registry.yml b/.github/workflows/upload-esp-registry.yml new file mode 100644 index 00000000..d5b9e4f9 --- /dev/null +++ b/.github/workflows/upload-esp-registry.yml @@ -0,0 +1,24 @@ +name: Upload ESP Component Registry + +on: + pull_request: + push: + branches: + - kilted + workflow_dispatch: + +jobs: + upload_components: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + + - name: Upload component to the component registry + uses: espressif/upload-components-ci-action@v2 + with: + components: "micro_ros_espidf_component:." + namespace: "micro-ros" + dry_run: ${{ github.event_name == 'pull_request' || github.ref_name != 'kilted' }} diff --git a/README.md b/README.md index 839fad3f..a4630010 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,45 @@ In order to select it, use `idf.py menuconfig` and go to `micro-ROS Settings > m ## Usage -You can clone this repo directly in the `components` folder of your project. +### From the ESP Component Registry + +To align with the semantic versioning scheme of the ESP Component Registry, the ROS 2 distribution release year is used as the major version of the component: + +| ROS 2 distro | Version | +|:------------:|:-------:| +| humble | 22.x.y | +| iron | 23.x.y | +| jazzy | 24.x.y | +| kilted | 25.x.y | +| lyrical | 26.x.y | + +Rolling is published as a prerelease of the next version, for example `27.0.0-rolling.20260806`. + +This branch corresponds to kilted and publishes `25.x.y` versions. + +Add the component to your project with the IDF Component Manager: + +```bash +idf.py add-dependency "micro-ros/micro_ros_espidf_component^25" +``` + +Or declare it in your main component's `idf_component.yml`: + +```yaml +dependencies: + micro-ros/micro_ros_espidf_component: "^25" +``` + +Then build your project as usual. The Component Manager downloads the matching `25.x.y` release for Kilted. + +### From this repository + +You can also clone this repo into the `components` folder of your project: + +```bash +cd your_project/components +git clone -b kilted https://github.com/micro-ROS/micro_ros_espidf_component.git +``` If you encounter issues during the build process, ensure that you are running in a clean shell environment _without_ the ROS 2 setup script sourced. diff --git a/examples/addtwoints_server/CMakeLists.txt b/examples/addtwoints_server/CMakeLists.txt index 70042128..618b06f3 100644 --- a/examples/addtwoints_server/CMakeLists.txt +++ b/examples/addtwoints_server/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(addtwoints_server) diff --git a/examples/addtwoints_server/main/idf_component.yml b/examples/addtwoints_server/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/addtwoints_server/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/handle_static_types/CMakeLists.txt b/examples/handle_static_types/CMakeLists.txt index 46a8b115..7d82d701 100644 --- a/examples/handle_static_types/CMakeLists.txt +++ b/examples/handle_static_types/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(handle_static_types) diff --git a/examples/handle_static_types/main/idf_component.yml b/examples/handle_static_types/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/handle_static_types/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/int32_publisher/CMakeLists.txt b/examples/int32_publisher/CMakeLists.txt index b416a561..569cfc78 100644 --- a/examples/int32_publisher/CMakeLists.txt +++ b/examples/int32_publisher/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_publisher) diff --git a/examples/int32_publisher/main/idf_component.yml b/examples/int32_publisher/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/int32_publisher/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/int32_publisher_custom_transport/CMakeLists.txt b/examples/int32_publisher_custom_transport/CMakeLists.txt index b416a561..569cfc78 100644 --- a/examples/int32_publisher_custom_transport/CMakeLists.txt +++ b/examples/int32_publisher_custom_transport/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_publisher) diff --git a/examples/int32_publisher_custom_transport/main/idf_component.yml b/examples/int32_publisher_custom_transport/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/int32_publisher_custom_transport/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/int32_publisher_custom_transport_usbcdc/CMakeLists.txt b/examples/int32_publisher_custom_transport_usbcdc/CMakeLists.txt index b416a561..569cfc78 100644 --- a/examples/int32_publisher_custom_transport_usbcdc/CMakeLists.txt +++ b/examples/int32_publisher_custom_transport_usbcdc/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_publisher) diff --git a/examples/int32_publisher_custom_transport_usbcdc/main/idf_component.yml b/examples/int32_publisher_custom_transport_usbcdc/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/int32_publisher_custom_transport_usbcdc/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/int32_publisher_embeddedrtps/CMakeLists.txt b/examples/int32_publisher_embeddedrtps/CMakeLists.txt index b416a561..569cfc78 100644 --- a/examples/int32_publisher_embeddedrtps/CMakeLists.txt +++ b/examples/int32_publisher_embeddedrtps/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_publisher) diff --git a/examples/int32_publisher_embeddedrtps/main/idf_component.yml b/examples/int32_publisher_embeddedrtps/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/int32_publisher_embeddedrtps/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/int32_sub_pub/CMakeLists.txt b/examples/int32_sub_pub/CMakeLists.txt index a650b832..6ba1a27d 100644 --- a/examples/int32_sub_pub/CMakeLists.txt +++ b/examples/int32_sub_pub/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_pub_sub) diff --git a/examples/int32_sub_pub/main/idf_component.yml b/examples/int32_sub_pub/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/int32_sub_pub/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/low_consumption/CMakeLists.txt b/examples/low_consumption/CMakeLists.txt index b416a561..569cfc78 100644 --- a/examples/low_consumption/CMakeLists.txt +++ b/examples/low_consumption/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_publisher) diff --git a/examples/low_consumption/main/idf_component.yml b/examples/low_consumption/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/low_consumption/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/multithread_publisher/CMakeLists.txt b/examples/multithread_publisher/CMakeLists.txt index f96ef3e7..e696729b 100644 --- a/examples/multithread_publisher/CMakeLists.txt +++ b/examples/multithread_publisher/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(multithread_publisher) diff --git a/examples/multithread_publisher/main/idf_component.yml b/examples/multithread_publisher/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/multithread_publisher/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/parameters/CMakeLists.txt b/examples/parameters/CMakeLists.txt index a650b832..6ba1a27d 100644 --- a/examples/parameters/CMakeLists.txt +++ b/examples/parameters/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(int32_pub_sub) diff --git a/examples/parameters/main/idf_component.yml b/examples/parameters/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/parameters/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/examples/ping_pong/CMakeLists.txt b/examples/ping_pong/CMakeLists.txt index 9377dad5..b9d94e0e 100644 --- a/examples/ping_pong/CMakeLists.txt +++ b/examples/ping_pong/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set (EXTRA_COMPONENT_DIRS "./../../.") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ping_pong) diff --git a/examples/ping_pong/main/idf_component.yml b/examples/ping_pong/main/idf_component.yml new file mode 100644 index 00000000..1373f7f2 --- /dev/null +++ b/examples/ping_pong/main/idf_component.yml @@ -0,0 +1,4 @@ +dependencies: + micro-ros/micro_ros_espidf_component: + version: "^25.0.0" + override_path: "../../../" diff --git a/idf_component.yml b/idf_component.yml new file mode 100644 index 00000000..c957578f --- /dev/null +++ b/idf_component.yml @@ -0,0 +1,20 @@ +version: "25.0.0" +description: "Micro-ROS ESP-IDF component and sample code" +url: "https://github.com/micro-ROS/micro_ros_espidf_component" +repository: "https://github.com/micro-ROS/micro_ros_espidf_component.git" +license: "Apache-2.0" +tags: + - micro-ros + - ros2 +targets: + - esp32 + - esp32s2 + - esp32s3 + - esp32c3 + - esp32c6 +dependencies: + idf: ">=5.2" +files: + use_gitignore: true + exclude: + - ".github/**"