Skip to content
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

Remove waymo_browser utility #1951

Merged
merged 2 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Copy and pasting the git commit messages is __NOT__ enough.
- Fixed an issue where building sumo scenarios would sometimes stall.
- `VehicleIndex` no longer segfaults when attempting to `repr()` it.
### Removed
- Removed the deprecated `waymo_browser` utility.
### Security

## [1.0.11] # 2023-04-02
Expand Down
29 changes: 10 additions & 19 deletions cli/waymo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import os

import click
import tableprint as tp

from smarts.waymo import waymo_utils


@click.group(
Expand All @@ -37,26 +40,18 @@ def waymo_cli():
"tfrecord_file", type=click.Path(exists=True), metavar="<tfrecord_file>"
)
def overview(tfrecord_file: str):
from tabulate import tabulate

from smarts.waymo import waymo_utils

scenarios = waymo_utils.get_tfrecord_info(tfrecord_file)
rows = [
[k, v["timestamps"], v["vehicles"], v["pedestrians"]]
for k, v in scenarios.items()
]
print(
tabulate(
rows,
headers=[
"Scenario ID",
"Timestamps",
"Vehicles",
"Pedestrians",
],
)
)
headers = [
"Scenario ID",
"Timestamps",
"Vehicles",
"Pedestrians",
]
tp.table(rows, headers)


@waymo_cli.command(
Expand Down Expand Up @@ -84,8 +79,6 @@ def preview(
animate: bool,
label_vehicles: bool,
):
from smarts.waymo import waymo_utils

waymo_utils.plot_scenario(tfrecord_file, scenario_id, animate, label_vehicles)


Expand All @@ -104,8 +97,6 @@ def export(
scenario_id: str,
export_folder: str,
):
from smarts.waymo import waymo_utils

scenario_folder = os.path.join(export_folder, scenario_id)
if not os.path.exists(scenario_folder):
os.makedirs(scenario_folder)
Expand Down
1 change: 0 additions & 1 deletion docs/ecosystem/waymo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ To preview a scenario:

Additionally, there are some other standalone tools in the `waymo module <https://github.com/huawei-noah/SMARTS/tree/master/smarts/waymo>`_

- ``waymo_browser.py``: a text-based browser utility for exploring, visualizing, and tagging scenarios from the dataset
- ``gen_sumo_map.py``: a command-line program that converts the map from a Waymo scenario to a SUMO map

Example Scenario
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ torch =
torchvision==0.5.0
train =
tensorflow>=2.4.0
waymo =
pathos==0.2.8
tabulate>=0.8.10
opendrive =
opendrive2lanelet>=1.2.1
argoverse =
Expand Down
Loading