arjav1528 opened a new pull request, #3512:
URL: https://github.com/apache/nuttx-apps/pull/3512

   Phase 4 of micro-ROS-on-NuttX. Adds the transport callbacks Micro
   XRCE-DDS needs and a minimal publisher example. Split into 4 commits:
   
   1. `system/microros: Fix toolchain attribute strip breaking libc inlines.` 
Drop `-D'__attribute__(x)='` from `toolchain.cmake.in`. The strip also removed 
`__gnu_inline__` from NuttX libc `string.h` inlines, causing ~50 
multiple-definition errors at sim final link.
   2. `system/microros: Wire libmicroros include layout and sim final link.` 
Enumerate `include/*` subdirs so both `<rcl/rcl.h>` (nested colcon layout) and 
`<rclc/rclc.h>` (flat) resolve. Switch `LDLIBS` → `EXTRA_LIBS` so the sim final 
link picks up `libmicroros.a`.
   3. `system/microros: Add UDP and serial custom transport backends.` New 
`transport/` dispatcher + UDP (BSD sockets, unconnected `sendto`/`recvfrom` so 
host-mode docker agent replies are accepted) + serial (termios, raw 8N1). Wired 
into Make and CMake.
   4. `examples/microros_pub: Add minimal Int32 publisher example. `30 
`std_msgs/Int32` messages on `/nuttx_pub` at 1 Hz, then clean fini. Smoke test 
for the transport layer.
   
   ## Impact
   
   - Fixes a pre-existing sim final-link regression in `system/microros` 
(#3498); any non-trivial micro-ROS sim build was broken before this.
   - New Kconfig: `MICROROS_TRANSPORT_{UDP,SERIAL}`, `MICROROS_AGENT_IP`, 
`MICROROS_AGENT_PORT`, `MICROROS_SERIAL_DEVICE`, `MICROROS_SERIAL_BAUD`. 
Default off — no change for existing configs.
   - UDP backend needs `CONFIG_NET_UDP`; serial backend needs a TTY.
   
   ## Testing
   
   Ubuntu 22.04 EC2, `sim:nsh` + `CONFIG_SYSTEM_MICROROS=y` + 
`MICROROS_TRANSPORT_UDP=y` + `EXAMPLES_MICROROS_PUB=y`. TAP networking, host 
`192.168.10.1`, NuttX `192.168.10.2`. Agent `micro-ros/micro-ros agent:jazzy` 
in docker `--network host`, UDP4 port 8888.
   
   
   [phase4.log](https://github.com/user-attachments/files/28425846/phase4.log)
   
[phase4_agent.log](https://github.com/user-attachments/files/28425859/phase4_agent.log)
   
[phase4_bootstrap.log](https://github.com/user-attachments/files/28425860/phase4_bootstrap.log)
   
[phase4_make_context.log](https://github.com/user-attachments/files/28425865/phase4_make_context.log)
   
   
   - `phase4.log` — NSH session, 30/30 publishes + `done`.
   - `phase4_agent.log` — session establish, publisher create, 30 ACKs,
     clean destroy.
   - `phase4_bootstrap.log`, `phase4_make_context.log` — build.
   
   Excerpt:
   
   ```
   nsh> microros_pub
   microros_pub: starting
   microros_pub: sent 0
   ...
   microros_pub: sent 29
   microros_pub: done
   ```
   
   **Not verified:** serial backend on hardware — I dont have the
   hardware needed. checkpatch on the post-split range needs a re-run
   on Linux before merge.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to