RoboGeeks

Show HN: Cerulion – 다중 프로세스 리플레이를 지원하는 ROS 2 호환 로보틱스 런타임

lakshaysHacker News에서18d조회수 1회
Show HN: Cerulion – 로보틱스용 하네스, Gemini 3.8 Flash가 GPT-6 Astra와 맞먹어요github.com

안녕하세요, HN! 저는 Lakshay예요. Raveen과 함께 Rust로 작성한 ROS2 호환 로보틱스 런타임 Cerulion을 만들었어요. 단일 프로세스의 트레이드오프를 감수하거나 POD 메시지 타입을 강요하지 않으면서 IPC 전송 지연 시간을 낮추려고 많이 애썼어요. 이렇게 빠른 다중 프로세스 그래프는 결정론적으로 resim(재실행)할 수 있고, 기존 ROS2 노드와 launch 파일을 수정 없이 네이티브 Cerulion Rust/Python 코드와 함께 실행할 수 있어요. 설치 방법과 빠른 시작 가이드(좋아하는 코딩 에이전트에 한 번에 붙여넣을 프롬프트 포함)는 저장소 README에 있어요: https://github.com/cerulion-inc/cerulion

저는 MIT 박사 과정에서 오프로드 자율주행을 연구했는데, ROS에서 (라이다 2개와 카메라 6개를 쓸 때) 프로세스 간 지연 시간 문제를 계속 마주쳤어요. 대여 메시지(loaned message)는 POD 타입이어야 해서, 표준이고 벤더에 종속되지 않은 Image/PointCloud2를 쓸 수 없게 돼요. 결국 일부 핫 패스를 불안정한 단일 프로세스에서 돌릴 수밖에 없었고, 이 때문에 디버깅이 악몽이 됐어요. ROS 기반 스택에서 콜백의 소비 순서나 인터리빙을 쉽게 재현할 방법이 없어서 생기는 heisenbug를 보셨을 거예요. 결정론적 재현이 안 되니 로봇에서 발생한 런타임 실패 데이터를 효과적으로 활용하기도 어려웠어요.

바로 이 문제를 해결하려고 해요. Cerulion 백은 표준 MCAP 안에 메시지 내용과 함께 입력별 읽기 기록과 스케줄러 트레이스를 남겨요. cerulion bag play --resim all --verify를 실행하면 기록된 스케줄에 따라 노드 코드를 다시 실행하고, 각 바이트를 비교해서 정확히 일치하거나 정의된 허용 오차 안에 드는지 확인해요. 종료 코드 0은 일치, 1은 처음으로 어긋난 토픽/프레임, 6은 스케줄 불일치를 나타내요. --report 옵션을 쓰면 선택적으로 CI 판정 결과를 받을 수 있어요. 조건을 충족하는 ROS2 프로세스도 결정론적으로 재생할 수 있어요.

데이터 루프는 다음과 같아요:

1. Run: 주기/데이터/동기 트리거, I/O 데드라인, 백프레셔, 프로세스 분할을 위한 자동 프로파일링을 갖춘 의존성 순서 기반 레벨 DAG 스케줄러예요. 각 노드는 기본적으로 자체 프로세스에서 자유롭게 실행되면서도 결정론적 재생을 유지해요. 라이브 실행은 일시정지/재개할 수 있고, UMWAIT/WFE를 지원하는 CPU에서는 유휴 컨슈머를 재워 둬요. 사용자 코드의 벽시계 시간 읽기와 런타임 스레드 생성은 매크로로 컴파일 시점에 거부돼요.

ROS 2는 Foxy, Humble, Jazzy, Lyrical용 rmw_cerulion으로 지원돼요. 이를 쓰면 ROS2 노드와 launch 파일을 수정 없이 네이티브 Cerulion 노드와 같은 그래프에서 실행할 수 있어요. LD_PRELOAD를 쓰면 ROS2 코드도 std::vector/std::string을 통해 공유 메모리 loan을 받을 수 있어요. cerulion ros2 attach는 이미 실행 중인 ROS2 로봇을 합류시키고, cerulion ros2 run/launch로는 추가 설정 없이 기존 ROS2 워크스페이스를 Cerulion에서 실행할 수 있어요(C++ publish 지점을 다시 써 주는 선택적 자동 migrate도 제안돼요).

2. Move: 직렬화도, 페이로드 복사도, 페이로드 크기만큼의 할당도 없는 iceoryx2 공유 메모리를 써요. sensor_msgs/Image, PointCloud2 같은 가변 길이 메시지도 포함이에요. 녹화를 켠 상태에서 두 프로세스 사이의 1MiB sensor_msgs/Image 왕복 지연 시간은 p50 4.08µs, 꼬리가 짧은 p99 7.38µs예요(p50의 2배 미만). 기본 설정의 Cerulion 결과이고, 기본 ROS 2 Jazzy는 10.95 ms예요. Cerulion의 p50과 p99는 64B부터 16MiB까지 일정하게 유지돼요.

3. Capture: 이 정도 왕복 지연 시간이면 트레이드오프가 없어요. 프로세스 격리에도, 백 기록에도 마찬가지예요. 항상 켜 두거나 이벤트 기반으로 로깅할 여유가 생겨요. Flashback은 로봇 블랙박스예요. 모든 로그와 메시지 내용을 메모리에 약 30초 분량 보관하다가, 프로세스 크래시, 토픽 정지, 선언된 사고 또는 수동 트리거 시 자동으로 저장해요.

4. Reach: 무료 계정으로 로봇과 데스크톱을 페어링할 수 있어요. 덕분에 모든 기기가 설정이나 IP 주소, 탐색 트래픽 없이 서로를 찾을 수 있어요. Pubsub은 인증되고 필요할 때만 동작하며, 로봇이 오프라인에서도 검증할 수 있는 서명된 grant를 사용해요. WAN에서는 Iroh로 홀 펀칭하거나 릴레이하고, LAN에서는 mDNS를 사용해 QUIC으로 데이터를 전송해요. 원격 토픽은 로컬 공유 메모리에 미러링되고, 각 기기는 하나의 네트워크 게이트웨이를 사용해요.

5. Diagnose: cerulion doctor가 컴파일 및 런타임 문제를 검사하고 해결 방법을 제안해요. (장담컨대 Windows 문제 해결사보다 나아요.) Hindsight는 에이전트가 bag 파일을 분석할 수 있게 해 주는 MCP의 얼리 액세스 기능이에요.

시작하려면 저장소로 이동해서 curl 한 줄 명령으로 Cerulion을 설치하고, Claude Code나 Codex에 프롬프트를 붙여 넣어 보세요: https://github.com/cerulion-inc/cerulion#quickstart-run-record-and-… . 아니면 직접 방식을 바꿔 보셔도 좋아요. 모든 내용이 저장소에 있으니 꼭 스타를 눌러 주세요!

CLI를 사용하려면 무료 계정이 필요해요. 이 계정은 AirDrop이 예전에 그랬던 것처럼 기기 페어링을 쉽게 만들어 주는 데 쓰여요 ;) 모든 기능은 Linux(x86_64/ARM64), macOS, Android(JNI)에서 동작하며, 다른 플랫폼도 곧 지원될 예정이에요.

여러분의 피드백을 기다리고 있어요! 실제 로봇에서 ROS 2를 실행하고 계시다면, 이 도구를 스택에 연결해 보시고 무엇이 깨지는지 알려 주세요.

문서: https://docs.cerulion.com

사이트: https://cerulion.com

영어에서 번역됨. 원문 보기

Hey HN! I'm Lakshay. Raveen and I have built Cerulion, a ROS2-compatible robotics runtime written in Rust. We've worked hard on lowering IPC transport latencies without making the single process tradeoff or forcing POD message types. These fast multi-process graphs can then be resimmed deterministically, and existing ROS2 nodes/launch files can run unmodified alongside native Cerulion Rust/Python code. Installation and quickstart (with a one-shot prompt for your favorite coding agent) here at the repo README: https://github.com/cerulion-inc/cerulion

I worked on off-road autonomy during my PhD at MIT, and we kept running into inter-process latency in ROS (2 lidars and 6 cameras). Loaned messages need POD types, which nukes standard, vendor-agnostic Image/PointCloud2. We ended up running some hot paths in a brittle single process, which made debugging a nightmare. I'm sure you've seen the heisenbugs ROS-based stacks can produce, with no way to easily reproduce the consumption order or interleaving of callbacks. Valuable data of runtime failures on the robot was hard to use effectively without deterministic reproducibility.

This is what we fix. Cerulion bags record per-input reads and scheduler traces alongside message content in standard MCAPs. cerulion bag play --resim all --verify re-executes node code on the recorded schedule and compares each byte for exact matches or within defined tolerances. Exit 0 is a match, 1 shows the first topic/frame that diverges, 6 shows schedule divergence and --report gives an optional CI verdict. Eligible ROS2 processes can replay deterministically as well.

Here's the data loop:

1. Run: Dependency-ordered level-based DAG scheduler with periodic/data/sync triggers, I/O deadlines, backpressure, and automatic profiling for process partitioning. Each node by default free-runs in its own process while preserving deterministic replay. Live runs pause/resume, and UMWAIT/WFE parks idle consumers on CPUs that support it. Wall-clock reads and runtime thread spawns in user code rejected at compile time by macros.

ROS 2 is supported with rmw_cerulion for Foxy, Humble, Jazzy and Lyrical, that lets you run ROS2 nodes/launch files unmodified in the same graph as native Cerulion nodes. LD_PRELOAD gives ROS2 code shared memory loans through std::vector/std::string. cerulion ros2 attach folds in already-running ROS2 robots, and cerulion ros2 run/launch lets you run existing ROS2 workspaces on Cerulion without any additional setup (with an optional automatic migrate suggested that rewrites C++ publish sites).

2. Move: iceoryx2 shared memory with no serialization, no payload copy and no payload-sized allocation, including for variable-length messages like sensor_msgs/Image and PointCloud2. Round trip latency for a 1MiB sensor_msgs/Image between two processes is 4.08µs p50, with a tight tail of 7.38µs p99 (under 2x p50), with recording on. This is default Cerulion, against 10.95 ms for default ROS 2 Jazzy. Cerulion's p50 and p99 stay flat from 64B to 16 MiB.

3. Capture: With this round-trip latency, there are no tradeoffs, not for process isolation and not for bagging. We can afford always-on or event-based logging. Flashback is our robot dashcam: keeps ~30s of all logs and message contents in memory and saves it automatically on process crashes, topic stalls or declared incidents/manual triggers.

4. Reach: A free account lets you pair robots and desks, letting all your devices find each other with no config, IP addresses or discovery chatter. Pubsub is authenticated and on-demand, with signed grants that the robot verifies offline. We use Iroh to hole-punch or relay over WAN, and mDNS over LAN to transmit data using QUIC. Remote topics mirror into local shared memory, and each device has a single network gateway.

5. Diagnose: cerulion doctor scans for compile/run-time issues (better than Windows Troubleshooter I promise) and suggests fixes. Hindsight is an early access MCP to let agents analyze your bags.

To get started: go to the repo, install Cerulion with the curl one-liner, and paste the prompt in Claude Code/Codex: https://github.com/cerulion-inc/cerulion#quickstart-run-record-and-… . Or shift your own gears, it's all in the repo that you should star!

The CLI needs a free account, which we use to make device pairing as easy as AirDrop USED to be ;) Everything runs on Linux (x86_64/ARM64), macOS and Android (JNI), with more platforms coming.

We'd love to hear your feedback! If you run ROS 2 on a real robot, point this at your stack and tell us what breaks.

Docs: https://docs.cerulion.com

Site: https://cerulion.com

다음 단계에서 이름을 정하게 돼요. 이미 회원이신가요? 로그인하세요.

이 글 팔로우하기

누군가 댓글을 달면 메일로 알려 드려요. 계정은 필요 없어요.

뉴스레터

로봇 공학의 모든 소식을 받아 보도록 무료 뉴스레터를 구독해 보세요.

1 USD = 3.254 ILS 환산한 가격은 추정치예요. Coinbase, 2026-12-01 08:12 UTC