UNITREE SDK2 · CYCLONEDDS · ROS 2 JAZZY · FIELD TROUBLESHOOTING

Unitree SDK2 & ROS 2 Jazzy Troubleshooting: Fixing G1 sport_lease Stalls, CycloneDDS 100s Ghost Leases, and CMake Builds

Use the first failing signal to choose the fix. If G1 EDU+ telemetry and FSM queries work while accepted locomotion requests leave the FSM unchanged, investigate firmware control authority. If state streams stall ~100 seconds after a subscriber drops, investigate DDS participant expiry. If Python crashes on exit, inspect channel teardown. If Jazzy fails before startup, inspect the ROS underlay and Cyclone DDS linking.

Unitree Go2 EDU and G1 EDU SDK2 ROS 2 Jazzy troubleshooting

Direct Answer: Four Distinct Upstream Failure Modes

Each symptom maps to a separate upstream record: SDK2 Python issue #170 · PR #190 · issue #197 · unitree_ros2 PR #29. Isolate which layer failed before modifying DDS leases or CMake prefixes.

1. What the Upstream Records Establish

GitHub RecordVerified Status & RevisionTechnical Finding
unitree_sdk2_python issue #170, Jul 6 Open. Revision 37116c52. On G1 EDU+ 29-DoF (software 1.5.3), rt/lowstate, arm teleop, and loco queries worked. SetFsmId(500) returned 0 while FSM readback stayed 802 and SetVelocity produced no motion; lease-enabled test reported 3102 (RPC_ERR_CLIENT_SEND) on sport_lease.
unitree_sdk2_python PR #190, Oct 15 Open against master. Lease commit cd47a98b; head e43c50fd. Edits channel_config.py and channel.py to set 500 ms lease in both channel templates, later adding multi-interface support and SPDP multicast with ParticipantIndex=none. Two-file diff.
unitree_sdk2_python issue #197, Nov 6 Open. Revision 814556d1. Teardown race between native listener callbacks and Python GC in channel.py. Demonstrated workaround: explicit Close() on every initialized ChannelPublisher and ChannelSubscriber.
unitree_ros2 PR #29, Nov 16 Open against master. Pin 48f5b9629df9ef37c3ad5a79e4a6cc85df23ad58. Proposes native ROS 2 Jazzy on Ubuntu 24.04 alongside Humble on Ubuntu 22.04 across docs/jazzy.md, scripts/setup_env.bash, example/src/CMakeLists.txt, and unitree_{api,go,hg} packages. Changed files.

2. Diagnose a G1 sport_lease Stall

Record model, firmware, SDK revision, wired NIC, DDS domain, service name, API versions, RPC return code, and observed state. In g1_loco_client.py, GetFsmId() returns an FSM state while SetFsmId() and SetVelocity() return RPC status codes — and the stock constructor initializes its base client with lease handling disabled. Note that GetFsmId() itself transmits an RPC; use a read-only telemetry subscriber when bench policy allows observation only.

SignalWhat to Check NextAction
No telemetry and no firmware endpoints in discoveryWired NIC, IPv4 config, DDS domain, loaded Cyclone XML.Fix endpoint visibility before interpreting RPC status codes.
Topic visible but no samples arriveOffered DDS type, reliability, durability, and writer identity.Match firmware type and QoS, then verify fresh samples from that writer.
Telemetry & queries work, setter returns 0 but FSM stays unchangedFirmware build, active mode, service ownership, request/readback timestamps.Preserve trace and verify supported mode handover for that trim/firmware.
sport_lease returns 3102 while loco queries succeedCheck for matching lease reader and which client path sent the RPC.Treat as client-side send failure; confirm lease service exists before editing logic.
State stream stalls after link loss or abrupt client exitCompare old/new participant GUIDs, advertised lease, and time to sustained samples.Benchmark discovery lease on an isolated network against a clean baseline.
Python segfaults on channel cleanup or exitVerify every initialized channel executes Close() before GC.Wrap channels in try/finally and log any remaining native crash separately.

Issue #170 comments also describe FSM 501 trials including rocking while standing — treat that as firmware support evidence and run any locomotion trial strictly under approved physical safety procedures.

3. Diagnose the Cyclone DDS 100-Second Recovery Window

sport_lease governs control authority, whereas Discovery/LeaseDuration governs how long DDS peers retain a participant after its last liveliness announcement. PR #190's author reports stale-reader delays on Go2, B2, and As2 and sub-second recovery with a 500 ms lease — verify on your exact network because shorter leases reduce tolerance for packet loss and scheduler jitter.

# Apply to a new plain Cyclone DDS test process in a disposable shell.
export CYCLONEDDS_URI='<CycloneDDS xmlns="https://cdds.io/config">
  <Domain Id="any">
    <General>
      <Interfaces><NetworkInterface name="lo"/></Interfaces>
      <AllowMulticast>false</AllowMulticast>
    </General>
    <Discovery>
      <ParticipantIndex>auto</ParticipantIndex>
      <Peers><Peer Address="127.0.0.1"/></Peers>
      <LeaseDuration>500 ms</LeaseDuration>
    </Discovery>
  </Domain>
</CycloneDDS>'

For issue #197, guard each initialized subscriber/publisher with try/finally, stop worker threads cleanly, and invoke explicit Close() before exit. Verify lease expiry and teardown independently.

Resolve G1 sport_lease, CycloneDDS & ROS 2 Jazzy Bring-Up Faster

Work directly with GUMA's bilingual Unitree SDK2 engineers on firmware handover traces, DDS discovery tuning, and Humble/Jazzy workspace builds. 15-second RFQ form · Written engineering scope within 1 business day.

4. Build and Inspect Native ROS 2 Jazzy (Ubuntu 24.04)

PR #29 pin 48f5b962 builds unitree_api, unitree_go, unitree_hg, examples, and the regression package using Ubuntu 24.04 Jazzy's native rmw_cyclonedds_cpp (requiring ros-jazzy-rosidl-generator-dds-idl). The PR reports native Jazzy amd64/arm64 CI and a supervised Go2 read-only telemetry run (/lowstate ~483 Hz, /lf/sportmodestate ~20 Hz). Run in a fresh disposable checkout:

(
  set -e
  expected=48f5b9629df9ef37c3ad5a79e4a6cc85df23ad58
  test "$(git rev-parse HEAD)" = "$expected"
  source /opt/ros/jazzy/setup.bash
  test "$ROS_DISTRO" = jazzy

  colcon build --executor sequential --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo

  export UNITREE_ROS_WS="$PWD"
  export ROS_DOMAIN_ID=173
  source ./setup_local.sh jazzy
  colcon test --packages-select unitree_ros2_test --executor sequential \
    --event-handlers console_direct+ --return-code-on-test-failure
  colcon test-result --test-result-base build/unitree_ros2_test --all --verbose
)
Build or Runtime SymptomInspectAction
find_package cannot locate a ROS or Unitree packageROS_DISTRO, AMENT_PREFIX_PATH, CMAKE_PREFIX_PATH, first failing package.xml dep.Resolve dependencies in the chosen distro and build interfaces + examples in one clean workspace.
CMake resolves unexpected Cyclone DDS installationSearch CMakeCache.txt for CycloneDDS_DIR vs. intended underlay.Reconfigure in a clean build tree with a single underlay and no legacy prefix.
Binary starts but libddsc symbols differ from buildreadelf -d (NEEDED/RUNPATH) and /proc/<pid>/maps.Qualify runtime resolution against distro Cyclone DDS; isolate separately pinned test peers.
ROS graph lists topic but telemetry is emptyros2 topic info -v for DDS type, domain, and offered QoS.Match unitree_go vs. unitree_hg type and compatible best-effort QoS.
API request times out during link recoveryInspect request_client.hpp and ut_errror.hpp for pre-send vs. post-publication status.Confirm robot state before retrying any post-publication motion request.

Read One Telemetry Sample Without Issuing a Robot Command

Set ROBOT_IF, FIRMWARE_DOMAIN, and STATE_TYPE (unitree_go/msg/LowState for Go2; unitree_hg/msg/LowState for G1 HG). These commands subscribe read-only and issue zero Unitree control requests:

(
  set -e
  : "${ROBOT_IF:?Set ROBOT_IF to the wired robot interface}"
  : "${FIRMWARE_DOMAIN:?Set FIRMWARE_DOMAIN for the robot}"
  : "${STATE_TYPE:?Set STATE_TYPE to the observed LowState interface}"

  ip -br addr show dev "$ROBOT_IF"
  export UNITREE_ROS_WS="$PWD"
  export ROS_DOMAIN_ID="$FIRMWARE_DOMAIN"
  source ./setup.sh "$ROBOT_IF" jazzy

  timeout 10s ros2 topic info /lowstate -v --no-daemon
  timeout 10s ros2 topic echo /lowstate "$STATE_TYPE" --once \
    --qos-reliability best_effort --qos-durability volatile
)

5. Physical Bench Acceptance Record (Honest PENDING Gate)

Physical Bench CheckStatusEvidence to Attach
G1 EDU+ 1.5.3 telemetry baselinePENDINGFirmware and interface records, discovered writer identity, QoS, and sustained state samples.
G1 sport_lease and control authorityPENDINGFirmware-specific handover guidance and supervised evidence of request outcome and FSM readback.
Go2 EDU native Jazzy telemetryPENDINGGUMA bench capture with separate sample rates and writer identities for both measured state topics.
B2 or As2 discovery recoveryPENDINGPer-model participant GUID timeline, baseline vs. candidate leases, time to sustained samples, flap counts.
Python subscriber shutdown on robot networkPENDINGRepeated controlled exits, explicit Close() receipts, exit codes, and reconnect recovery.
Operator stop and command acceptancePENDINGSigned record of separately approved control tests, observed behavior, and operator stop/handback results.

6. Frequently Asked Questions

Does shortening the Cyclone DDS lease fix the G1 sport_lease error?

No. Discovery/LeaseDuration controls DDS participant expiry after unclean disconnects, whereas G1 sport_lease requires separate verification of firmware services and locomotion authority.

Does SDK return code 0 prove the G1 moved?

No. Verify status code, FSM readback, and observed physical state together — in issue #170, the setter returned 0 while FSM readback remained 802 and the robot did not walk.

Can I use native ROS 2 Jazzy without a Humble bridge?

PR #29 proposes direct Jazzy with rmw_cyclonedds_cpp on Ubuntu 24.04 (author-reported CI, software DDS tests, and read-only Go2 telemetry). Qualify your exact firmware and command workflows separately.

How do I avoid the Python channel shutdown crash?

Call explicit Close() on every initialized publisher and subscriber inside a try/finally block before dropping references or exiting, as demonstrated in issue #197.

GUMA Engineering Resources & Quickstart Baseline

Compare Unitree G1 EDU and Unitree Go2 EDU, review our Go2 & B2 ROS 2 and DDS integration guide, or inspect GUMA's unitree-g1-ros2-isaaclab-quickstart bridge bring-up baseline alongside the native Jazzy candidate.

Get a Genuine Unitree Hardware Quote with 1-on-1 SDK2 Onboarding

Share your robot trim, firmware, host OS, ROS distribution, and first failing signal for a written hardware and engineering scope. 15-second RFQ form · Written engineering scope within 1 business day.