Skip to content

apps/system/microros: add empty library skeleton#3492

Merged
lupyuen merged 5 commits into
apache:masterfrom
arjav1528:micro-ros-library-skeleton
May 21, 2026
Merged

apps/system/microros: add empty library skeleton#3492
lupyuen merged 5 commits into
apache:masterfrom
arjav1528:micro-ros-library-skeleton

Conversation

@arjav1528
Copy link
Copy Markdown
Contributor

Note: Please adhere to Contributing Guidelines.

Summary

Establish the directory structure and build system integration for micro-ROS
library in NuttX apps. This PR adds the foundational skeleton for Phase 2 of
the micro-ROS integration project—Kconfig with full configuration options for
ROS 2 distribution selection, transport layer choice (UDP/serial), agent
addressing, and resource limits. Makefile follows standard NuttX pattern using
MENUDESC and Directory.mk.

Impact

Build System:

  • Adds apps/system/microros/ as new system module
  • Integrates via existing parent Make.defs wildcard include
  • Auto-discovered by mkkconfig.sh Kconfig generation

Configuration:

  • Introduces CONFIG_SYSTEM_MICROROS menuconfig option (bool, default n)
  • Adds 13 subordinate configuration options:
    • MICROROS_DISTRO: ROS 2 distribution (humble, jazzy, kilted)
    • MICROROS_TRANSPORT_UDP / MICROROS_TRANSPORT_SERIAL: transport selection
    • MICROROS_AGENT_IP, MICROROS_AGENT_PORT: UDP agent addressing
    • MICROROS_SERIAL_DEVICE, MICROROS_SERIAL_BAUD: serial transport config
    • MICROROS_MAX_NODES, MICROROS_MAX_PUBLISHERS, MICROROS_MAX_SUBSCRIPTIONS,
      MICROROS_MAX_SERVICES, MICROROS_MAX_CLIENTS: resource limits
  • Proper dependencies declared (NET_UDP || SERIAL_TERMIOS for main config)
  • Sensible defaults (distro=jazzy, transport=UDP, conservative resource limits)

Testing

Host Environment:

  • OS: macOS 13.x + Ubuntu 26.04 (EC2)
  • Build tools: gcc, make, colcon (installed)
  • NuttX source: apache/nuttx master branch
  • NuttX apps: apache/nuttx-apps master branch

Target Verification:

  • Configuration: sim:nsh (simulator, no hardware needed)
  • Board: sim (Kconfig structure only, not full cross-compilation)

Test Procedure:

# 1. Configure NuttX with sim:nsh and apps directory
cd nuttx
./tools/configure.sh sim:nsh -a ../apps

# 2. Enable micro-ROS library configuration
kconfig-tweak --enable CONFIG_SYSTEM_MICROROS

# 3. Attempt build to verify no errors
make -j$(nproc)

# Expected output: Configuration succeeds, make completes without errors

Comment thread system/microros/Make.defs
@xiaoxiang781216
Copy link
Copy Markdown
Contributor

@arjav1528 could you add CMake support too?

arjav1528 added 4 commits May 21, 2026 10:40
Add Make.defs with copyright header for the micro-ROS library
build system. This establishes the directory structure for Phase 2,
with actual build logic to follow in subsequent steps.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Add Kconfig file defining CONFIG_SYSTEM_MICROROS and related options:
- MICROROS_DISTRO: ROS 2 distribution selection (default jazzy)
- MICROROS_TRANSPORT_UDP/SERIAL: Transport method selection
- MICROROS_AGENT_IP/PORT: UDP agent address configuration
- MICROROS_SERIAL_DEVICE/BAUD: Serial transport configuration
- Resource limits: MAX_NODES, MAX_PUBLISHERS, MAX_SUBSCRIPTIONS,
  MAX_SERVICES, MAX_CLIENTS

Allows menuconfig integration for micro-ROS library configuration.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Add Makefile with standard NuttX build system integration. Follows
the MENUDESC + Directory.mk pattern used throughout nuttx-apps.
Enables the system/microros module to be built as part of the apps
directory build process.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Ignore build outputs and generated files:
- Directories: micro_ros_src/, micro_ros_dev/, build/, install/
- Build outputs: libmicroros.a, toolchain.cmake, colcon.meta
- Archives: *.tar.gz

Prevents build artifacts and downloaded sources from being committed.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
@arjav1528 arjav1528 force-pushed the micro-ros-library-skeleton branch from 147db1f to 16b3ba3 Compare May 21, 2026 05:11
Add CMakeLists.txt file for CMake build system integration.
Enables the micro-ROS library module to be built using NuttX CMake
build system alongside traditional Make-based builds.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
@arjav1528
Copy link
Copy Markdown
Contributor Author

@arjav1528 could you add CMake support too?

done, added

@arjav1528 arjav1528 requested a review from xiaoxiang781216 May 21, 2026 05:15
@acassis
Copy link
Copy Markdown
Contributor

acassis commented May 21, 2026

@arjav1528 very nice! Please create a documentation inside repository nuttx/Documentation/

@arjav1528
Copy link
Copy Markdown
Contributor Author

arjav1528 commented May 21, 2026

@arjav1528 very nice! Please create a documentation inside repository nuttx/Documentation/

sure, will do, but like I am planning to do the documentation in my last and final PR, like after completing all the integration

@lupyuen lupyuen merged commit e9d1141 into apache:master May 21, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants