Feature: go2 webrtc TwistBase adapter for control coordinator#1362
Open
Feature: go2 webrtc TwistBase adapter for control coordinator#1362
Conversation
… reported by the go2
…ubscriptiuoin fails
…onnected hardware
Contributor
Greptile SummaryAdded WebRTC-based control adapter for Unitree Go2 to enable wireless operation via
Issues found:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User: WASD Input] --> B[keyboard_teleop]
B -->|Twist| C[ControlCoordinator]
C -->|Route to adapter| D{Connection Type?}
D -->|DDS/Ethernet| E[UnitreeGo2TwistAdapter]
D -->|WebRTC/Wireless| F[UnitreeGo2WebRTCAdapter]
E -->|SDK2 DDS| G[Go2 Robot]
F -->|WebRTC| G
E -->|StandUp + FreeWalk| G
F -->|StandUp + BalanceStand| G
G -->|Odometry| F
G -->|State| E
F -->|Last commanded| C
E -->|Actual velocities| C
Last reviewed commit: 70ba52e |
dimos/robot/unitree/go2/blueprints/basic/unitree_go2_webrtc_keyboard_teleop.py
Outdated
Show resolved
Hide resolved
Contributor
Additional Comments (1)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The ControlCoordinator can only control the Unitree Go2 via the DDS-based
UnitreeGo2TwistAdapter, which requires hardwired ethernet. Most users connect wirelessly over WebRTC, so there is no way to use the coordinator's unified control interface without a physical cable.Solution
Added a new
UnitreeGo2WebRTCAdapterthat implements theTwistBaseAdapterprotocol usingUnitreeWebRTCConnectioninstead of the Unitree SDK2 DDS stack. The adapter is registered as"unitree_go2_webrtc"via the existing auto-discovery registry.Key design decisions:
read_velocities()returns last-commanded values (same pattern asFlowBaseAdapter).odom_stream()with quaternion-to-yaw conversion.StandUp→BalanceStand(api_id 1002), which activates the locomotion controller forWIRELESS_CONTROLLERjoystick commands.FreeWalk(api_id 1045) does not work for this purpose.balance_stand()convenience method toUnitreeWebRTCConnection.New files:
dimos/hardware/drive_trains/unitree_go2_webrtc/adapter.py— the adapterdimos/robot/unitree/go2/blueprints/basic/unitree_go2_webrtc_keyboard_teleop.py— keyboard teleop blueprintBreaking Changes
None
How to Test
dimos run unitree-go2-webrtc-keyboard-teleop.closes DIM-599