-
Notifications
You must be signed in to change notification settings - Fork 611
go2 mem2 recorder fixes, misc fixes, new recording #2109
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: main
Are you sure you want to change the base?
Changes from all commits
7d6647a
2d23355
268799e
e563cfb
4bda2cd
5730f3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,11 +37,11 @@ | |
| def _resolve_type(type_name: str) -> type: | ||
| for module_name in _modules_to_try: | ||
| try: | ||
| module = importlib.import_module(module_name) | ||
| if hasattr(module, type_name): | ||
| return getattr(module, type_name) # type: ignore[no-any-return] | ||
| module = importlib.import_module(f"{module_name}.{type_name}") | ||
| except ImportError: | ||
| continue | ||
| if hasattr(module, type_name): | ||
| return getattr(module, type_name) # type: ignore[no-any-return] | ||
|
Comment on lines
37
to
+44
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The old code imported the package (e.g. |
||
|
|
||
| raise ValueError(f"Could not find type '{type_name}' in any known message modules") | ||
|
|
||
|
|
@@ -81,7 +81,7 @@ def _on_message(msg: object) -> None: | |
| def on_msg(channel: str, data: bytes) -> None: | ||
| _, msg_name = channel.split("#", 1) # e.g. "nav_msgs.Odometry" | ||
| pkg, cls_name = msg_name.split(".", 1) # "nav_msgs", "Odometry" | ||
| module = importlib.import_module(f"dimos.msgs.{pkg}") | ||
| module = importlib.import_module(f"dimos.msgs.{pkg}.{cls_name}") | ||
| cls = getattr(module, cls_name) | ||
| print(cls.lcm_decode(data)) | ||
|
|
||
|
|
||
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.
tswas previously computed asgetattr(msg, "ts", None) or time.time()and passed through to both the tf lookup andstream.append. It is still used for the tf lookup on line 309, butstream.appendnow always receivestime.time(). Any message that carries its own hardware or protocol timestamp will be stored in the stream under the wall-clock arrival time instead of the message's ownts. For replayed or sensor-timestamped data this will cause the recording index to disagree with the pose timestamps that were resolved against the message's originalts.