-
Notifications
You must be signed in to change notification settings - Fork 10
Import Fix & Optimize: G1 without ROS, lazy imports, Fix bad dir naming #1221
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
base: dev
Are you sure you want to change the base?
Conversation
|
Too many files changed for review. ( |
| @@ -0,0 +1,11 @@ | |||
| from __future__ import annotations | |||
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 file just helps with typing
| model.update_intrinsic([1.0, 2.0]) # Only 2 values | ||
|
|
||
|
|
||
| @pytest.mark.cuda |
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 is part of: #1220 which I expect/hope will get merged before anyone even sees this comment
| R = TypeVar("R") | ||
|
|
||
|
|
||
| def rpc(fn: Callable[P, R]) -> Callable[P, R]: |
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.
make mypy happy and properly carry over arg/return typing
| # Run the blueprint | ||
| blueprint.build().loop() | ||
| if __name__ == "__main__": | ||
| blueprint.build().loop() |
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.
without this change, the example code does not work!! (its broken on dev!)
ca8396a to
300e6d5
Compare
| @@ -0,0 +1,84 @@ | |||
| #!/usr/bin/env python3 | |||
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.
typo in file name uintree
| from dimos.robot.foxglove_bridge import foxglove_bridge | ||
| from dimos.web.websocket_vis.websocket_vis_module import websocket_vis | ||
|
|
||
| uintree_g1_primitive_no_nav = ( |
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.
typo here too
| def __repr__(self) -> str: | ||
| """Return a string representation of the TList using Timeseries repr method.""" | ||
| return Timeseries.__repr__(self) | ||
| from dimos.robot.unitree.type.timeseries import * # noqa: F403 |
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.
Just import each individually Don't use * because it kills the ability of the linter to check for bad names.
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.
In general I agree, I actually wish python would deprecate import *, but for a shim thats supposed to be deleted anyways (as soon as pickle file gets rerecorded) I thought it would be fine.
Test with:
bin/pytest-slow(no added functionality)Performance Improvements
BEFORE
AFTER
New Dir Structure:
robots/unitree/<robot name>/<stuff for robot>robots/unitree/<robot name>/blueprints/robots/unitree_webrtcdir*