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

Waymo tools and offline dataset extraction #1545

Merged
merged 22 commits into from
Aug 9, 2022
Merged

Conversation

saulfield
Copy link
Contributor

@saulfield saulfield commented Aug 3, 2022

This PR supersedes #1541 and #1461.

Changes

  • Add waymo commands to scl to:
    • Display information about all the scenarios within a TFRecord file
    • Plot the map, and optionally show vehicles with their IDs or animate their trajectories
    • Export a scenario to a SMARTS scenario that can be replayed
  • Update the traffic_histories_to_observations.py example to work with any traffic history format (e.g. NGSIM, Waymo), and to output the full Observation structure and set of birds-eye-view images (e.g. for use in offline RL)
  • Updates to traffic_histories_vehicle_replacement.py to make it compatible with the new data format

Copy link
Collaborator

@Gamenot Gamenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments but I think this can go in. Good work.

@Adaickalavan
Copy link
Member

  1. TRAJECTORY_HANDLES and MAP_HANDLES appear to be the same in waymo_browser.py and waymo_utils.py. Can they be combined?

  2. Several functions appear similar between waymo_browser.py and waymo_utils.py, e.g., _plot_trajectories, _get_map_features, _plot_map_features. Can they be combined?

  3. Can the gen_smarts_scenario_code function in waymo_utils.py and smarts/waymo/templates/scenario_template.py be combined?

Co-authored-by: Tucker Alban <montgomery.alban@huawei.com>
@saulfield
Copy link
Contributor Author

  1. TRAJECTORY_HANDLES and MAP_HANDLES appear to be the same in waymo_browser.py and waymo_utils.py. Can they be combined?

    1. Several functions appear similar between waymo_browser.py and waymo_utils.py, e.g., _plot_trajectories, _get_map_features, _plot_map_features. Can they be combined?

    2. Can the gen_smarts_scenario_code function in waymo_utils.py and smarts/waymo/templates/scenario_template.py be combined?

Thanks @Adaickalavan -- I've implemented all of these suggestions except for the 2nd one, since they are different enough in each tool and I don't think it's worth unifying them at this time. Perhaps in the future though.

@saulfield saulfield changed the base branch from comp-1 to develop August 9, 2022 18:50
@saulfield saulfield changed the base branch from develop to comp-1 August 9, 2022 19:27
@saulfield saulfield merged commit f2354be into comp-1 Aug 9, 2022
@saulfield saulfield deleted the saul/waymo-utils branch August 9, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants