From 238627b15ace24eb571fe51355249f9d7bfa1176 Mon Sep 17 00:00:00 2001 From: kurisaw <2053731441@qq.com> Date: Fri, 18 Apr 2025 10:10:46 +0800 Subject: [PATCH] micro-ROS local package --- system/Kconfig | 1 + system/micro_ros_local/Kconfig | 118 ++++++++++++++++++++++++++++ system/micro_ros_local/package.json | 34 ++++++++ 3 files changed, 153 insertions(+) create mode 100644 system/micro_ros_local/Kconfig create mode 100644 system/micro_ros_local/package.json diff --git a/system/Kconfig b/system/Kconfig index dffbd610f0..c427a63954 100644 --- a/system/Kconfig +++ b/system/Kconfig @@ -56,4 +56,5 @@ source "$PKGS_DIR/packages/system/reb/Kconfig" source "$PKGS_DIR/packages/system/rmp/Kconfig" source "$PKGS_DIR/packages/system/r-rhealstone/Kconfig" source "$PKGS_DIR/packages/system/heartbeat/Kconfig" +source "$PKGS_DIR/packages/system/micro_ros_local/Kconfig" endmenu diff --git a/system/micro_ros_local/Kconfig b/system/micro_ros_local/Kconfig new file mode 100644 index 0000000000..784edba55b --- /dev/null +++ b/system/micro_ros_local/Kconfig @@ -0,0 +1,118 @@ +menuconfig PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE + bool "micro-ROS package for RTThread" + select RT_USING_POSIX_FS + select RT_USING_POSIX_SOCKET + select RT_USING_POSIX_SELECT + select RT_USING_SAL + select BSP_USING_ONCHIP_RTC + default n + +if PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_PATH + string + default "/packages/system/micro_ros_local" + + config RTT_UCLIENT_PLATFORM_RTTHREAD + bool "Using Micro XRCE-DDS Client Library in RT-Thread" + default n + + config RTT_URCLC_PLATFORM_RTTHREAD + bool "Using Micro rclc Library in RT-Thread" + default y + + menu "Include examples" + config PKG_RCLC_EXAMPLE + bool "Enable micro-ROS rclc platform example" + depends on RTT_URCLC_PLATFORM_RTTHREAD + default y + + config PKG_UCLIENT_PLATFORM_EXAMPLE + bool "Enable micro-ROS uxr platform example" + depends on RTT_UCLIENT_PLATFORM_RTTHREAD + default n + endmenu + + choice + prompt "Distribution" + default PKG_MICRO_ROS_RTTHREAD_PACKAGE_FOXY_DISTRO + help + Select the micro-ROS distro + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_HUMBLE_DISTRO + bool "Humble" + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_FOXY_DISTRO + bool "Foxy" + endchoice + + menu "Memory configuration" + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_MAX_NODES + int "# Nodes" + default 1 + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_MAX_PUBLISHERS + int "# Publishers" + default 1 + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_MAX_SUBSCRIBERS + int "# Subscribers" + default 1 + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_MAX_SERVICES + int "# Services" + default 0 + + config PKG_MICRO_ROS_RTTHREAD_PACKAGE_MAX_CLIENTS + int "# Clients" + default 0 + + endmenu + + menu "ROS node communication mode" + + config PKG_MICRO_ROS_USE_SERIAL + bool "serial" + default n + if PKG_MICRO_ROS_USE_SERIAL + menu "serial configuration" + config MICRO_ROS_SERIAL_NAME + string "select the micro serial dev name" + default "vcom" + endmenu + endif + + config PKG_MICRO_ROS_USE_UDP + bool "udp" + default n + if PKG_MICRO_ROS_USE_UDP + menu "udp configuration" + config MICRO_ROS_UDP_IP + string "select the micro udp ip" + default "127.0.0.1" + + config MICRO_ROS_UDP_PORT + string "select the micro udp port" + default "8080" + endmenu + endif + + config PKG_MICRO_ROS_USE_TCP + bool "tcp" + default n + if PKG_MICRO_ROS_USE_TCP + menu "tcp configuration" + config MICRO_ROS_TCP_IP + string "select the micro tcp ip" + default "127.0.0.1" + + config MICRO_ROS_TCP_PORT + string "select the micro tcp port" + default "8080" + endmenu + endif + + endmenu + +endif + diff --git a/system/micro_ros_local/package.json b/system/micro_ros_local/package.json new file mode 100644 index 0000000000..49ca7b4196 --- /dev/null +++ b/system/micro_ros_local/package.json @@ -0,0 +1,34 @@ +{ + "name": "micro_ros_rtthread_package", + "description": "Localized build of micro-ROS.", + "description_zh": "本地化构建micro-ROS", + "enable": "PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE", + "keywords": [ + "micro_ros" + ], + "category": "system", + "author": { + "name": "kurisaW", + "email": "2053731441@qq.com", + "github": "kurisaW" + }, + "license": "Apache-2.0", + "repository": "https://github.com/kurisaW/micro_ros_local", + "icon": "unknown", + "homepage": "unknown", + "doc": "unknown", + "site": [ + { + "version": "v1.0.0", + "URL": "https://github.com/kurisaW/micro_ros_local/archive/refs/tags/v1.0.0.zip", + "filename": "1.0.0.zip", + "VER_SHA": "fill in the git version SHA value" + }, + { + "version": "latest", + "URL": "https://github.com/kurisaW/micro_ros_local.git", + "filename": null, + "VER_SHA": "rtt" + } + ] +}