-
Notifications
You must be signed in to change notification settings - Fork 168
Unitree WebRTC implementation on rebased dev #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2b2ba02
standalone unitree initial sketch
leshy 7e47d88
unitree standalone sample
leshy 12ae99a
standalone test
leshy 551aa8f
kicked out go2_webrtc_connect submodule
leshy c2d6d32
added mapping
leshy e596a6a
global planner example implementation
leshy d6ce829
renamed unitree_standalone to unitree_webrtc
leshy 8d5b5ea
hooking up unitree driver
leshy 860202c
implemented motion, cleanup
leshy 2b02398
reactive callback conversion test, color changing
leshy 9fe1cfc
motion, video, lidar
leshy 2c46a40
odometry stream, low level state stream
leshy dfea736
odometry stream
leshy fb37867
removed old entry file
leshy 95f6e39
handstand function
leshy fedec2b
auto standup/standdown
leshy 01b2b09
planner integration
leshy 6f8e41c
pathing fixes
leshy 014515a
lru cache for video
leshy bcc7dae
Changed Connection to WebRTCRobot and added required methods, Changes…
spomichter e50e199
Added helper AbstractRobot
spomichter c9b5d11
Temporary implementation of continuous movement commands to webrtc
spomichter 71d7a49
Merge remote-tracking branch 'origin/dev' into test_dev
spomichter ba0484f
Temporary asyncio continuous vector move() implementation
spomichter 318b469
Re-implemented Unitree_go2 to be WebRTC only
spomichter 757c156
New webrtc only UnitreeGo2 run.py
spomichter f5bd631
tooling improvements for webrtc, multi message storage & replay
leshy 31fdfe7
webrtc cleanup, coordinate transforms, message reply helpers
leshy 737ef36
removed mock images
leshy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,9 @@ | ||
| [submodule "dimos/external/openMVS"] | ||
| path = dimos/external/openMVS | ||
| url = https://github.com/cdcseacave/openMVS.git | ||
|
|
||
| [submodule "dimos/external/vcpkg"] | ||
| path = dimos/external/vcpkg | ||
| url = https://github.com/microsoft/vcpkg.git | ||
| [submodule "dimos/robot/unitree/external/go2_webrtc_connect"] | ||
| path = dimos/robot/unitree/external/go2_webrtc_connect | ||
| url = https://github.com/spomichter/go2_webrtc_connect | ||
| [submodule "dimos/robot/unitree/external/go2_ros2_sdk"] | ||
| path = dimos/robot/unitree/external/go2_ros2_sdk | ||
| url = https://github.com/dimensionalOS/go2_ros2_sdk |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| """Abstract base class for all DIMOS robot implementations. | ||
|
|
||
| This module defines the AbstractRobot class which serves as the foundation for | ||
| all robot implementations in DIMOS, establishing a common interface regardless | ||
| of the underlying hardware or communication protocol (ROS, WebRTC, etc). | ||
| """ | ||
|
|
||
| from abc import ABC, abstractmethod | ||
| from typing import Any, Union, Optional | ||
| from reactivex.observable import Observable | ||
| import numpy as np | ||
|
|
||
|
|
||
| class AbstractRobot(ABC): | ||
| """Abstract base class for all robot implementations. | ||
|
|
||
| This class defines the minimal interface that all robot implementations | ||
| must provide, regardless of whether they use ROS, WebRTC, or other | ||
| communication protocols. | ||
| """ | ||
|
|
||
| @abstractmethod | ||
| def connect(self) -> bool: | ||
| """Establish a connection to the robot. | ||
|
|
||
| This method should handle all necessary setup to establish | ||
| communication with the robot hardware. | ||
|
|
||
| Returns: | ||
| bool: True if connection was successful, False otherwise. | ||
| """ | ||
| pass | ||
|
|
||
| @abstractmethod | ||
| def move(self, *args, **kwargs) -> bool: | ||
| """Move the robot. | ||
|
|
||
| This is a generic movement interface that should be implemented | ||
| by all robot classes. The exact parameters will depend on the | ||
| specific robot implementation. | ||
|
|
||
| Returns: | ||
| bool: True if movement command was successfully sent. | ||
| """ | ||
| pass | ||
|
|
||
| @abstractmethod | ||
| def get_video_stream(self, fps: int = 30) -> Observable: | ||
| """Get a video stream from the robot's camera. | ||
|
|
||
| Args: | ||
| fps: Frames per second for the video stream. Defaults to 30. | ||
|
|
||
| Returns: | ||
| Observable: An observable stream of video frames. | ||
| """ | ||
| pass | ||
|
|
||
| @abstractmethod | ||
| def stop(self) -> None: | ||
| """Clean up resources and stop the robot. | ||
|
|
||
| This method should handle all necessary cleanup when shutting down | ||
| the robot connection, including stopping any ongoing movements. | ||
| """ | ||
| pass |
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
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
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
Empty file.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was my test implementation for continuous move velocity control and needs to be cleaned up. TODO