RoboGeeks

Show HN: Cerulion – ROS 2互換のマルチプロセス・リプレイ対応ロボティクスランタイム

lakshaysHacker News上19d3回表示
Show HN: Cerulion – ロボティクス向けハーネス、Gemini 3.8 FlashがGPT-6 Astraに匹敵github.com

HNの皆さん、こんにちは!Lakshayです。RaveenとともにCerulionを開発しました。Rustで書かれたROS 2互換のロボティクスランタイムです。単一プロセスのトレードオフを受け入れることも、POD型メッセージを強制することもなく、IPC転送のレイテンシを下げることに力を入れてきました。こうした高速なマルチプロセスのグラフは決定論的にリプレイでき、既存のROS 2ノードやlaunchファイルを、Cerulionのネイティブな Rust/Python コードと並べて無修正で動かせます。インストール手順とクイックスタート(お好みのコーディングエージェントに渡せるワンショットのプロンプトを含む)は、リポジトリのREADMEをご覧ください:https://github.com/cerulion-inc/cerulion

私はMITの博士課程でオフロード自律走行に取り組んでおり、ROS(LiDAR 2台、カメラ6台)でプロセス間レイテンシの問題に何度も直面しました。ローンメッセージにはPOD型が必要となり、標準的でベンダー非依存のImage/PointCloud2が使えなくなります。結局、一部の処理経路を脆弱な単一プロセスで動かすことになり、デバッグが悪夢のようになりました。ROSベースのスタックで起こる「ハイゼンバグ」(再現しない不具合)を、きっとご覧になったことがあるでしょう。コールバックの消費順序やインターリーブを簡単に再現する手段がないのです。ロボット上でのランタイム障害の貴重なデータも、決定論的な再現性がなければ効果的に使いにくいものでした。

これがまさに私たちが解決する問題です。Cerulionのbagは、標準的なMCAPに、メッセージ内容と並べて入力ごとの読み取りとスケジューラのトレースを記録します。cerulion bag play --resim all --verify は、記録されたスケジュールに従ってノードのコードを再実行し、各バイトが完全一致するか、定義された許容誤差内にあるかを比較します。終了コード0は一致、1は最初に乖離したトピック/フレームを示し、6はスケジュールの乖離を示します。--report を指定するとCI用の判定結果を任意で出力できます。条件を満たすROS 2プロセスも、同様に決定論的にリプレイできます。

データのループは次のとおりです:

1. 実行:依存関係順のレベルベースDAGスケジューラです。周期・データ・同期トリガー、I/Oデッドライン、バックプレッシャー、プロセス分割のための自動プロファイリングを備えます。各ノードはデフォルトで独自のプロセス内で自由に動作しつつ、決定論的リプレイは維持されます。ライブ実行は一時停止・再開でき、UMWAIT/WFEに対応するCPUでは、アイドル状態のコンシューマを待機させます。ユーザーコード内のウォールクロック読み取りやランタイムのスレッド生成は、マクロによりコンパイル時に拒否されます。

ROS 2は、Foxy、Humble、Jazzy、Lyrical向けのrmw_cerulionを通じてサポートされます。これにより、既存のROS 2ノードやlaunchファイルを無修正のまま、ネイティブなCerulionノードと同じグラフ内で実行できます。LD_PRELOADにより、ROS 2のコードはstd::vector/std::stringを通じて共有メモリのローンを利用できます。cerulion ros2 attach は稼働中のROS 2ロボットを取り込み、cerulion ros2 run/launch を使えば、追加の設定なしで既存のROS 2ワークスペースをCerulion上で実行できます(C++のpublish箇所を書き換える自動移行(migrate)を任意で提案します)。

2. 転送:iceoryx2の共有メモリを使い、シリアライズも、ペイロードのコピーも、ペイロードサイズの割り当ても行いません。sensor_msgs/ImageやPointCloud2のような可変長メッセージにも対応します。記録を有効にした状態で、2つのプロセス間での1MiBのsensor_msgs/Imageのラウンドトリップレイテンシは、p50で4.08µs、p99で7.38µs(p50の2倍未満)と裾野が狭く抑えられています。これはCerulionのデフォルト構成での値で、デフォルトのROS 2 Jazzyでは10.95msです。Cerulionのp50とp99は、64Bから16MiBまで横ばいです。

3. 記録:このラウンドトリップレイテンシがあれば、トレードオフはありません。プロセス分離でもbag記録でも同様です。常時記録やイベントベースのロギングも行えます。Flashbackはロボットのドライブレコーダーです。約30秒分のすべてのログとメッセージ内容をメモリ上に保持し、プロセスのクラッシュ、トピックの停止、宣言されたインシデントや手動トリガー時に自動的に保存します。

4. Reach:無料アカウントを作成すると、ロボットやデスクトップをペアリングでき、すべてのデバイスが設定不要で互いを見つけられます。IPアドレスやdiscoveryのやり取りは不要です。Pubsubは認証済みでオンデマンドに動作し、ロボット側がオフラインで検証できる署名付きgrantを使います。WAN越しではIrohを使ってhole-punchingまたはリレーを行い、LANではmDNSを使い、QUICでデータを送信します。リモートのtopicはローカルの共有メモリにミラーリングされ、各デバイスは単一のネットワークゲートウェイを持ちます。

5. Diagnose:cerulion doctorがコンパイル時と実行時の問題をスキャンし、修正案を提示します(約束しますが、Windowsのトラブルシューティングより優れています)。Hindsightは、エージェントがバッグを分析できるようにする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 = 10.24 SEK 換算価格は概算です。 Coinbase, 2026-12-01 08:59 UTC