Skip to content
/ ros2 Public
forked from ros2/ros2

The Robot Operating System, is a meta operating system for robots.

Notifications You must be signed in to change notification settings

Jiusi-pys/ros2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

341 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS2 OpenHarmony/KaihongOS Port

ROS2 to KaihongOS (OpenHarmony) Port for rk3588s (ARM64 aarch64)


Project Status

Track Status Completion
Track 1: ROS2 Foundation Migration ✅ Complete 100%
Track 1.5: RCLCPP OpenHarmony Port ✅ Demo Built 95%
Track 2: rmw_dsoftbus Implementation ✅ Production Ready 95%
Overall ✅ On Track 97%

Build Status (2026-02-02)

Core Libraries

Library Size Status
librcl.so 359 KB ✅ RCL (52/52 tests pass)
librmw_dsoftbus_cpp.so ~4 MB ✅ Production Ready
librclcpp.so 21 MB ✅ C++ client library
librclcpp_action.so 1.2 MB ✅ Action support
librclcpp_lifecycle.so 2.0 MB ✅ Lifecycle nodes
librclcpp_components.so 126 KB ✅ Component management

Demo Applications

Demo Size Description
simple_talker 846 KB Minimal publisher
simple_listener 2.7 MB Minimal subscriber

Quick Start

Build

# Generate build files
gn gen out/ohos_aarch64

# Build all targets
ninja -C out/ohos_aarch64

# Build specific demo
ninja -C out/ohos_aarch64 simple_talker simple_listener

Deploy to Device (rk3588s)

# Copy libraries to C:\tmp
cp out/ohos_aarch64/*.so /mnt/c/tmp/

# Transfer via HDC (from WSL, use powershell.exe)
DEVICE_ID=$(powershell.exe -Command "hdc list targets" | head -1 | awk '{print $1}')
powershell.exe -Command "hdc -t $DEVICE_ID file send 'C:\tmp\*.so' '/system/lib64/'"

# Run demo
export RMW_IMPLEMENTATION=rmw_dsoftbus_cpp
/data/local/tmp/simple_talker

Architecture

User Application (rclcpp)
         ↓
RCL Layer (C API)
         ↓
rmw_dsoftbus (Custom RMW for OpenHarmony)
         ↓
OpenHarmony dsoftbus (IPC framework)
         ↓
Kernel / Network Layer

Key Components

Foundation Layer

  • rcutils/ - C utilities (memory, string, logging)
  • rcl/ - ROS Client Library
  • rmw/ - RMW interface definition

RMW Implementation

  • src/ros2/rmw_dsoftbus/ - Custom middleware using dsoftbus
  • Zero-DDS architecture (no FastDDS/CycloneDDS)
  • Session-based pub/sub
  • Auto-discovery via dsoftbus
  • QoS events support (deadline, liveliness, etc.)

RCLCPP Layer

  • src/ros2/rclcpp/ - ROS2 C++ Client Library
  • Node, Publisher, Subscription, Timer, Executor
  • Action, Lifecycle, Components support

Hardware Validation

Test Duration Success Rate
Talker E2E 5 min 100% (20/20)
Ralph Loop A4 8 hours 99.97% (28,769 msgs)
Phase B.2.1 4 hours 99.97% (5 topologies)
QoS Events 30 min 100% (5/5 tests)

Devices: 3× rk3588s validated


Performance

  • RTT P50: 2.49ms
  • Message Success: 99.97%
  • First Publish Latency: < 1s
  • CPU Overhead: < 5%

Documentation


License

This project is a port of ROS2 to OpenHarmony/KaihongOS. ROS2 is licensed under Apache License 2.0.

About

The Robot Operating System, is a meta operating system for robots.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 64.7%
  • C 31.6%
  • CMake 1.4%
  • Python 1.3%
  • Shell 0.8%
  • CSS 0.1%
  • Other 0.1%