-
Notifications
You must be signed in to change notification settings - Fork 408
PointCloud2 Efficient Decoder #884
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
10ef16c
debugging costmapper delays
leshy c4d2074
unitree debug dash
leshy 521e715
work on costmap debugging
leshy 24939ab
costmapper latency test
leshy a707177
issue identified
leshy 1dc3c2f
new pointcloud2 backedn
leshy a6a6cd2
removed debug tests
leshy 905e8be
mypy
leshy 5d36452
fixing tests
leshy b2cd3fe
mypy
leshy 14560fa
comments cleanup
leshy a832849
fixing occupancy test in CI
leshy e7e91f1
updated pyproject to include our fixed unitree lib
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
Git LFS file not shown
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
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,58 @@ | ||
| # Copyright 2025 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| import pickle | ||
| import time | ||
|
|
||
| import pytest | ||
|
|
||
| from dimos.mapping.pointclouds.occupancy import OCCUPANCY_ALGOS | ||
| from dimos.mapping.voxels import VoxelGridMapper | ||
| from dimos.utils.cli.plot import bar | ||
| from dimos.utils.data import _get_data_dir, get_data | ||
| from dimos.utils.testing import TimedSensorReplay | ||
|
|
||
|
|
||
| @pytest.mark.tool | ||
| def test_build_map(): | ||
| mapper = VoxelGridMapper(publish_interval=-1) | ||
|
|
||
| for ts, frame in TimedSensorReplay("unitree_go2_bigoffice/lidar").iterate_duration(): | ||
| print(ts, frame) | ||
| mapper.add_frame(frame) | ||
|
|
||
| pickle_file = _get_data_dir() / "unitree_go2_bigoffice_map.pickle" | ||
| global_pcd = mapper.get_global_pointcloud2() | ||
|
|
||
| with open(pickle_file, "wb") as f: | ||
| pickle.dump(global_pcd, f) | ||
|
|
||
| mapper.stop() | ||
|
|
||
|
|
||
| def test_costmap_calc(): | ||
| path = get_data("unitree_go2_bigoffice_map.pickle") | ||
| pointcloud = pickle.loads(path.read_bytes()) | ||
|
|
||
| names = [] | ||
| times_ms = [] | ||
| for name, algo in OCCUPANCY_ALGOS.items(): | ||
| start = time.perf_counter() | ||
| result = algo(pointcloud) | ||
| elapsed = time.perf_counter() - start | ||
| names.append(name) | ||
| times_ms.append(elapsed * 1000) | ||
| print(f"{name}: {elapsed * 1000:.1f}ms - {result}") | ||
|
|
||
| bar(names, times_ms, title="Occupancy Algorithm Speed", ylabel="ms") |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.