[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F2M9JS2ZN2VA5QXAHVR5XA":3,"skill-same:01M7F2M9JS2ZN2VA5QXAHVR5XA":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7F2M9JS2ZN2VA5QXAHVR5XA","micro-ros-embedded",null,"Use when integrating ESP32, Raspberry Pi Pico, or STM32 microcontrollers with ROS 2 via micro-ROS — agent\u002Fclient setup, serial vs UDP transports, colcon.meta memory tuning, FreeRTOS executor patterns, custom messages, or deciding when a plain serial bridge is the better choice. Provides exact transport configs, memory budgets, working rclc code, reconnection patterns, and debugging checklists for the failure modes that consume days (agent handshake loops, middleware memory exhaustion, QoS mismatches, time-sync drift).","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fembedded\u002Fmicro-ros-embedded\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: micro-ros-embedded\ndescription: \"Use when integrating ESP32, Raspberry Pi Pico, or STM32 microcontrollers with ROS 2 via micro-ROS — agent\u002Fclient setup, serial vs UDP transports, colcon.meta memory tuning, FreeRTOS executor patterns, custom messages, or deciding when a plain serial bridge is the better choice. Provides exact transport configs, memory budgets, working rclc code, reconnection patterns, and debugging checklists for the failure modes that consume days (agent handshake loops, middleware memory exhaustion, QoS mismatches, time-sync drift).\"\nsource: \"https:\u002F\u002Fgithub.com\u002Frahulbachina\u002Frobotics-skills\"\nsource_repository: \"rahulbachina\u002Frobotics-skills\"\nsource_path: \"skills\u002Fros2\u002Fmicro-ros-embedded\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n# micro-ROS on Embedded Targets (ESP32 \u002F Pico \u002F STM32)\n\nmicro-ROS puts a real ROS 2 node (rclc + Micro XRCE-DDS client) on a microcontroller.\nIt talks to a **micro-ros-agent** on the host, which bridges XRCE-DDS to full DDS.\nThe MCU is a first-class graph participant: `ros2 topic list` shows its topics,\n`ros2 node info` shows it, parameters and services work.\n\n**Cost of that:** ~35–80 KB RAM, ~250 KB flash, a brittle session handshake, and\nbuild complexity. Read \"When NOT to use micro-ROS\" before committing.\n\n---\n\n## 1. Architecture — what actually runs where\n\n```\n┌──────────── MCU ────────────┐      serial\u002FUDP      ┌──────── Host (Linux) ────────┐\n│ app task(s)                 │  XRCE-DDS protocol   │ micro-ros-agent              │\n│   └─ rclc executor          │ \u003C==================> │   └─ FastDDS participant     │\n│       └─ rcl \u002F rmw_microxrce│                      │         └─ ROS 2 graph (DDS) │\n│            └─ uxr client    │                      │ other ROS 2 nodes            │\n│ transport (UART\u002FWiFi UDP)   │                      └──────────────────────────────┘\n└─────────────────────────────┘\n```\n\nKey consequences everyone misses:\n\n1. **No agent = no node.** The MCU cannot publish, subscribe, or even finish\n   `rclc_node_init_default()` without a live agent session. Plan for this in\n   your state machine (Section 7).\n2. **All entity creation is static-by-default.** Publishers, subscribers,\n   services are allocated from pools sized at *compile time* via `colcon.meta`\n   (Section 5). Exceeding a pool returns `RCL_RET_ERROR` with zero useful detail.\n3. **The agent does QoS translation.** XRCE \"reliable\" streams map to DDS\n   reliable; \"best-effort\" maps to best-effort. A reliable micro-ROS publisher\n   will NOT match a best-effort host subscriber unless you align QoS (Section 9).\n4. **Message memory is yours.** rclc does not allocate string\u002Fsequence storage\n   for incoming messages. Unassigned `msg.data.data` pointer = hard fault on\n   first message. (Section 8 — the #1 crash in the field.)\n\n### Version pairing — non-negotiable\n\nAgent and client must be the **same ROS 2 distro**. Humble client + Jazzy agent\nfails the session handshake silently (agent logs show repeated\n`session established` \u002F `session re-established` or nothing at all).\n\n| Distro | Status (2026) | Notes |\n|--------|---------------|-------|\n| Humble | LTS, most tested on ESP32\u002FPico | safest choice |\n| Iron   | EOL | avoid |\n| Jazzy  | LTS | fine, ensure component\u002Flib version matches |\n| Rolling| moving target | only if you rebuild firmware lib often |\n\nRun the agent in Docker to guarantee pairing:\n\n```bash\n# Serial (adjust device + baud; -v6 gives per-message logging)\ndocker run -it --rm --device=\u002Fdev\u002FttyUSB0 microros\u002Fmicro-ros-agent:humble \\\n  serial --dev \u002Fdev\u002FttyUSB0 -b 115200 -v6\n\n# UDP (WiFi targets)\ndocker run -it --rm --net=host microros\u002Fmicro-ros-agent:humble \\\n  udp4 --port 8888 -v6\n```\n\n`--net=host` is mandatory for UDP — port mapping (`-p 8888:8888\u002Fudp`) breaks the\nreturn path because the agent replies to the source addr\u002Fport it saw.\n\n---\n\n## 2. Transport selection\n\n| Transport | Targets | Throughput (practical) | Latency | Use when |\n|-----------|---------|------------------------|---------|----------|\n| Serial UART 115200 | all | ~8 KB\u002Fs usable | 2–10 ms | default, debugging |\n| Serial UART 921600 | ESP32, STM32 | ~70 KB\u002Fs | 1–3 ms | IMU @ 200 Hz+, multiple topics |\n| USB CDC | Pico, STM32 (USB FS) | ~500 KB\u002Fs | 1–2 ms | best wired option on Pico |\n| UDP4 over WiFi | ESP32 | ~100+ KB\u002Fs | 5–50 ms (jitter!) | untethered robots |\n| UDP4 over Ethernet | STM32 + LwIP | ~1 MB\u002Fs | \u003C2 ms | industrial, deterministic |\n| Custom (CAN, RS-485) | STM32 | varies | varies | you implement 4 callbacks |\n\nHard rules:\n\n- **WiFi UDP jitter makes it unsuitable for control loops > 50 Hz.** Run the\n  PID on the MCU; send setpoints\u002Fstate over micro-ROS at 10–50 Hz.\n- **Serial payload budget:** at 115200 baud you get ~11.5 KB\u002Fs raw. A 32-byte\n  msg + ~20 bytes XRCE\u002Fframing overhead at 100 Hz = 5.2 KB\u002Fs — already 45% of\n  the link. Budget before you pick rates. Bump to 921600 or 460800 early.\n- **ESP32 UART0 is the boot\u002Flog UART.** Use it for micro-ROS only if you\n  disable ESP-IDF console logging (`CONFIG_ESP_CONSOLE_NONE=y`), otherwise boot\n  messages corrupt XRCE framing and the session never establishes. Prefer\n  UART1\u002FUART2 on spare pins, or UDP.\n\n### Serial wiring (UART transport to a USB-UART adapter)\n\n| MCU pin | Adapter | Notes |\n|---------|---------|-------|\n| TX | RX | cross over |\n| RX | TX | cross over |\n| GND | GND | ALWAYS — floating ground = garbage bytes |\n| — | VCC | do NOT power MCU from adapter unless current budget checked (ESP32 WiFi peaks 500 mA; most CP2102 boards supply ≤100 mA on 3V3) |\n\nAll three chips are 3.3 V logic. 5 V adapter TX into ESP32\u002FPico RX will work\nfor a while, then kill the pin. Check the adapter jumper.\n\n### Pico USB transport (platformio \u002F pico-sdk)\n\nThe Pico has no WiFi (non-W) — USB CDC is the right transport. With\n`micro_ros_platformio`:\n\n```ini\n; platformio.ini\n[env:pico]\nplatform = raspberrypi\nboard = pico\nframework = arduino\nlib_deps = https:\u002F\u002Fgithub.com\u002Fmicro-ROS\u002Fmicro_ros_platformio\nboard_microros_transport = serial      ; CDC shows up as Serial on Pico\nboard_microros_distro = humble\n```\n\nThen on the host: `serial --dev \u002Fdev\u002FttyACM0 -b 115200` (baud is ignored for\nCDC but the flag is required).\n\n### ESP32 UDP transport (micro_ros_platformio \u002F Arduino)\n\n```cpp\n#include \u003Cmicro_ros_platformio.h>\nIPAddress agent_ip(192, 168, 1, 50);   \u002F\u002F host running the agent\nconst uint16_t agent_port = 8888;\n\nvoid setup() {\n  set_microros_wifi_transports(\"SSID\", \"PASS\", agent_ip, agent_port);\n  \u002F\u002F blocks until WiFi connects; does NOT block on agent — handle that yourself\n}\n```\n\nESP-IDF component equivalent: set `CONFIG_MICRO_ROS_AGENT_IP` \u002F\n`CONFIG_MICRO_ROS_AGENT_PORT` via menuconfig, transport `udp`.\n\n### Custom transport (STM32 CAN\u002FRS-485\u002Fanything)\n\nImplement four functions and register them — this is the entire contract:\n\n```c\nbool my_open(struct uxrCustomTransport* t);\nbool my_close(struct uxrCustomTransport* t);\nsize_t my_write(struct uxrCustomTransport* t, const uint8_t* buf, size_t len, uint8_t* err);\nsize_t my_read(struct uxrCustomTransport* t, uint8_t* buf, size_t len, int timeout_ms, uint8_t* err);\n\nrmw_uros_set_custom_transport(\n  true,            \u002F\u002F framing: true for stream transports (UART), false for packet (UDP\u002FCAN-FD)\n  &my_args, my_open, my_close, my_write, my_read);\n```\n\nFraming flag gotcha: stream transports need `true` (enables HDLC-like framing\nwith 0x7E delimiters). Packet-oriented transports need `false`. Wrong flag =\nagent sees garbage, no session, no error message.\n\n---\n\n## 3. When plain serial bridge beats micro-ROS — decide honestly\n\nmicro-ROS is the right tool when you need ≥2 of: parameters, services,\nmultiple topics, ROS time on the MCU, discovery in the graph, lifecycle.\n\nA plain serial protocol + a tiny host-side ROS 2 Python node is better when:\n\n| Situation | Why bridge wins |\n|-----------|-----------------|\n| 1–3 topics, fixed schema (e.g. cmd_vel in, odom + IMU out) | 200 lines total vs build system + agent + memory tuning |\n| RAM \u003C 100 KB free (small STM32F0\u002FF1, ATmega — micro-ROS won't fit at all on AVR) | rclc+rmw needs ~35 KB minimum, realistically 50–80 KB |\n| Hard-real-time control loop on the MCU | XRCE session servicing inside `rclc_executor_spin_some` adds jitter |\n| Team can't maintain a colcon\u002FESP-IDF\u002Fpico-sdk firmware build | Arduino sketch + pyserial is maintainable by anyone |\n| Flaky link (long RS-485 run, lossy radio) | you control retry\u002FCRC policy; XRCE reliable streams stall hard on loss |\n| You only need telemetry logging | rosbag the bridge node's output |\n\nReference bridge pattern (this is the whole thing — COBS-framed binary, CRC16):\n\n```python\n# host_bridge.py — ROS 2 node, ~60 lines, replaces micro-ROS for simple cases\nimport struct, serial, rclpy\nfrom rclpy.node import Node\nfrom geometry_msgs.msg import Twist\nfrom sensor_msgs.msg import Imu\nfrom cobs import cobs  # pip install cobs\n\nPKT_IMU = 0x01   # mcu->host: \u003CB 6f H> = id, ax ay az gx gy gz, crc16\nPKT_CMD = 0x10   # host->mcu: \u003CB 2f H> = id, lin_x ang_z, crc16\n\ndef crc16(data: bytes) -> int:\n    crc = 0xFFFF\n    for b in data:\n        crc ^= b\n        for _ in range(8):\n            crc = (crc >> 1) ^ 0xA001 if crc & 1 else crc >> 1\n    return crc\n\nclass Bridge(Node):\n    def __init__(self):\n        super().__init__('mcu_bridge')\n        self.ser = serial.Serial('\u002Fdev\u002FttyUSB0', 921600, timeout=0.005)\n        self.imu_pub = self.create_publisher(Imu, 'imu\u002Fdata_raw', 10)\n        self.create_subscription(Twist, 'cmd_vel', self.on_cmd, 10)\n        self.buf = bytearray()\n        self.create_timer(0.002, self.poll)         # 500 Hz poll\n\n    def on_cmd(self, msg):\n        body = struct.pack('\u003CB2f', PKT_CMD, msg.linear.x, msg.angular.z)\n        body += struct.pack('\u003CH', crc16(body))\n        self.ser.write(cobs.encode(body) + b'\\x00')\n\n    def poll(self):\n        self.buf += self.ser.read(256)\n        while b'\\x00' in self.buf:\n            frame, _, self.buf = self.buf.partition(b'\\x00')\n            try: pkt = cobs.decode(bytes(frame))\n            except Exception: continue\n            if len(pkt) \u003C 3 or crc16(pkt[:-2]) != struct.unpack('\u003CH', pkt[-2:])[0]:\n                continue\n            if pkt[0] == PKT_IMU and len(pkt) == 27:\n                ax, ay, az, gx, gy, gz = struct.unpack('\u003C6f', pkt[1:25])\n                m = Imu()\n                m.header.stamp = self.get_clock().now().to_msg()\n                m.header.frame_id = 'imu_link'\n                m.linear_acceleration.x, m.linear_acceleration.y, m.linear_acceleration.z = ax, ay, az\n                m.angular_velocity.x, m.angular_velocity.y, m.angular_velocity.z = gx, gy, gz\n                self.imu_pub.publish(m)\n\nrclpy.init(); rclpy.spin(Bridge())\n```\n\nMCU side is a matching `struct.pack` in C plus the same CRC. Done. If the spec\nlater grows services\u002Fparams, *then* migrate to micro-ROS.\n\n---\n\n## 4. Canonical client code (rclc, FreeRTOS \u002F Arduino loop)\n\nThis is the reference skeleton — publisher + subscriber + timer, with the error\nmacro discipline and message memory done correctly.\n\n```cpp\n#include \u003Cmicro_ros_platformio.h>      \u002F\u002F or \u003Cmicro_ros_arduino.h> \u002F ESP-IDF component\n#include \u003Crcl\u002Frcl.h>\n#include \u003Crclc\u002Frclc.h>\n#include \u003Crclc\u002Fexecutor.h>\n#include \u003Cstd_msgs\u002Fmsg\u002Fint32.h>\n#include \u003Cgeometry_msgs\u002Fmsg\u002Ftwist.h>\n\nrcl_publisher_t pub;\nrcl_subscription_t sub;\nrcl_timer_t timer;\nrclc_executor_t executor;\nrclc_support_t support;\nrcl_allocator_t allocator;\nrcl_node_t node;\n\nstd_msgs__msg__Int32 pub_msg;\ngeometry_msgs__msg__Twist cmd_msg;     \u002F\u002F POD message: no extra memory needed\n\n#define RCCHECK(fn) { rcl_ret_t rc = fn; if (rc != RCL_RET_OK) { error_loop(rc); } }\n#define RCSOFTCHECK(fn) { rcl_ret_t rc = fn; (void)rc; }  \u002F\u002F for periodic calls\n\nvoid error_loop(rcl_ret_t rc) {\n  \u002F\u002F DON'T just while(1). Blink + reboot so a transient agent loss self-heals.\n  for (int i = 0; i \u003C 10; i++) { digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); delay(100); }\n  ESP.restart();   \u002F\u002F Pico: watchdog_reboot(0,0,0); STM32: NVIC_SystemReset();\n}\n\nvoid cmd_cb(const void* msgin) {\n  const geometry_msgs__msg__Twist* m = (const geometry_msgs__msg__Twist*)msgin;\n  set_motor_targets(m->linear.x, m->angular.z);   \u002F\u002F keep callbacks SHORT\n}\n\nvoid timer_cb(rcl_timer_t* t, int64_t last_call_time) {\n  (void)last_call_time;\n  if (t == NULL) return;\n  pub_msg.data++;\n  RCSOFTCHECK(rcl_publish(&pub, &pub_msg, NULL));\n}\n\nvoid setup() {\n  set_microros_serial_transports(Serial);  \u002F\u002F or wifi transport, Section 2\n  delay(2000);                              \u002F\u002F let transport settle\n\n  allocator = rcl_get_default_allocator();\n  RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));\n  RCCHECK(rclc_node_init_default(&node, \"esp32_node\", \"\", &support));\n\n  RCCHECK(rclc_publisher_init_default(&pub, &node,\n      ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Int32), \"mcu\u002Fheartbeat\"));\n\n  RCCHECK(rclc_subscription_init_default(&sub, &node,\n      ROSIDL_GET_MSG_TYPE_SUPPORT(geometry_msgs, msg, Twist), \"cmd_vel\"));\n\n  RCCHECK(rclc_timer_init_default(&timer, &support,\n      RCL_MS_TO_NS(50), timer_cb));          \u002F\u002F 20 Hz publish\n\n  \u002F\u002F handles = subscriptions + timers + services + clients + guard_conditions\n  \u002F\u002F Count EXACTLY. Too few -> rclc_executor_add_* returns RCL_RET_ERROR.\n  RCCHECK(rclc_executor_init(&executor, &support.context, 2, &allocator));\n  RCCHECK(rclc_executor_add_subscription(&executor, &sub, &cmd_msg, &cmd_cb, ON_NEW_DATA));\n  RCCHECK(rclc_executor_add_timer(&executor, &timer));\n}\n\nvoid loop() {\n  \u002F\u002F 10 ms budget: services transport+executor. Do NOT block elsewhere in loop().\n  RCSOFTCHECK(rclc_executor_spin_some(&executor, RCL_MS_TO_NS(10)));\n}\n```\n\n### FreeRTOS task layout (ESP-IDF \u002F STM32+FreeRTOS)\n\nOne task owns ALL rclc\u002Frcl calls. rclc is **not thread-safe**; calling\n`rcl_publish` from a second task while the executor spins corrupts the XRCE\nsession stream.\n\n```c\n\u002F\u002F Correct pattern: other tasks push to a queue; the micro-ROS task publishes.\nvoid microros_task(void* arg) {            \u002F\u002F stack: 4096 words ESP32 (16 KB) min\n  \u002F\u002F ... init as above ...\n  sensor_sample_t s;\n  while (1) {\n    if (xQueueReceive(sensor_q, &s, 0) == pdTRUE) {\n      imu_msg.linear_acceleration.x = s.ax; \u002F* ... *\u002F\n      rcl_publish(&imu_pub, &imu_msg, NULL);\n    }\n    rclc_executor_spin_some(&executor, RCL_MS_TO_NS(5));\n    vTaskDelay(pdMS_TO_TICKS(1));           \u002F\u002F yield; never starve IDLE task\n  }\n}\n\u002F\u002F Priority: above app tasks that feed it, below hard-RT control ISR\u002Ftask.\n\u002F\u002F ESP32: pin to core 1 if WiFi (core 0) is busy: xTaskCreatePinnedToCore(..., 1);\n```\n\nStack sizing: micro-ROS task needs ≥ 8 KB on STM32, ≥ 16 KB on ESP32 (printf +\nWiFi stack frames). `uxTaskGetStackHighWaterMark` after 5 min of traffic; keep\n≥ 1 KB headroom. Stack overflow here manifests as random hard faults during\n`rcl_publish`, not at init.\n\n---\n\n## 5. Memory tuning — colcon.meta\n\nmicro-ROS statically pools all middleware entities. Defaults (varies by port,\nroughly): 1 node, 5 publishers, 5 subscribers, 5 services, 5 clients,\n512-byte streams. Exceed any pool → init returns `RCL_RET_ERROR`.\n\n`colcon.meta` (ESP-IDF component: `app-colcon.meta` in project root;\nmicro_ros_setup firmware builds: edit then **full clean rebuild** — these are\ncompile-time constants, `pio run` alone will NOT pick them up; delete\n`.pio\u002Flibdeps\u002F*\u002Fmicro_ros_platformio\u002Flibmicroros` or run\n`ros2 run micro_ros_setup build_firmware.sh` after changes):\n\n```json\n{\n  \"names\": {\n    \"rmw_microxrcedds\": {\n      \"cmake-args\": [\n        \"-DRMW_UXRCE_MAX_NODES=1\",\n        \"-DRMW_UXRCE_MAX_PUBLISHERS=4\",\n        \"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=3\",\n        \"-DRMW_UXRCE_MAX_SERVICES=1\",\n        \"-DRMW_UXRCE_MAX_CLIENTS=1\",\n        \"-DRMW_UXRCE_MAX_HISTORY=4\",\n        \"-DRMW_UXRCE_TRANSPORT=custom\",\n        \"-DRMW_UXRCE_STREAM_HISTORY=4\",\n        \"-DRMW_UXRCE_MAX_TRANSPORT_MTU=512\"\n      ]\n    },\n    \"microxrcedds_client\": {\n      \"cmake-args\": [\"-DUCLIENT_PROFILE_MULTITHREAD=OFF\"]\n    }\n  }\n}\n```\n\nSizing rules:\n\n- **RAM per entity** ≈ MTU × STREAM_HISTORY for each reliable stream, plus\n  ~1–2 KB bookkeeping per pub\u002Fsub. With MTU=512, HISTORY=4: ~2 KB per direction.\n- **MAX_TRANSPORT_MTU must exceed your largest serialized message** + ~64 B\n  overhead, OR the message gets fragmented across stream history slots. A\n  message larger than `MTU × STREAM_HISTORY` can NEVER be sent — publish\n  returns OK but nothing arrives (best-effort) or the stream stalls (reliable).\n  E.g. `sensor_msgs\u002FLaserScan` with 360 floats ≈ 1.5 KB serialized → needs\n  MTU=512, HISTORY≥4, or MTU=2048.\n- **MAX_HISTORY** is per-topic sample slots, separate from STREAM_HISTORY\n  (transport buffers). Publishing faster than the link drains with HISTORY=1\n  silently drops samples.\n- Realistic budgets: minimal node (1 pub, 1 sub, int32s) ~35 KB RAM. Typical\n  robot node (odom + imu pub, cmd_vel sub, 1 service) ~55–70 KB. LaserScan\n  publisher ~85 KB+. Pico (264 KB RAM) is comfortable; STM32F4 (128–192 KB)\n  needs the tuning above; STM32F1 (20 KB) cannot run micro-ROS — use a bridge.\n\n---\n\n## 6. QoS and rclc entity variants\n\n| rclc init call | DDS QoS | Use for |\n|---|---|---|\n| `rclc_publisher_init_default` | reliable, keep-last | state, events, services-ish data |\n| `rclc_publisher_init_best_effort` | best-effort | high-rate sensors (IMU, encoders) |\n| `rclc_subscription_init_default` | reliable | cmd topics where loss matters |\n| `rclc_subscription_init_best_effort` | best-effort | matching sensor streams |\n\nRules:\n\n- **Best-effort pub on the MCU + `ros2 topic echo` works** (echo defaults\n  compatible), but a host node subscribing reliable will get NOTHING — no\n  error, no warning on the MCU side. Check with\n  `ros2 topic info \u002Ftopic -v` (shows QoS of every endpoint).\n- High-rate sensor data: best-effort, always. Reliable streams over serial\n  retry on every dropped byte and create multi-second backlogs; the symptom is\n  \"topic was fine for 2 minutes then latency grew unbounded\".\n- Reliable publishes **block** in `rcl_publish` until acked or session timeout\n  when the stream is full. On a saturated 115200 link this freezes your loop\n  for hundreds of ms. Another reason control loops stay local.\n\n---\n\n## 7. Agent reconnection — the state machine you must write\n\nThe default examples die permanently when the agent restarts. Production\nfirmware needs this (works on all three platforms):\n\n```cpp\nenum class AgentState { WAITING, AVAILABLE, CONNECTED, DISCONNECTED };\nAgentState state = AgentState::WAITING;\n\n#define EXECUTE_EVERY_N_MS(MS, X) do { \\\n  static int64_t t = -1; \\\n  if (t == -1) t = uxr_millis(); \\\n  if (uxr_millis() - t > MS) { X; t = uxr_millis(); } } while (0)\n\nvoid loop() {\n  switch (state) {\n    case AgentState::WAITING:\n      EXECUTE_EVERY_N_MS(500,\n        state = (RMW_RET_OK == rmw_uros_ping_agent(100, 1))\n                ? AgentState::AVAILABLE : AgentState::WAITING);\n      break;\n    case AgentState::AVAILABLE:\n      state = create_entities() ? AgentState::CONNECTED : AgentState::WAITING;\n      if (state == AgentState::WAITING) destroy_entities();\n      break;\n    case AgentState::CONNECTED:\n      EXECUTE_EVERY_N_MS(2000,\n        state = (RMW_RET_OK == rmw_uros_ping_agent(100, 3))\n                ? AgentState::CONNECTED : AgentState::DISCONNECTED);\n      if (state == AgentState::CONNECTED)\n        rclc_executor_spin_some(&executor, RCL_MS_TO_NS(10));\n      break;\n    case AgentState::DISCONNECTED:\n      stop_motors();                     \u002F\u002F SAFETY: never coast on link loss\n      destroy_entities();\n      state = AgentState::WAITING;\n      break;\n  }\n}\n\nvoid destroy_entities() {\n  rmw_context_t* ctx = rcl_context_get_rmw_context(&support.context);\n  (void)rmw_uros_set_context_entity_destroy_session_timeout(ctx, 0); \u002F\u002F don't wait for acks\n  rcl_publisher_fini(&pub, &node);\n  rcl_subscription_fini(&sub, &node);\n  rcl_timer_fini(&timer);\n  rclc_executor_fini(&executor);\n  rcl_node_fini(&node);\n  rclc_support_fini(&support);\n}\n```\n\nCritical details:\n\n- `rmw_uros_ping_agent(timeout_ms, attempts)` works **before** any session\n  exists — it's the only safe pre-init probe.\n- Setting destroy-session timeout to 0 prevents `destroy_entities()` from\n  blocking ~10 s per entity when the agent is already gone.\n- **Always stop actuators on DISCONNECTED.** Also run an independent cmd_vel\n  watchdog: if no cmd received for 500 ms while CONNECTED, stop. Agent alive ≠\n  teleop node alive.\n\n---\n\n## 8. Custom and string\u002Fsequence messages — the #1 crash source\n\nrclc gives your subscription callback a message struct, but **you** own the\nstorage for any non-POD field (strings, dynamic arrays). Forgetting this is a\nguaranteed hard fault \u002F memory corruption on first message:\n\n```cpp\n\u002F\u002F WRONG — msg.data.data is NULL, first incoming string faults\nstd_msgs__msg__String msg;\nrclc_executor_add_subscription(&executor, &sub, &msg, &cb, ON_NEW_DATA);\n\n\u002F\u002F RIGHT — pre-assign capacity before adding to executor\nstd_msgs__msg__String msg;\nstatic char buf[128];\nmsg.data.data = buf;\nmsg.data.size = 0;\nmsg.data.capacity = sizeof(buf);\n```\n\nSame for sequences (e.g. `sensor_msgs\u002FJointState` on the publish side):\n\n```cpp\nsensor_msgs__msg__JointState js;\nstatic double pos[4];\nstatic rosidl_runtime_c__String name_storage[4];\nstatic char name_buf[4][16];\njs.position.data = pos; js.position.size = 4; js.position.capacity = 4;\njs.name.data = name_storage; js.name.size = 4; js.name.capacity = 4;\nfor (int i = 0; i \u003C 4; i++) {\n  js.name.data[i].data = name_buf[i];\n  js.name.data[i].capacity = 16;\n  snprintf(name_buf[i], 16, \"joint_%d\", i);\n  js.name.data[i].size = strlen(name_buf[i]);\n}\n\u002F\u002F header.frame_id is ALSO a string — assign it or publishing faults:\nstatic char frame[16] = \"base_link\";\njs.header.frame_id.data = frame; js.header.frame_id.size = 9; js.header.frame_id.capacity = 16;\n```\n\nAlternative: `micro_ros_utilities_create_message_memory()` allocates per a\n`micro_ros_utilities_memory_conf_t` (set `max_string_capacity`,\n`max_ros2_type_sequence_capacity`). Convenient, but heap-based — prefer static\nassignment on small targets.\n\n### Adding a custom message package\n\n1. Put your `my_msgs\u002F` package (with `msg\u002F*.msg`, `CMakeLists.txt`,\n   `package.xml` — standard rosidl package, **C only**, no rosidl_python) in:\n   - platformio: `extra_packages\u002F` directory next to `platformio.ini`\n   - ESP-IDF component: `components\u002Fmicro_ros_espidf_component\u002Fextra_packages\u002F`\n   - micro_ros_setup: `firmware\u002Fmcu_ws\u002F` then rebuild\n2. **Full library rebuild required** — the message gets compiled into\n   libmicroros. platformio: delete `.pio\u002Flibdeps\u002F\u003Cenv>\u002Fmicro_ros_platformio\u002Flibmicroros`.\n3. The SAME package must be built and sourced in the **agent's** workspace\n   (or any host node using it). Mismatch symptom: agent prints\n   `create_topic ... UNKNOWN topic type` or subscribers match but deserialize garbage.\n4. Type hashes must match → build host package on the same distro. Never edit\n   a .msg on one side only.\n\nPitfalls: field name `bool data` works; nested custom types must be in the same\nor an extra_packages-included package; `string\u003C=N` bounded strings save you\nfrom the capacity dance above and are strongly preferred on MCUs.\n\n---\n\n## 9. Time sync\n\nMCU epoch starts at 0 at boot. Host nodes doing TF or message_filters will\ndiscard your data (\"message too old\") unless you sync:\n\n```cpp\n\u002F\u002F After session established, then periodically (drift ~ppm of crystal):\nrmw_uros_sync_session(1000);                 \u002F\u002F timeout ms; do every ~60 s\n\n\u002F\u002F Stamping:\nint64_t ns = rmw_uros_epoch_nanos();\nmsg.header.stamp.sec = ns \u002F 1000000000LL;\nmsg.header.stamp.nanosec = ns % 1000000000LL;\n```\n\n`rmw_uros_epoch_nanos()` returns 0 if sync never ran — check\n`rmw_uros_epoch_synchronized()` first. Sync accuracy over serial: ~1 ms; over\nWiFi: ~5–20 ms (jitter). For tighter sensor fusion, timestamp at sample time\nwith MCU monotonic clock and apply the session offset, don't timestamp at\npublish time.\n\n---\n\n## 10. Debugging checklist — run in this order\n\n**Nothing in `ros2 topic list`:**\n1. Agent running, same distro as client lib? (`docker ps`, image tag)\n2. Agent `-v6`: do you see `session established`? If not → transport problem,\n   go to step 4. If yes but no `create_*` lines → client init failing on MCU.\n3. Repeated `session re-established` loops → MCU is rebooting (watch its\n   serial console on ANOTHER uart) or `error_loop` reset cycle; usually an\n   `RCCHECK` failure → check entity pool limits (Section 5) or executor handle\n   count.\n4. Serial: correct device? Baud matches both sides? `dmesg | tail` after\n   replug. Nothing else holding the port (close PlatformIO monitor — the agent\n   and a serial monitor cannot share `\u002Fdev\u002FttyUSB0`).\n5. ESP32 serial: boot log garbage corrupting framing? Move off UART0 or\n   silence console.\n6. UDP: agent started with `--net=host`? MCU and host on same subnet? Firewall\n   (`sudo ufw allow 8888\u002Fudp`)? Ping the MCU's IP.\n\n**Topics listed but `ros2 topic echo` silent:**\n7. QoS: `ros2 topic info \u002Ft -v` — best-effort pub vs reliable sub?\n8. Message larger than MTU × STREAM_HISTORY? (Section 5)\n9. ROS_DOMAIN_ID: agent inherits its environment's domain. MCU side doesn't\n   set domain — the AGENT's `ROS_DOMAIN_ID` must match your other nodes.\n   In Docker: `-e ROS_DOMAIN_ID=42`.\n\n**Subscriber callback never fires:**\n10. Executor handle count ≥ actual handles added?\n11. Message memory assigned for strings\u002Fsequences? (May also crash, Section 8)\n12. Publishing side QoS mismatch (reliable host pub → best-effort MCU sub is\n    fine; check the reverse).\n\n**Random hard faults \u002F WDT resets:**\n13. micro-ROS task stack high-water mark (Section 4).\n14. rcl calls from multiple tasks? Consolidate.\n15. ESP32: WiFi + flash writes + micro-ROS on core 0 → starvation; pin task to\n    core 1, feed the task WDT or `vTaskDelay(1)` every loop.\n16. Unassigned string capacity in a message you PUBLISH (incl. header.frame_id).\n\n**Worked for minutes, then stalled:**\n17. Reliable stream backlog on saturated link → switch sensor topics to\n    best-effort, raise baud, or lower rate.\n18. Agent restarted and firmware has no reconnection state machine (Section 7).\n\n**Init returns RCL_RET_ERROR with no detail:**\n19. Pool exhausted — count your entities vs colcon.meta, remember the clean\n    rebuild requirement.\n20. `rclc_support_init` specifically failing → no agent reachable; gate init\n    behind `rmw_uros_ping_agent`.\n\n---\n\n## 11. Build system quick reference\n\n| Stack | Best for | Library mechanism |\n|---|---|---|\n| `micro_ros_platformio` | ESP32 + Pico, fastest iteration | lib_deps; auto-builds libmicroros on first compile (needs ~5 min + python3) |\n| `micro_ros_arduino` | Arduino IDE diehards | precompiled lib; custom messages require rebuilding the static lib in Docker — painful, prefer platformio |\n| `micro_ros_espidf_component` | ESP-IDF projects, production ESP32 | git submodule in `components\u002F`; menuconfig for transport\u002Fagent IP |\n| pico-sdk + `micro_ros_raspberrypi_pico_sdk` | bare pico-sdk C | precompiled libmicroros.a + CMake |\n| STM32CubeMX + `micro_ros_stm32cubemx_utils` | STM32 + FreeRTOS | Docker-built static lib; DMA UART transport templates included — use the DMA variant, the IT variant drops bytes above 115200 |\n| `micro_ros_setup` | building agent + custom firmware in a ROS 2 ws | `ros2 run micro_ros_setup ...` scripts |\n\nHost agent without Docker:\n```bash\nsudo apt install ros-humble-micro-ros-agent   # if available, else build via micro_ros_setup\nros2 run micro_ros_agent micro_ros_agent serial --dev \u002Fdev\u002FttyUSB0 -b 921600 -v6\n```\n\nSmoke test once connected:\n```bash\nros2 node list                      # expect \u002Fesp32_node\nros2 topic hz \u002Fmcu\u002Fheartbeat        # expect ~20 Hz, steady\nros2 topic pub -r 5 \u002Fcmd_vel geometry_msgs\u002Fmsg\u002FTwist '{linear: {x: 0.1}}'\n```\n\n---\n\n## 12. Decision summary\n\n```\nNeed params\u002Fservices\u002Fmany topics\u002FROS time on MCU?\n ├─ no  → plain serial bridge (Section 3). Stop here.\n └─ yes → micro-ROS:\n     ├─ RAM ≥ 100 KB free?  no → bridge anyway.\n     ├─ Wired & deterministic needed → UART 921600 \u002F USB CDC \u002F Ethernet\n     ├─ Untethered ESP32 → WiFi UDP, control loops stay ON the MCU\n     ├─ Write colcon.meta BEFORE first build (entity counts, MTU vs biggest msg)\n     ├─ One task owns rclc; queues feed it\n     ├─ Pre-assign string\u002Fsequence memory for every message both directions\n     ├─ Implement the reconnection state machine + actuator failsafe\n     └─ Sync time before stamping headers\n```\n","# micro-ROS on Embedded Targets (ESP32 \u002F Pico \u002F STM32)\n\nmicro-ROS puts a real ROS 2 node (rclc + Micro XRCE-DDS client) on a microcontroller.\nIt talks to a **micro-ros-agent** on the host, which bridges XRCE-DDS to full DDS.\nThe MCU is a first-class graph participant: `ros2 topic list` shows its topics,\n`ros2 node info` shows it, parameters and services work.\n\n**Cost of that:** ~35–80 KB RAM, ~250 KB flash, a brittle session handshake, and\nbuild complexity. Read \"When NOT to use micro-ROS\" before committing.\n\n---\n\n## 1. Architecture — what actually runs where\n\n```\n┌──────────── MCU ────────────┐      serial\u002FUDP      ┌──────── Host (Linux) ────────┐\n│ app task(s)                 │  XRCE-DDS protocol   │ micro-ros-agent              │\n│   └─ rclc executor          │ \u003C==================> │   └─ FastDDS participant     │\n│       └─ rcl \u002F rmw_microxrce│                      │         └─ ROS 2 graph (DDS) │\n│            └─ uxr client    │                      │ other ROS 2 nodes            │\n│ transport (UART\u002FWiFi UDP)   │                      └──────────────────────────────┘\n└─────────────────────────────┘\n```\n\nKey consequences everyone misses:\n\n1. **No agent = no node.** The MCU cannot publish, subscribe, or even finish\n   `rclc_node_init_default()` without a live agent session. Plan for this in\n   your state machine (Section 7).\n2. **All entity creation is static-by-default.** Publishers, subscribers,\n   services are allocated from pools sized at *compile time* via `colcon.meta`\n   (Section 5). Exceeding a pool returns `RCL_RET_ERROR` with zero useful detail.\n3. **The agent does QoS translation.** XRCE \"reliable\" streams map to DDS\n   reliable; \"best-effort\" maps to best-effort. A reliable micro-ROS publisher\n   will NOT match a best-effort host subscriber unless you align QoS (Section 9).\n4. **Message memory is yours.** rclc does not allocate string\u002Fsequence storage\n   for incoming messages. Unassigned `msg.data.data` pointer = hard fault on\n   first message. (Section 8 — the #1 crash in the field.)\n\n### Version pairing — non-negotiable\n\nAgent and client must be the **same ROS 2 distro**. Humble client + Jazzy agent\nfails the session handshake silently (agent logs show repeated\n`session established` \u002F `session re-established` or nothing at all).\n\n| Distro | Status (2026) | Notes |\n|--------|---------------|-------|\n| Humble | LTS, most tested on ESP32\u002FPico | safest choice |\n| Iron   | EOL | avoid |\n| Jazzy  | LTS | fine, ensure component\u002Flib version matches |\n| Rolling| moving target | only if you rebuild firmware lib often |\n\nRun the agent in Docker to guarantee pairing:\n\n```bash\n# Serial (adjust device + baud; -v6 gives per-message logging)\ndocker run -it --rm --device=\u002Fdev\u002FttyUSB0 microros\u002Fmicro-ros-agent:humble \\\n  serial --dev \u002Fdev\u002FttyUSB0 -b 115200 -v6\n\n# UDP (WiFi targets)\ndocker run -it --rm --net=host microros\u002Fmicro-ros-agent:humble \\\n  udp4 --port 8888 -v6\n```\n\n`--net=host` is mandatory for UDP — port mapping (`-p 8888:8888\u002Fudp`) breaks the\nreturn path because the agent replies to the source addr\u002Fport it saw.\n\n---\n\n## 2. Transport selection\n\n| Transport | Targets | Throughput (practical) | Latency | Use when |\n|-----------|---------|------------------------|---------|----------|\n| Serial UART 115200 | all | ~8 KB\u002Fs usable | 2–10 ms | default, debugging |\n| Serial UART 921600 | ESP32, STM32 | ~70 KB\u002Fs | 1–3 ms | IMU @ 200 Hz+, multiple topics |\n| USB CDC | Pico, STM32 (USB FS) | ~500 KB\u002Fs | 1–2 ms | best wired option on Pico |\n| UDP4 over WiFi | ESP32 | ~100+ KB\u002Fs | 5–50 ms (jitter!) | untethered robots |\n| UDP4 over Ethernet | STM32 + LwIP | ~1 MB\u002Fs | \u003C2 ms | industrial, deterministic |\n| Custom (CAN, RS-485) | STM32 | varies | varies | you implement 4 callbacks |\n\nHard rules:\n\n- **WiFi UDP jitter makes it unsuitable for control loops > 50 Hz.** Run the\n  PID on the MCU; send setpoints\u002Fstate over micro-ROS at 10–50 Hz.\n- **Serial payload budget:** at 115200 baud you get ~11.5 KB\u002Fs raw. A 32-byte\n  msg + ~20 bytes XRCE\u002Fframing overhead at 100 Hz = 5.2 KB\u002Fs — already 45% of\n  the link. Budget before you pick rates. Bump to 921600 or 460800 early.\n- **ESP32 UART0 is the boot\u002Flog UART.** Use it for micro-ROS only if you\n  disable ESP-IDF console logging (`CONFIG_ESP_CONSOLE_NONE=y`), otherwise boot\n  messages corrupt XRCE framing and the session never establishes. Prefer\n  UART1\u002FUART2 on spare pins, or UDP.\n\n### Serial wiring (UART transport to a USB-UART adapter)\n\n| MCU pin | Adapter | Notes |\n|---------|---------|-------|\n| TX | RX | cross over |\n| RX | TX | cross over |\n| GND | GND | ALWAYS — floating ground = garbage bytes |\n| — | VCC | do NOT power MCU from adapter unless current budget checked (ESP32 WiFi peaks 500 mA; most CP2102 boards supply ≤100 mA on 3V3) |\n\nAll three chips are 3.3 V logic. 5 V adapter TX into ESP32\u002FPico RX will work\nfor a while, then kill the pin. Check the adapter jumper.\n\n### Pico USB transport (platformio \u002F pico-sdk)\n\nThe Pico has no WiFi (non-W) — USB CDC is the right transport. With\n`micro_ros_platformio`:\n\n```ini\n; platformio.ini\n[env:pico]\nplatform = raspberrypi\nboard = pico\nframework = arduino\nlib_deps = https:\u002F\u002Fgithub.com\u002Fmicro-ROS\u002Fmicro_ros_platformio\nboard_microros_transport = serial      ; CDC shows up as Serial on Pico\nboard_microros_distro = humble\n```\n\nThen on the host: `serial --dev \u002Fdev\u002FttyACM0 -b 115200` (baud is ignored for\nCDC but the flag is required).\n\n### ESP32 UDP transport (micro_ros_platformio \u002F Arduino)\n\n```cpp\n#include \u003Cmicro_ros_platformio.h>\nIPAddress agent_ip(192, 168, 1, 50);   \u002F\u002F host running the agent\nconst uint16_t agent_port = 8888;\n\nvoid setup() {\n  set_microros_wifi_transports(\"SSID\", \"PASS\", agent_ip, agent_port);\n  \u002F\u002F blocks until WiFi connects; does NOT block on agent — handle that yourself\n}\n```\n\nESP-IDF component equivalent: set `CONFIG_MICRO_ROS_AGENT_IP` \u002F\n`CONFIG_MICRO_ROS_AGENT_PORT` via menuconfig, transport `udp`.\n\n### Custom transport (STM32 CAN\u002FRS-485\u002Fanything)\n\nImplement four functions and register them — this is the entire contract:\n\n```c\nbool my_open(struct uxrCustomTransport* t);\nbool my_close(struct uxrCustomTransport* t);\nsize_t my_write(struct uxrCustomTransport* t, const uint8_t* buf, size_t len, uint8_t* err);\nsize_t my_read(struct uxrCustomTransport* t, uint8_t* buf, size_t len, int timeout_ms, uint8_t* err);\n\nrmw_uros_set_custom_transport(\n  true,            \u002F\u002F framing: true for stream transports (UART), false for packet (UDP\u002FCAN-FD)\n  &my_args, my_open, my_close, my_write, my_read);\n```\n\nFraming flag gotcha: stream transports need `true` (enables HDLC-like framing\nwith 0x7E delimiters). Packet-oriented transports need `false`. Wrong flag =\nagent sees garbage, no session, no error message.\n\n---\n\n## 3. When plain serial bridge beats micro-ROS — decide honestly\n\nmicro-ROS is the right tool when you need ≥2 of: parameters, services,\nmultiple topics, ROS time on the MCU, discovery in the graph, lifecycle.\n\nA plain serial protocol + a tiny host-side ROS 2 Python node is better when:\n\n| Situation | Why bridge wins |\n|-----------|-----------------|\n| 1–3 topics, fixed schema (e.g. cmd_vel in, odom + IMU out) | 200 lines total vs build system + agent + memory tuning |\n| RAM \u003C 100 KB free (small STM32F0\u002FF1, ATmega — micro-ROS won't fit at all on AVR) | rclc+rmw needs ~35 KB minimum, realistically 50–80 KB |\n| Hard-real-time control loop on the MCU | XRCE session servicing inside `rclc_executor_spin_some` adds jitter |\n| Team can't maintain a colcon\u002FESP-IDF\u002Fpico-sdk firmware build | Arduino sketch + pyserial is maintainable by anyone |\n| Flaky link (long RS-485 run, lossy radio) | you control retry\u002FCRC policy; XRCE reliable streams stall hard on loss |\n| You only need telemetry logging | rosbag the bridge node's output |\n\nReference bridge pattern (this is the whole thing — COBS-framed binary, CRC16):\n\n```python\n# host_bridge.py — ROS 2 node, ~60 lines, replaces micro-ROS for simple cases\nimport struct, serial, rclpy\nfrom rclpy.node import Node\nfrom geometry_msgs.msg import Twist\nfrom sensor_msgs.msg import Imu\nfrom cobs import cobs  # pip install cobs\n\nPKT_IMU = 0x01   # mcu->host: \u003CB 6f H> = id, ax ay az gx gy gz, crc16\nPKT_CMD = 0x10   # host->mcu: \u003CB 2f H> = id, lin_x ang_z, crc16\n\ndef crc16(data: bytes) -> int:\n    crc = 0xFFFF\n    for b in data:\n        crc ^= b\n        for _ in range(8):\n            crc = (crc >> 1) ^ 0xA001 if crc & 1 else crc >> 1\n    return crc\n\nclass Bridge(Node):\n    def __init__(self):\n        super().__init__('mcu_bridge')\n        self.ser = serial.Serial('\u002Fdev\u002FttyUSB0', 921600, timeout=0.005)\n        self.imu_pub = self.create_publisher(Imu, 'imu\u002Fdata_raw', 10)\n        self.create_subscription(Twist, 'cmd_vel', self.on_cmd, 10)\n        self.buf = bytearray()\n        self.create_timer(0.002, self.poll)         # 500 Hz poll\n\n    def on_cmd(self, msg):\n        body = struct.pack('\u003CB2f', PKT_CMD, msg.linear.x, msg.angular.z)\n        body += struct.pack('\u003CH', crc16(body))\n        self.ser.write(cobs.encode(body) + b'\\x00')\n\n    def poll(self):\n        self.buf += self.ser.read(256)\n        while b'\\x00' in self.buf:\n            frame, _, self.buf = self.buf.partition(b'\\x00')\n            try: pkt = cobs.decode(bytes(frame))\n            except Exception: continue\n            if len(pkt) \u003C 3 or crc16(pkt[:-2]) != struct.unpack('\u003CH', pkt[-2:])[0]:\n                continue\n            if pkt[0] == PKT_IMU and len(pkt) == 27:\n                ax, ay, az, gx, gy, gz = struct.unpack('\u003C6f', pkt[1:25])\n                m = Imu()\n                m.header.stamp = self.get_clock().now().to_msg()\n                m.header.frame_id = 'imu_link'\n                m.linear_acceleration.x, m.linear_acceleration.y, m.linear_acceleration.z = ax, ay, az\n                m.angular_velocity.x, m.angular_velocity.y, m.angular_velocity.z = gx, gy, gz\n                self.imu_pub.publish(m)\n\nrclpy.init(); rclpy.spin(Bridge())\n```\n\nMCU side is a matching `struct.pack` in C plus the same CRC. Done. If the spec\nlater grows services\u002Fparams, *then* migrate to micro-ROS.\n\n---\n\n## 4. Canonical client code (rclc, FreeRTOS \u002F Arduino loop)\n\nThis is the reference skeleton — publisher + subscriber + timer, with the error\nmacro discipline and message memory done correctly.\n\n```cpp\n#include \u003Cmicro_ros_platformio.h>      \u002F\u002F or \u003Cmicro_ros_arduino.h> \u002F ESP-IDF component\n#include \u003Crcl\u002Frcl.h>\n#include \u003Crclc\u002Frclc.h>\n#include \u003Crclc\u002Fexecutor.h>\n#include \u003Cstd_msgs\u002Fmsg\u002Fint32.h>\n#include \u003Cgeometry_msgs\u002Fmsg\u002Ftwist.h>\n\nrcl_publisher_t pub;\nrcl_subscription_t sub;\nrcl_timer_t timer;\nrclc_executor_t executor;\nrclc_support_t support;\nrcl_allocator_t allocator;\nrcl_node_t node;\n\nstd_msgs__msg__Int32 pub_msg;\ngeometry_msgs__msg__Twist cmd_msg;     \u002F\u002F POD message: no extra memory needed\n\n#define RCCHECK(fn) { rcl_ret_t rc = fn; if (rc != RCL_RET_OK) { error_loop(rc); } }\n#define RCSOFTCHECK(fn) { rcl_ret_t rc = fn; (void)rc; }  \u002F\u002F for periodic calls\n\nvoid error_loop(rcl_ret_t rc) {\n  \u002F\u002F DON'T just while(1). Blink + reboot so a transient agent loss self-heals.\n  for (int i = 0; i \u003C 10; i++) { digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); delay(100); }\n  ESP.restart();   \u002F\u002F Pico: watchdog_reboot(0,0,0); STM32: NVIC_SystemReset();\n}\n\nvoid cmd_cb(const void* msgin) {\n  const geometry_msgs__msg__Twist* m = (const geometry_msgs__msg__Twist*)msgin;\n  set_motor_targets(m->linear.x, m->angular.z);   \u002F\u002F keep callbacks SHORT\n}\n\nvoid timer_cb(rcl_timer_t* t, int64_t last_call_time) {\n  (void)last_call_time;\n  if (t == NULL) return;\n  pub_msg.data++;\n  RCSOFTCHECK(rcl_publish(&pub, &pub_msg, NULL));\n}\n\nvoid setup() {\n  set_microros_serial_transports(Serial);  \u002F\u002F or wifi transport, Section 2\n  delay(2000);                              \u002F\u002F let transport settle\n\n  allocator = rcl_get_default_allocator();\n  RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));\n  RCCHECK(rclc_node_init_default(&node, \"esp32_node\", \"\", &support));\n\n  RCCHECK(rclc_publisher_init_default(&pub, &node,\n      ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Int32), \"mcu\u002Fheartbeat\"));\n\n  RCCHECK(rclc_subscription_init_default(&sub, &node,\n      ROSIDL_GET_MSG_TYPE_SUPPORT(geometry_msgs, msg, Twist), \"cmd_vel\"));\n\n  RCCHECK(rclc_timer_init_default(&timer, &support,\n      RCL_MS_TO_NS(50), timer_cb));          \u002F\u002F 20 Hz publish\n\n  \u002F\u002F handles = subscriptions + timers + services + clients + guard_conditions\n  \u002F\u002F Count EXACTLY. Too few -> rclc_executor_add_* returns RCL_RET_ERROR.\n  RCCHECK(rclc_executor_init(&executor, &support.context, 2, &allocator));\n  RCCHECK(rclc_executor_add_subscription(&executor, &sub, &cmd_msg, &cmd_cb, ON_NEW_DATA));\n  RCCHECK(rclc_executor_add_timer(&executor, &timer));\n}\n\nvoid loop() {\n  \u002F\u002F 10 ms budget: services transport+executor. Do NOT block elsewhere in loop().\n  RCSOFTCHECK(rclc_executor_spin_some(&executor, RCL_MS_TO_NS(10)));\n}\n```\n\n### FreeRTOS task layout (ESP-IDF \u002F STM32+FreeRTOS)\n\nOne task owns ALL rclc\u002Frcl calls. rclc is **not thread-safe**; calling\n`rcl_publish` from a second task while the executor spins corrupts the XRCE\nsession stream.\n\n```c\n\u002F\u002F Correct pattern: other tasks push to a queue; the micro-ROS task publishes.\nvoid microros_task(void* arg) {            \u002F\u002F stack: 4096 words ESP32 (16 KB) min\n  \u002F\u002F ... init as above ...\n  sensor_sample_t s;\n  while (1) {\n    if (xQueueReceive(sensor_q, &s, 0) == pdTRUE) {\n      imu_msg.linear_acceleration.x = s.ax; \u002F* ... *\u002F\n      rcl_publish(&imu_pub, &imu_msg, NULL);\n    }\n    rclc_executor_spin_some(&executor, RCL_MS_TO_NS(5));\n    vTaskDelay(pdMS_TO_TICKS(1));           \u002F\u002F yield; never starve IDLE task\n  }\n}\n\u002F\u002F Priority: above app tasks that feed it, below hard-RT control ISR\u002Ftask.\n\u002F\u002F ESP32: pin to core 1 if WiFi (core 0) is busy: xTaskCreatePinnedToCore(..., 1);\n```\n\nStack sizing: micro-ROS task needs ≥ 8 KB on STM32, ≥ 16 KB on ESP32 (printf +\nWiFi stack frames). `uxTaskGetStackHighWaterMark` after 5 min of traffic; keep\n≥ 1 KB headroom. Stack overflow here manifests as random hard faults during\n`rcl_publish`, not at init.\n\n---\n\n## 5. Memory tuning — colcon.meta\n\nmicro-ROS statically pools all middleware entities. Defaults (varies by port,\nroughly): 1 node, 5 publishers, 5 subscribers, 5 services, 5 clients,\n512-byte streams. Exceed any pool → init returns `RCL_RET_ERROR`.\n\n`colcon.meta` (ESP-IDF component: `app-colcon.meta` in project root;\nmicro_ros_setup firmware builds: edit then **full clean rebuild** — these are\ncompile-time constants, `pio run` alone will NOT pick them up; delete\n`.pio\u002Flibdeps\u002F*\u002Fmicro_ros_platformio\u002Flibmicroros` or run\n`ros2 run micro_ros_setup build_firmware.sh` after changes):\n\n```json\n{\n  \"names\": {\n    \"rmw_microxrcedds\": {\n      \"cmake-args\": [\n        \"-DRMW_UXRCE_MAX_NODES=1\",\n        \"-DRMW_UXRCE_MAX_PUBLISHERS=4\",\n        \"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=3\",\n        \"-DRMW_UXRCE_MAX_SERVICES=1\",\n        \"-DRMW_UXRCE_MAX_CLIENTS=1\",\n        \"-DRMW_UXRCE_MAX_HISTORY=4\",\n        \"-DRMW_UXRCE_TRANSPORT=custom\",\n        \"-DRMW_UXRCE_STREAM_HISTORY=4\",\n        \"-DRMW_UXRCE_MAX_TRANSPORT_MTU=512\"\n      ]\n    },\n    \"microxrcedds_client\": {\n      \"cmake-args\": [\"-DUCLIENT_PROFILE_MULTITHREAD=OFF\"]\n    }\n  }\n}\n```\n\nSizing rules:\n\n- **RAM per entity** ≈ MTU × STREAM_HISTORY for each reliable stream, plus\n  ~1–2 KB bookkeeping per pub\u002Fsub. With MTU=512, HISTORY=4: ~2 KB per direction.\n- **MAX_TRANSPORT_MTU must exceed your largest serialized message** + ~64 B\n  overhead, OR the message gets fragmented across stream history slots. A\n  message larger than `MTU × STREAM_HISTORY` can NEVER be sent — publish\n  returns OK but nothing arrives (best-effort) or the stream stalls (reliable).\n  E.g. `sensor_msgs\u002FLaserScan` with 360 floats ≈ 1.5 KB serialized → needs\n  MTU=512, HISTORY≥4, or MTU=2048.\n- **MAX_HISTORY** is per-topic sample slots, separate from STREAM_HISTORY\n  (transport buffers). Publishing faster than the link drains with HISTORY=1\n  silently drops samples.\n- Realistic budgets: minimal node (1 pub, 1 sub, int32s) ~35 KB RAM. Typical\n  robot node (odom + imu pub, cmd_vel sub, 1 service) ~55–70 KB. LaserScan\n  publisher ~85 KB+. Pico (264 KB RAM) is comfortable; STM32F4 (128–192 KB)\n  needs the tuning above; STM32F1 (20 KB) cannot run micro-ROS — use a bridge.\n\n---\n\n## 6. QoS and rclc entity variants\n\n| rclc init call | DDS QoS | Use for |\n|---|---|---|\n| `rclc_publisher_init_default` | reliable, keep-last | state, events, services-ish data |\n| `rclc_publisher_init_best_effort` | best-effort | high-rate sensors (IMU, encoders) |\n| `rclc_subscription_init_default` | reliable | cmd topics where loss matters |\n| `rclc_subscription_init_best_effort` | best-effort | matching sensor streams |\n\nRules:\n\n- **Best-effort pub on the MCU + `ros2 topic echo` works** (echo defaults\n  compatible), but a host node subscribing reliable will get NOTHING — no\n  error, no warning on the MCU side. Check with\n  `ros2 topic info \u002Ftopic -v` (shows QoS of every endpoint).\n- High-rate sensor data: best-effort, always. Reliable streams over serial\n  retry on every dropped byte and create multi-second backlogs; the symptom is\n  \"topic was fine for 2 minutes then latency grew unbounded\".\n- Reliable publishes **block** in `rcl_publish` until acked or session timeout\n  when the stream is full. On a saturated 115200 link this freezes your loop\n  for hundreds of ms. Another reason control loops stay local.\n\n---\n\n## 7. Agent reconnection — the state machine you must write\n\nThe default examples die permanently when the agent restarts. Production\nfirmware needs this (works on all three platforms):\n\n```cpp\nenum class AgentState { WAITING, AVAILABLE, CONNECTED, DISCONNECTED };\nAgentState state = AgentState::WAITING;\n\n#define EXECUTE_EVERY_N_MS(MS, X) do { \\\n  static int64_t t = -1; \\\n  if (t == -1) t = uxr_millis(); \\\n  if (uxr_millis() - t > MS) { X; t = uxr_millis(); } } while (0)\n\nvoid loop() {\n  switch (state) {\n    case AgentState::WAITING:\n      EXECUTE_EVERY_N_MS(500,\n        state = (RMW_RET_OK == rmw_uros_ping_agent(100, 1))\n                ? AgentState::AVAILABLE : AgentState::WAITING);\n      break;\n    case AgentState::AVAILABLE:\n      state = create_entities() ? AgentState::CONNECTED : AgentState::WAITING;\n      if (state == AgentState::WAITING) destroy_entities();\n      break;\n    case AgentState::CONNECTED:\n      EXECUTE_EVERY_N_MS(2000,\n        state = (RMW_RET_OK == rmw_uros_ping_agent(100, 3))\n                ? AgentState::CONNECTED : AgentState::DISCONNECTED);\n      if (state == AgentState::CONNECTED)\n        rclc_executor_spin_some(&executor, RCL_MS_TO_NS(10));\n      break;\n    case AgentState::DISCONNECTED:\n      stop_motors();                     \u002F\u002F SAFETY: never coast on link loss\n      destroy_entities();\n      state = AgentState::WAITING;\n      break;\n  }\n}\n\nvoid destroy_entities() {\n  rmw_context_t* ctx = rcl_context_get_rmw_context(&support.context);\n  (void)rmw_uros_set_context_entity_destroy_session_timeout(ctx, 0); \u002F\u002F don't wait for acks\n  rcl_publisher_fini(&pub, &node);\n  rcl_subscription_fini(&sub, &node);\n  rcl_timer_fini(&timer);\n  rclc_executor_fini(&executor);\n  rcl_node_fini(&node);\n  rclc_support_fini(&support);\n}\n```\n\nCritical details:\n\n- `rmw_uros_ping_agent(timeout_ms, attempts)` works **before** any session\n  exists — it's the only safe pre-init probe.\n- Setting destroy-session timeout to 0 prevents `destroy_entities()` from\n  blocking ~10 s per entity when the agent is already gone.\n- **Always stop actuators on DISCONNECTED.** Also run an independent cmd_vel\n  watchdog: if no cmd received for 500 ms while CONNECTED, stop. Agent alive ≠\n  teleop node alive.\n\n---\n\n## 8. Custom and string\u002Fsequence messages — the #1 crash source\n\nrclc gives your subscription callback a message struct, but **you** own the\nstorage for any non-POD field (strings, dynamic arrays). Forgetting this is a\nguaranteed hard fault \u002F memory corruption on first message:\n\n```cpp\n\u002F\u002F WRONG — msg.data.data is NULL, first incoming string faults\nstd_msgs__msg__String msg;\nrclc_executor_add_subscription(&executor, &sub, &msg, &cb, ON_NEW_DATA);\n\n\u002F\u002F RIGHT — pre-assign capacity before adding to executor\nstd_msgs__msg__String msg;\nstatic char buf[128];\nmsg.data.data = buf;\nmsg.data.size = 0;\nmsg.data.capacity = sizeof(buf);\n```\n\nSame for sequences (e.g. `sensor_msgs\u002FJointState` on the publish side):\n\n```cpp\nsensor_msgs__msg__JointState js;\nstatic double pos[4];\nstatic rosidl_runtime_c__String name_storage[4];\nstatic char name_buf[4][16];\njs.position.data = pos; js.position.size = 4; js.position.capacity = 4;\njs.name.data = name_storage; js.name.size = 4; js.name.capacity = 4;\nfor (int i = 0; i \u003C 4; i++) {\n  js.name.data[i].data = name_buf[i];\n  js.name.data[i].capacity = 16;\n  snprintf(name_buf[i], 16, \"joint_%d\", i);\n  js.name.data[i].size = strlen(name_buf[i]);\n}\n\u002F\u002F header.frame_id is ALSO a string — assign it or publishing faults:\nstatic char frame[16] = \"base_link\";\njs.header.frame_id.data = frame; js.header.frame_id.size = 9; js.header.frame_id.capacity = 16;\n```\n\nAlternative: `micro_ros_utilities_create_message_memory()` allocates per a\n`micro_ros_utilities_memory_conf_t` (set `max_string_capacity`,\n`max_ros2_type_sequence_capacity`). Convenient, but heap-based — prefer static\nassignment on small targets.\n\n### Adding a custom message package\n\n1. Put your `my_msgs\u002F` package (with `msg\u002F*.msg`, `CMakeLists.txt`,\n   `package.xml` — standard rosidl package, **C only**, no rosidl_python) in:\n   - platformio: `extra_packages\u002F` directory next to `platformio.ini`\n   - ESP-IDF component: `components\u002Fmicro_ros_espidf_component\u002Fextra_packages\u002F`\n   - micro_ros_setup: `firmware\u002Fmcu_ws\u002F` then rebuild\n2. **Full library rebuild required** — the message gets compiled into\n   libmicroros. platformio: delete `.pio\u002Flibdeps\u002F\u003Cenv>\u002Fmicro_ros_platformio\u002Flibmicroros`.\n3. The SAME package must be built and sourced in the **agent's** workspace\n   (or any host node using it). Mismatch symptom: agent prints\n   `create_topic ... UNKNOWN topic type` or subscribers match but deserialize garbage.\n4. Type hashes must match → build host package on the same distro. Never edit\n   a .msg on one side only.\n\nPitfalls: field name `bool data` works; nested custom types must be in the same\nor an extra_packages-included package; `string\u003C=N` bounded strings save you\nfrom the capacity dance above and are strongly preferred on MCUs.\n\n---\n\n## 9. Time sync\n\nMCU epoch starts at 0 at boot. Host nodes doing TF or message_filters will\ndiscard your data (\"message too old\") unless you sync:\n\n```cpp\n\u002F\u002F After session established, then periodically (drift ~ppm of crystal):\nrmw_uros_sync_session(1000);                 \u002F\u002F timeout ms; do every ~60 s\n\n\u002F\u002F Stamping:\nint64_t ns = rmw_uros_epoch_nanos();\nmsg.header.stamp.sec = ns \u002F 1000000000LL;\nmsg.header.stamp.nanosec = ns % 1000000000LL;\n```\n\n`rmw_uros_epoch_nanos()` returns 0 if sync never ran — check\n`rmw_uros_epoch_synchronized()` first. Sync accuracy over serial: ~1 ms; over\nWiFi: ~5–20 ms (jitter). For tighter sensor fusion, timestamp at sample time\nwith MCU monotonic clock and apply the session offset, don't timestamp at\npublish time.\n\n---\n\n## 10. Debugging checklist — run in this order\n\n**Nothing in `ros2 topic list`:**\n1. Agent running, same distro as client lib? (`docker ps`, image tag)\n2. Agent `-v6`: do you see `session established`? If not → transport problem,\n   go to step 4. If yes but no `create_*` lines → client init failing on MCU.\n3. Repeated `session re-established` loops → MCU is rebooting (watch its\n   serial console on ANOTHER uart) or `error_loop` reset cycle; usually an\n   `RCCHECK` failure → check entity pool limits (Section 5) or executor handle\n   count.\n4. Serial: correct device? Baud matches both sides? `dmesg | tail` after\n   replug. Nothing else holding the port (close PlatformIO monitor — the agent\n   and a serial monitor cannot share `\u002Fdev\u002FttyUSB0`).\n5. ESP32 serial: boot log garbage corrupting framing? Move off UART0 or\n   silence console.\n6. UDP: agent started with `--net=host`? MCU and host on same subnet? Firewall\n   (`sudo ufw allow 8888\u002Fudp`)? Ping the MCU's IP.\n\n**Topics listed but `ros2 topic echo` silent:**\n7. QoS: `ros2 topic info \u002Ft -v` — best-effort pub vs reliable sub?\n8. Message larger than MTU × STREAM_HISTORY? (Section 5)\n9. ROS_DOMAIN_ID: agent inherits its environment's domain. MCU side doesn't\n   set domain — the AGENT's `ROS_DOMAIN_ID` must match your other nodes.\n   In Docker: `-e ROS_DOMAIN_ID=42`.\n\n**Subscriber callback never fires:**\n10. Executor handle count ≥ actual handles added?\n11. Message memory assigned for strings\u002Fsequences? (May also crash, Section 8)\n12. Publishing side QoS mismatch (reliable host pub → best-effort MCU sub is\n    fine; check the reverse).\n\n**Random hard faults \u002F WDT resets:**\n13. micro-ROS task stack high-water mark (Section 4).\n14. rcl calls from multiple tasks? Consolidate.\n15. ESP32: WiFi + flash writes + micro-ROS on core 0 → starvation; pin task to\n    core 1, feed the task WDT or `vTaskDelay(1)` every loop.\n16. Unassigned string capacity in a message you PUBLISH (incl. header.frame_id).\n\n**Worked for minutes, then stalled:**\n17. Reliable stream backlog on saturated link → switch sensor topics to\n    best-effort, raise baud, or lower rate.\n18. Agent restarted and firmware has no reconnection state machine (Section 7).\n\n**Init returns RCL_RET_ERROR with no detail:**\n19. Pool exhausted — count your entities vs colcon.meta, remember the clean\n    rebuild requirement.\n20. `rclc_support_init` specifically failing → no agent reachable; gate init\n    behind `rmw_uros_ping_agent`.\n\n---\n\n## 11. Build system quick reference\n\n| Stack | Best for | Library mechanism |\n|---|---|---|\n| `micro_ros_platformio` | ESP32 + Pico, fastest iteration | lib_deps; auto-builds libmicroros on first compile (needs ~5 min + python3) |\n| `micro_ros_arduino` | Arduino IDE diehards | precompiled lib; custom messages require rebuilding the static lib in Docker — painful, prefer platformio |\n| `micro_ros_espidf_component` | ESP-IDF projects, production ESP32 | git submodule in `components\u002F`; menuconfig for transport\u002Fagent IP |\n| pico-sdk + `micro_ros_raspberrypi_pico_sdk` | bare pico-sdk C | precompiled libmicroros.a + CMake |\n| STM32CubeMX + `micro_ros_stm32cubemx_utils` | STM32 + FreeRTOS | Docker-built static lib; DMA UART transport templates included — use the DMA variant, the IT variant drops bytes above 115200 |\n| `micro_ros_setup` | building agent + custom firmware in a ROS 2 ws | `ros2 run micro_ros_setup ...` scripts |\n\nHost agent without Docker:\n```bash\nsudo apt install ros-humble-micro-ros-agent   # if available, else build via micro_ros_setup\nros2 run micro_ros_agent micro_ros_agent serial --dev \u002Fdev\u002FttyUSB0 -b 921600 -v6\n```\n\nSmoke test once connected:\n```bash\nros2 node list                      # expect \u002Fesp32_node\nros2 topic hz \u002Fmcu\u002Fheartbeat        # expect ~20 Hz, steady\nros2 topic pub -r 5 \u002Fcmd_vel geometry_msgs\u002Fmsg\u002FTwist '{linear: {x: 0.1}}'\n```\n\n---\n\n## 12. Decision summary\n\n```\nNeed params\u002Fservices\u002Fmany topics\u002FROS time on MCU?\n ├─ no  → plain serial bridge (Section 3). Stop here.\n └─ yes → micro-ROS:\n     ├─ RAM ≥ 100 KB free?  no → bridge anyway.\n     ├─ Wired & deterministic needed → UART 921600 \u002F USB CDC \u002F Ethernet\n     ├─ Untethered ESP32 → WiFi UDP, control loops stay ON the MCU\n     ├─ Write colcon.meta BEFORE first build (entity counts, MTU vs biggest msg)\n     ├─ One task owns rclc; queues feed it\n     ├─ Pre-assign string\u002Fsequence memory for every message both directions\n     ├─ Implement the reconnection state machine + actuator failsafe\n     └─ Sync time before stamping headers\n```\n",{"name":5,"source":24,"license":15,"description":7,"imported_at":25,"source_path":26,"source_repository":27},"https:\u002F\u002Fgithub.com\u002Frahulbachina\u002Frobotics-skills","2026-09-20","skills\u002Fros2\u002Fmicro-ros-embedded\u002FSKILL.md","rahulbachina\u002Frobotics-skills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fembedded\u002Fmicro-ros-embedded","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill micro-ros-embedded",{"tool":40,"command":41},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill micro-ros-embedded",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill micro-ros-embedded","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fembedded\u002Fmicro-ros-embedded\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]