Skip to content

Add connection and teleop support for Booster T1#2842

Open
lichenbo wants to merge 1 commit into
dimensionalOS:mainfrom
lichenbo:main
Open

Add connection and teleop support for Booster T1#2842
lichenbo wants to merge 1 commit into
dimensionalOS:mainfrom
lichenbo:main

Conversation

@lichenbo

Copy link
Copy Markdown

Problem

dimOS does not currently provide a native locomotion connection or teleoperation blueprint for the Booster T1. This prevents Booster velocity commands from being sent through the standard dimOS cmd_vel stream.

Closes DIM-1050

Solution

Add native Booster B1 locomotion and keyboard teleoperation support:

  • Wrap the Booster C++ SDK in a dimOS NativeModule.
  • Pin and build the SDK reproducibly with Nix and CMake.
  • Add the discoverable booster-b1-keyboard-teleop blueprint.
  • Limit velocity commands to 0.2 m/s in X/Y and 1.0 rad/s in yaw.
  • Add a 0.25-second command watchdog that stops the robot when commands expire.
  • Send a final zero-velocity command and request damping mode during shutdown.
  • Add tests covering build configuration, stream wiring, and blueprint registration.

The native C++ integration avoids requiring the Booster Python SDK.

How to Test

Run on a Booster B1 connected through the selected network interface:

ROBOT_INTERFACE=<interface> dimos run booster-b1-keyboard-teleop

Run the automated tests:
uv run pytest dimos/robot/booster/b1/test_connection.py -v
Hardware locomotion is not exercised by the automated tests.

@lichenbo lichenbo marked this pull request as ready for review July 10, 2026 22:53
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds native Booster B1 locomotion and keyboard teleop support. The main changes are:

  • New Booster B1 blueprint and registry entries.
  • Python NativeModule wrapper for the native driver.
  • C++ SDK driver with command clipping, watchdog stop, and shutdown handling.
  • Nix and CMake build files for the native binary.
  • Tests for config, build wiring, stream wiring, and blueprint discovery.

Confidence Score: 4/5

The teleop path needs a fix before merging.

  • The native driver only leaves prepare mode after a positive X command.
  • Valid turn, strafe, reverse, and stop commands can be dropped before locomotion starts.
  • The build and registration changes otherwise look consistent with the inspected diff.

dimos/robot/booster/b1/cpp/main.cpp

Important Files Changed

Filename Overview
dimos/robot/all_blueprints.py Adds discoverability entries for the Booster B1 teleop blueprint and connection module.
dimos/robot/booster/b1/blueprints/basic/booster_b1_keyboard_teleop.py Adds the keyboard teleop blueprint that wires KeyboardTeleop to the Booster connection.
dimos/robot/booster/b1/connection.py Adds the Python native-module wrapper and runtime configuration for the Booster driver.
dimos/robot/booster/b1/cpp/main.cpp Adds the native Booster driver, including mode changes, command handling, watchdog stop, and shutdown cleanup.
dimos/robot/booster/b1/cpp/CMakeLists.txt Adds the CMake target for the native Booster driver and SDK linkage.
dimos/robot/booster/b1/cpp/flake.nix Adds a Nix build that packages the Booster SDK and native driver for supported Linux targets.
dimos/robot/booster/b1/README.md Documents build and runtime usage for the Booster B1 connection.
dimos/robot/booster/b1/test_connection.py Adds tests for the wrapper config, build file assumptions, stream wiring, and blueprint registration.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[KeyboardTeleop publishes cmd_vel] --> B[Native LCM cmd_vel handler]
    B --> C{Walking mode enabled?}
    C -- No --> D{vx > 0?}
    D -- Yes --> E[Switch to walking]
    D -- No --> F[Drop command]
    C -- Yes --> G[Send clipped Move command]
    G --> H[Watchdog sends zero after timeout]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[KeyboardTeleop publishes cmd_vel] --> B[Native LCM cmd_vel handler]
    B --> C{Walking mode enabled?}
    C -- No --> D{vx > 0?}
    D -- Yes --> E[Switch to walking]
    D -- No --> F[Drop command]
    C -- Yes --> G[Send clipped Move command]
    G --> H[Watchdog sends zero after timeout]
Loading

Reviews (1): Last reviewed commit: "Add connection and teleop support for Bo..." | Re-trigger Greptile

Comment thread dimos/robot/booster/b1/cpp/main.cpp
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.53086% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/robot/booster/b1/connection.py 91.30% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #2842      +/-   ##
==========================================
- Coverage   72.21%   71.93%   -0.29%     
==========================================
  Files        1001     1004       +3     
  Lines       89755    89836      +81     
  Branches     8196     8197       +1     
==========================================
- Hits        64818    64623     -195     
- Misses      22718    23014     +296     
+ Partials     2219     2199      -20     
Flag Coverage Δ
OS-ubuntu-24.04-arm 65.13% <97.53%> (+0.03%) ⬆️
OS-ubuntu-latest 67.52% <97.53%> (+0.02%) ⬆️
Py-3.10 67.51% <97.53%> (+0.02%) ⬆️
Py-3.11 67.52% <97.53%> (+0.02%) ⬆️
Py-3.12 67.52% <97.53%> (+0.03%) ⬆️
Py-3.13 67.52% <97.53%> (+0.02%) ⬆️
Py-3.14 67.53% <97.53%> (+0.02%) ⬆️
Py-3.14t 67.51% <97.53%> (+0.02%) ⬆️
SelfHosted-macOS ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/robot/all_blueprints.py 100.00% <ø> (ø)
.../b1/blueprints/basic/booster_b1_keyboard_teleop.py 100.00% <100.00%> (ø)
dimos/robot/booster/b1/test_connection.py 100.00% <100.00%> (ø)
dimos/robot/booster/b1/connection.py 91.30% <91.30%> (ø)

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant