RoboGeeks
TH
AED
เข้าสู่ระบบรับชื่อของคุณ

Show HN: Cerulion – runtime สำหรับหุ่นยนต์ที่เข้ากันได้กับ ROS 2 พร้อม multi-process replay

lakshaysบน Hacker News18d1 การเข้าชม
Show HN: Cerulion – Harness สำหรับหุ่นยนต์, Gemini 3.8 Flash เทียบเท่า GPT-6 Astragithub.com

Hey HN! ผม Lakshay และ Raveen สร้าง Cerulion ซึ่งเป็น robotics runtime ที่เข้ากันได้กับ ROS2 เขียนด้วย Rust เราทุ่มเทลด latency ของ IPC transport โดยไม่ต้องแลกกับการรันแบบ single process หรือบังคับใช้ POD message types กราฟ multi-process ที่เร็วเหล่านี้สามารถ resim แบบ deterministic ได้ และ ROS2 nodes/launch files ที่มีอยู่แล้วก็รันได้โดยไม่ต้องแก้ไข ควบคู่ไปกับโค้ด Cerulion แบบ native ทั้ง Rust และ Python ดู installation และ quickstart (พร้อม one-shot prompt สำหรับ coding agent ที่คุณชอบ) ได้ที่ README ของ repo: https://github.com/cerulion-inc/cerulion

ผมทำงานด้าน off-road autonomy ระหว่างทำปริญญาเอกที่ MIT และเราเจอปัญหา inter-process latency ใน ROS อยู่บ่อยครั้ง (lidar 2 ตัวและกล้อง 6 ตัว) Loaned messages ต้องใช้ POD types ซึ่งทำให้ใช้ Image/PointCloud2 มาตรฐานที่ไม่ผูกกับผู้ผลิตไม่ได้ สุดท้ายเราต้องรัน hot path บางส่วนใน single process ที่เปราะบาง ซึ่งทำให้ debug เป็นฝันร้าย คุณคงเคยเจอ heisenbugs ที่ stack ที่ใช้ ROS สร้างขึ้น โดยไม่มีวิธีง่ายๆ ในการทำซ้ำลำดับการ consume หรือการสลับกันของ callbacks ข้อมูลความล้มเหลวขณะรันบนหุ่นยนต์มีค่ามาก แต่ใช้งานได้ยากมากหากไม่มี deterministic reproducibility

นี่คือสิ่งที่เราแก้ไข Cerulion bags บันทึกการอ่านข้อมูลของแต่ละ input และ scheduler traces ควบคู่ไปกับเนื้อหาข้อความใน MCAP มาตรฐาน คำสั่ง cerulion bag play --resim all --verify จะรัน node code ซ้ำตาม schedule ที่บันทึกไว้ และเปรียบเทียบแต่ละ byte ให้ตรงกันทุกประการ หรืออยู่ในค่า tolerance ที่กำหนด Exit 0 หมายถึงตรงกัน, 1 แสดง topic/frame แรกที่ไม่ตรง, 6 แสดง schedule divergence และ --report ให้ CI verdict แบบไม่บังคับ ROS2 processes ที่เข้าเงื่อนไขก็ replay แบบ deterministic ได้เช่นกัน

นี่คือ data loop:

1. Run: DAG scheduler แบบ dependency-ordered ระดับ level-based พร้อม trigger แบบ periodic/data/sync, I/O deadlines, backpressure และ automatic profiling สำหรับการแบ่ง process โดยค่าเริ่มต้นแต่ละ node รันแบบ free-run ใน process ของตัวเองขณะยังคงรักษา deterministic replay ไว้ Live runs สามารถ pause/resume ได้ และ UMWAIT/WFE จะพักผู้รับข้อมูลที่ว่างอยู่บน CPU ที่รองรับ การอ่าน wall-clock และการ spawn runtime thread ในโค้ดผู้ใช้จะถูกปฏิเสธตั้งแต่ compile time ผ่าน macros

ROS 2 รองรับผ่าน rmw_cerulion สำหรับ Foxy, Humble, Jazzy และ Lyrical ซึ่งช่วยให้คุณรัน ROS2 nodes/launch files โดยไม่ต้องแก้ไข ใน graph เดียวกับ Cerulion nodes แบบ native LD_PRELOAD ให้โค้ด ROS2 ได้ shared memory loans ผ่าน std::vector/std::string cerulion ros2 attach จะรวม robot ROS2 ที่กำลังรันอยู่เข้ามา และ cerulion ros2 run/launch ช่วยให้รัน ROS2 workspace ที่มีอยู่บน Cerulion ได้โดยไม่ต้องตั้งค่าเพิ่มเติม (พร้อมตัวเลือก automatic migrate ที่แนะนำให้เขียน C++ publish sites ใหม่)

2. Move: iceoryx2 shared memory ไม่มี serialization ไม่มีการคัดลอก payload และไม่มีการจัดสรรหน่วยความจำตามขนาด payload รวมถึงข้อความความยาวผันแปรอย่าง sensor_msgs/Image และ PointCloud2 round trip latency ของ sensor_msgs/Image ขนาด 1MiB ระหว่างสอง process อยู่ที่ 4.08µs p50 และ tail ที่แคบ 7.38µs p99 (น้อยกว่า 2 เท่าของ p50) เมื่อเปิด recording ค่านี้เป็น default ของ Cerulion เทียบกับ 10.95 ms ของ ROS 2 Jazzy ค่า p50 และ p99 ของ Cerulion คงที่ตั้งแต่ 64B ถึง 16 MiB

3. Capture: ด้วย round-trip latency ระดับนี้ จึงไม่มี trade-off ทั้งการแยก process และการ bag ข้อมูล เราสามารถทำ logging แบบ always-on หรือ event-based ได้ Flashback คือ dashcam ของหุ่นยนต์ เก็บ log และเนื้อหาข้อความทั้งหมดประมาณ 30 วินาทีไว้ในหน่วยความจำ และบันทึกอัตโนมัติเมื่อ process crash, topic หยุดนิ่ง หรือเมื่อมีการประกาศ incident/กดทริกเกอร์ด้วยตนเอง

4. Reach: บัญชีฟรีช่วยให้คุณจับคู่หุ่นยนต์และโต๊ะทำงานได้ ทำให้อุปกรณ์ทั้งหมดของคุณค้นหากันเจอโดยไม่ต้องตั้งค่าอะไร ไม่ต้องใช้ IP address หรือ discovery chatter Pubsub ใช้การยืนยันตัวตนและเรียกใช้ตามต้องการ ด้วย signed grants ที่หุ่นยนต์ตรวจสอบแบบ offline เราใช้ Iroh ในการ hole-punch หรือ relay ผ่าน WAN และใช้ mDNS ผ่าน LAN เพื่อส่งข้อมูลด้วย QUIC Remote topics จะ mirror เข้าไปยัง local shared memory และแต่ละอุปกรณ์มี network gateway เพียงตัวเดียว

5. Diagnose: cerulion doctor สแกนหาปัญหาตอนคอมไพล์และตอนรันไทม์ และแนะนำวิธีแก้ไข (ดีกว่า Windows Troubleshooter จริงๆ นะ รับรอง) Hindsight คือ MCP เวอร์ชัน early access ที่ให้ agents วิเคราะห์ bags ของคุณได้

เริ่มต้นใช้งาน: ไปที่ repo ติดตั้ง Cerulion ด้วยคำสั่ง curl one-liner แล้ววาง prompt ลงใน Claude Code/Codex: https://github.com/cerulion-inc/cerulion#quickstart-run-record-and-… . หรือจะลุยเองก็ได้ ทุกอย่างอยู่ใน repo ซึ่งอย่าลืมกด star นะ!

CLI ต้องใช้บัญชีฟรี ซึ่งเราใช้เพื่อให้การจับคู่อุปกรณ์ง่ายเหมือน AirDrop ในอดีต ;) ใช้งานได้บน Linux (x86_64/ARM64), macOS และ Android (JNI) และกำลังจะมีแพลตฟอร์มอื่นตามมา

เรารอฟังความคิดเห็นของคุณอยู่! ถ้าคุณรัน ROS 2 บนหุ่นยนต์จริง ลองเอาไปใช้กับ stack ของคุณแล้วบอกเราหน่อยว่ามีอะไรพังบ้าง

เอกสาร: 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.673 AED ราคาที่แปลงเป็นค่าประมาณ Coinbase, 2026-12-01 05:21 UTC