├── LICENSE ├── README.md ├── __init__.py ├── data_generation ├── data_process.py ├── data_process.sh └── utils.py ├── env_arm.sh ├── environment.yml ├── environment_all.yaml ├── export_onnx.py ├── gameformer ├── __init__.py ├── adapter.py ├── bezier_path.py ├── common_utils.py ├── cubic_spline_planner.py ├── data_utils.py ├── obs_adapter.py ├── path_planner.py ├── planner.py ├── planner_utils.py ├── predictor.py ├── predictor_adapter.py ├── predictor_modules.py ├── predictor_modules_adapter.py ├── script │ ├── __init__.py │ └── planner │ │ └── gameformer_planner.yaml ├── smoother.py ├── speed_planner.py ├── state_lattice_planner.py └── train_utils.py ├── llama2 ├── __init__.py ├── ds_config.json ├── mapping.py ├── metric.py ├── model.py ├── model_llama4drive.py ├── planner │ ├── __init__.py │ ├── llama4drive.py │ ├── llama4drive_planner.py │ └── script │ │ └── __init__.py ├── sft_llama2_trainer.py ├── sft_llama4drive_trainer.py ├── trainer.py ├── trt_infer_singleton.py └── utils │ ├── common_utils.py │ └── data_utils.py ├── nuplan ├── BUILD ├── __init__.py ├── cli │ ├── BUILD │ ├── __init__.py │ ├── db_cli.py │ ├── nuplan_cli.py │ └── test │ │ ├── BUILD │ │ ├── __init__.py │ │ └── test_nuplan_cli.py ├── common │ ├── __init__.py │ ├── actor_state │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── agent.py │ │ ├── agent_state.py │ │ ├── agent_temporal_state.py │ │ ├── car_footprint.py │ │ ├── dynamic_car_state.py │ │ ├── ego_state.py │ │ ├── ego_temporal_state.py │ │ ├── oriented_box.py │ │ ├── scene_object.py │ │ ├── state_representation.py │ │ ├── static_object.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_actor_temporal_state.py │ │ │ ├── test_agent.py │ │ │ ├── test_car_footprint.py │ │ │ ├── test_dynamic_car_state.py │ │ │ ├── test_ego_state.py │ │ │ ├── test_oriented_box.py │ │ │ ├── test_scene_object.py │ │ │ ├── test_state_representation.py │ │ │ ├── test_tracked_objects.py │ │ │ ├── test_utils.py │ │ │ └── test_waypoint.py │ │ ├── tracked_objects.py │ │ ├── tracked_objects_types.py │ │ ├── transform_state.py │ │ ├── vehicle_parameters.py │ │ └── waypoint.py │ ├── geometry │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── compute.py │ │ ├── convert.py │ │ ├── interpolate_state.py │ │ ├── interpolate_tracked_object.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── json │ │ │ │ └── interpolate_future.json │ │ │ ├── test_compute.py │ │ │ ├── test_convert.py │ │ │ ├── test_interpolate_tracked_object.py │ │ │ ├── test_torch_geometry.py │ │ │ └── test_transform.py │ │ ├── torch_geometry.py │ │ └── transform.py │ ├── maps │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── abstract_map.py │ │ ├── abstract_map_factory.py │ │ ├── abstract_map_objects.py │ │ ├── map_manager.py │ │ ├── maps_datatypes.py │ │ ├── nuplan_map │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── intersection.py │ │ │ ├── lane.py │ │ │ ├── lane_connector.py │ │ │ ├── map_factory.py │ │ │ ├── nuplan_map.py │ │ │ ├── polygon_map_object.py │ │ │ ├── polyline_map_object.py │ │ │ ├── roadblock.py │ │ │ ├── roadblock_connector.py │ │ │ ├── stop_line.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── json │ │ │ │ │ ├── baseline │ │ │ │ │ │ ├── baseline_in_intersection.json │ │ │ │ │ │ ├── baseline_in_lane.json │ │ │ │ │ │ └── no_baseline.json │ │ │ │ │ ├── connections │ │ │ │ │ │ ├── no_end_connection.json │ │ │ │ │ │ └── no_start_connection.json │ │ │ │ │ ├── crosswalks │ │ │ │ │ │ ├── nearby.json │ │ │ │ │ │ └── on_crosswalk.json │ │ │ │ │ ├── get_nearest │ │ │ │ │ │ ├── lane.json │ │ │ │ │ │ └── lane_connector.json │ │ │ │ │ ├── intersections │ │ │ │ │ │ ├── nearby.json │ │ │ │ │ │ ├── on_intersection.json │ │ │ │ │ │ ├── on_intersection_with_no_stop_lines.json │ │ │ │ │ │ └── on_intersection_with_stop_lines.json │ │ │ │ │ ├── lanes │ │ │ │ │ │ ├── get_adjacent_lanes.json │ │ │ │ │ │ ├── lane_index.json │ │ │ │ │ │ ├── lane_is_left_of.json │ │ │ │ │ │ ├── lanes_are_adjacent.json │ │ │ │ │ │ └── lanes_in_same_roadblock.json │ │ │ │ │ ├── neighboring │ │ │ │ │ │ └── all_map_objects.json │ │ │ │ │ └── stop_lines │ │ │ │ │ │ ├── nearby.json │ │ │ │ │ │ └── on_stopline.json │ │ │ │ ├── test_baseline_path.py │ │ │ │ ├── test_intersection.py │ │ │ │ ├── test_lane.py │ │ │ │ ├── test_lane_connector.py │ │ │ │ ├── test_nuplan_map.py │ │ │ │ ├── test_polygon_map_object.py │ │ │ │ ├── test_roadblock.py │ │ │ │ ├── test_roadblock_connector.py │ │ │ │ ├── test_stop_line.py │ │ │ │ └── test_utils.py │ │ │ └── utils.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_map_manager.py │ │ └── test_utils.py │ └── utils │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── distributed_scenario_filter.py │ │ ├── file_backed_barrier.py │ │ ├── helpers.py │ │ ├── interpolatable_state.py │ │ ├── io_utils.py │ │ ├── s3_utils.py │ │ ├── split_state.py │ │ ├── test │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── patch_test_methods.py │ │ ├── test_distributed_scenario_filter.py │ │ ├── test_file_backed_barrier.py │ │ ├── test_function_validation.py │ │ ├── test_helpers.py │ │ ├── test_interface_validation.py │ │ ├── test_io_utils.py │ │ ├── test_patch.py │ │ ├── test_s3_utils.py │ │ └── test_torch_math.py │ │ ├── test_utils │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── function_validation.py │ │ ├── instances.py │ │ ├── interface_validation.py │ │ ├── mock_s3_utils.py │ │ ├── nuplan_test.py │ │ ├── patch.py │ │ └── plugin.py │ │ └── torch_math.py ├── database │ ├── BUILD │ ├── __init__.py │ ├── common │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── blob_store │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── blob_store.py │ │ │ ├── cache_store.py │ │ │ ├── creator.py │ │ │ ├── http_store.py │ │ │ ├── local_store.py │ │ │ ├── s3_store.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── mock_s3_store.py │ │ ├── data_types.py │ │ ├── db.py │ │ ├── sql_types.py │ │ ├── templates.py │ │ └── utils.py │ ├── maps_db │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── gpkg_mapsdb.py │ │ ├── imapsdb.py │ │ ├── layer.py │ │ ├── layer_dataset_ops.py │ │ ├── map_api.py │ │ ├── map_explorer.py │ │ ├── metadata.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_layer.py │ │ │ ├── test_map_api.py │ │ │ └── test_map_explorer.py │ │ └── utils.py │ ├── nuplan_db │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── camera.py │ │ ├── db_cli_queries.py │ │ ├── db_description_types.py │ │ ├── image.py │ │ ├── lidar_pc.py │ │ ├── nuplan_db_utils.py │ │ ├── nuplan_scenario_queries.py │ │ ├── query_session.py │ │ ├── sensor_data_table_row.py │ │ └── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── minimal_db_test_utils.py │ │ │ ├── test_db_cli_queries.py │ │ │ ├── test_nuplan_db_utils.py │ │ │ └── test_nuplan_scenario_queries.py │ ├── nuplan_db_orm │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── camera.py │ │ ├── category.py │ │ ├── database_utils.py │ │ ├── ego_pose.py │ │ ├── frame.py │ │ ├── image.py │ │ ├── lidar.py │ │ ├── lidar_box.py │ │ ├── lidar_pc.py │ │ ├── log.py │ │ ├── make_readme.py │ │ ├── models.py │ │ ├── nuplandb.py │ │ ├── nuplandb_wrapper.py │ │ ├── prediction_construction.py │ │ ├── rendering_utils.py │ │ ├── scenario_tag.py │ │ ├── scene.py │ │ ├── splitters.py │ │ ├── templates.py │ │ ├── tests │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_camera.py │ │ │ ├── test_category.py │ │ │ ├── test_ego_pose.py │ │ │ ├── test_image.py │ │ │ ├── test_lidar.py │ │ │ ├── test_lidar_box.py │ │ │ ├── test_lidar_pc.py │ │ │ ├── test_log.py │ │ │ ├── test_nuplandb.py │ │ │ ├── test_nuplandb_wrapper.py │ │ │ ├── test_prediction_construction.py │ │ │ ├── test_render.py │ │ │ ├── test_scenario_tag.py │ │ │ ├── test_scene.py │ │ │ ├── test_track.py │ │ │ ├── test_traffic_light_status.py │ │ │ ├── test_utils.py │ │ │ └── test_vector_map_np.py │ │ ├── track.py │ │ ├── traffic_light_status.py │ │ ├── utils.py │ │ └── vector_map_np.py │ ├── tests │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── test_nuplan.py │ │ └── test_utils_nuplan_db.py │ └── utils │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── boxes │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── box.py │ │ ├── box3d.py │ │ └── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_box3d.py │ │ ├── geometry.py │ │ ├── image.py │ │ ├── iterable_lidar_box.py │ │ ├── label │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── label.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_label.py │ │ │ └── test_utils.py │ │ └── utils.py │ │ ├── measure.py │ │ ├── plot.py │ │ ├── pointclouds │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── lidar.py │ │ ├── pointcloud.py │ │ └── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_lidar.py │ │ ├── test │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── test_geometry.py │ │ ├── test_image.py │ │ ├── test_iterable_lidar_box.py │ │ ├── test_measure.py │ │ └── test_plot.py │ │ └── tests │ │ └── __init__.py ├── entrypoint_result_processor.sh ├── entrypoint_simulation.sh ├── entrypoint_submission.sh ├── planning │ ├── BUILD │ ├── __init__.py │ ├── metrics │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── abstract_metric.py │ │ ├── aggregator │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_metric_aggregator.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── mock_abstract_metric_aggregator.py │ │ │ │ └── test_weighted_average_metric_aggregator.py │ │ │ └── weighted_average_metric_aggregator.py │ │ ├── evaluation_metrics │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── base │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── metric_base.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_violation_metric_base.py │ │ │ │ │ └── test_within_bound_metric_base.py │ │ │ │ ├── violation_metric_base.py │ │ │ │ └── within_bound_metric_base.py │ │ │ ├── common │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── drivable_area_compliance.py │ │ │ │ ├── driving_direction_compliance.py │ │ │ │ ├── ego_acceleration.py │ │ │ │ ├── ego_expert_l2_error.py │ │ │ │ ├── ego_expert_l2_error_with_yaw.py │ │ │ │ ├── ego_is_comfortable.py │ │ │ │ ├── ego_is_making_progress.py │ │ │ │ ├── ego_jerk.py │ │ │ │ ├── ego_lane_change.py │ │ │ │ ├── ego_lat_acceleration.py │ │ │ │ ├── ego_lat_jerk.py │ │ │ │ ├── ego_lon_acceleration.py │ │ │ │ ├── ego_lon_jerk.py │ │ │ │ ├── ego_mean_speed.py │ │ │ │ ├── ego_progress_along_expert_route.py │ │ │ │ ├── ego_yaw_acceleration.py │ │ │ │ ├── ego_yaw_rate.py │ │ │ │ ├── no_ego_at_fault_collisions.py │ │ │ │ ├── planner_expert_average_heading_error_within_bound.py │ │ │ │ ├── planner_expert_average_l2_error_within_bound.py │ │ │ │ ├── planner_expert_final_heading_error_within_bound.py │ │ │ │ ├── planner_expert_final_l2_error_within_bound.py │ │ │ │ ├── planner_miss_rate_within_bound.py │ │ │ │ ├── speed_limit_compliance.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── json │ │ │ │ │ │ ├── drivable_area_compliance │ │ │ │ │ │ │ ├── drivable_area_violation.json │ │ │ │ │ │ │ ├── no_drivable_area_violation.json │ │ │ │ │ │ │ └── small_drivable_area_violation.json │ │ │ │ │ │ ├── driving_direction_compliance │ │ │ │ │ │ │ ├── ego_does_not_drive_backward.json │ │ │ │ │ │ │ ├── ego_drives_backward.json │ │ │ │ │ │ │ └── ego_slightly_drives_backward.json │ │ │ │ │ │ ├── ego_acceleration │ │ │ │ │ │ │ └── ego_acceleration.json │ │ │ │ │ │ ├── ego_expert_l2_error │ │ │ │ │ │ │ └── ego_expert_l2_error.json │ │ │ │ │ │ ├── ego_expert_l2_error_with_yaw │ │ │ │ │ │ │ ├── ego_expert_l2_error_with_yaw.json │ │ │ │ │ │ │ └── ego_expert_l2_error_with_yaw_zero.json │ │ │ │ │ │ ├── ego_is_comfortable │ │ │ │ │ │ │ └── ego_is_comfortable.json │ │ │ │ │ │ ├── ego_is_making_progress │ │ │ │ │ │ │ └── ego_is_making_progress.json │ │ │ │ │ │ ├── ego_jerk │ │ │ │ │ │ │ └── ego_jerk.json │ │ │ │ │ │ ├── ego_lane_change │ │ │ │ │ │ │ └── ego_lane_change.json │ │ │ │ │ │ ├── ego_lat_acceleration │ │ │ │ │ │ │ └── ego_lat_acceleration.json │ │ │ │ │ │ ├── ego_lat_jerk │ │ │ │ │ │ │ └── ego_lat_jerk.json │ │ │ │ │ │ ├── ego_lon_acceleration │ │ │ │ │ │ │ └── ego_lon_acceleration.json │ │ │ │ │ │ ├── ego_lon_jerk │ │ │ │ │ │ │ └── ego_lon_jerk.json │ │ │ │ │ │ ├── ego_mean_speed │ │ │ │ │ │ │ └── ego_mean_speed.json │ │ │ │ │ │ ├── ego_progress_along_expert_route │ │ │ │ │ │ │ ├── ego_drives_backward.json │ │ │ │ │ │ │ ├── ego_no_progress_along_expert_route.json │ │ │ │ │ │ │ ├── ego_no_route.json │ │ │ │ │ │ │ └── ego_progress_along_expert_route.json │ │ │ │ │ │ ├── ego_yaw_acceleration │ │ │ │ │ │ │ └── ego_yaw_acceleration.json │ │ │ │ │ │ ├── ego_yaw_rate │ │ │ │ │ │ │ └── ego_yaw_rate.json │ │ │ │ │ │ ├── no_ego_at_fault_collision │ │ │ │ │ │ │ ├── active_front_collision.json │ │ │ │ │ │ │ ├── active_lateral_collision.json │ │ │ │ │ │ │ ├── active_rear_collision.json │ │ │ │ │ │ │ ├── multiple_collisions.json │ │ │ │ │ │ │ ├── no_collision.json │ │ │ │ │ │ │ ├── stopped_ego_collision.json │ │ │ │ │ │ │ └── stopped_track_collision.json │ │ │ │ │ │ ├── planner_expert_average_heading_error_within_bound │ │ │ │ │ │ │ └── low_average_heading_error.json │ │ │ │ │ │ ├── planner_expert_average_l2_error_within_bound │ │ │ │ │ │ │ └── high_average_l2_error.json │ │ │ │ │ │ ├── planner_expert_final_heading_error_within_bound │ │ │ │ │ │ │ └── low_final_heading_error.json │ │ │ │ │ │ ├── planner_expert_final_l2_error_within_bound │ │ │ │ │ │ │ └── high_final_l2_error.json │ │ │ │ │ │ ├── planner_miss_rate_within_bound │ │ │ │ │ │ │ └── high_miss_rate.json │ │ │ │ │ │ ├── speed_limit_compliance │ │ │ │ │ │ │ ├── no_speed_limit_violation.json │ │ │ │ │ │ │ └── speed_limit_violation.json │ │ │ │ │ │ └── time_to_collision_within_bound │ │ │ │ │ │ │ ├── ego_stopped.json │ │ │ │ │ │ │ ├── in_collision.json │ │ │ │ │ │ │ ├── no_collisions.json │ │ │ │ │ │ │ ├── no_relevant_tracks.json │ │ │ │ │ │ │ └── time_to_collision_above_threshold.json │ │ │ │ │ ├── test_drivable_area_compliance.py │ │ │ │ │ ├── test_driving_direction_compliance.py │ │ │ │ │ ├── test_ego_acceleration.py │ │ │ │ │ ├── test_ego_expert_l2_error.py │ │ │ │ │ ├── test_ego_expert_l2_error_with_yaw.py │ │ │ │ │ ├── test_ego_is_comfortable.py │ │ │ │ │ ├── test_ego_is_making_progress.py │ │ │ │ │ ├── test_ego_jerk.py │ │ │ │ │ ├── test_ego_lane_change.py │ │ │ │ │ ├── test_ego_lat_acceleration.py │ │ │ │ │ ├── test_ego_lat_jerk.py │ │ │ │ │ ├── test_ego_lon_acceleration.py │ │ │ │ │ ├── test_ego_lon_jerk.py │ │ │ │ │ ├── test_ego_mean_speed.py │ │ │ │ │ ├── test_ego_progress_along_expert_route.py │ │ │ │ │ ├── test_ego_yaw_acceleration.py │ │ │ │ │ ├── test_ego_yaw_rate.py │ │ │ │ │ ├── test_no_ego_at_fault_collisions.py │ │ │ │ │ ├── test_planner_expert_average_heading_error_within_bound.py │ │ │ │ │ ├── test_planner_expert_average_l2_error_within_bound.py │ │ │ │ │ ├── test_planner_expert_final_heading_error_within_bound.py │ │ │ │ │ ├── test_planner_expert_final_l2_error_within_bound.py │ │ │ │ │ ├── test_planner_miss_rate_within_bound.py │ │ │ │ │ ├── test_speed_limit_compliance.py │ │ │ │ │ └── test_time_to_collision_within_bound.py │ │ │ │ └── time_to_collision_within_bound.py │ │ │ └── scenario_dependent │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── ego_stop_at_stop_line.py │ │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── json │ │ │ │ └── ego_stop_at_stop_line │ │ │ │ │ └── ego_stop_at_stop_line.json │ │ │ │ └── test_ego_stop_at_stop_line.py │ │ ├── metric_dataframe.py │ │ ├── metric_engine.py │ │ ├── metric_file.py │ │ ├── metric_result.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_metric_engine.py │ │ └── utils │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── collision_utils.py │ │ │ ├── expert_comparisons.py │ │ │ ├── route_extractor.py │ │ │ ├── state_extractors.py │ │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── json │ │ │ │ └── route_extractor │ │ │ │ │ └── route_extractor.json │ │ │ └── test_route_extractor.py │ │ │ └── testing_utils.py │ ├── nuboard │ │ ├── BUILD │ │ ├── README.md │ │ ├── __init__.py │ │ ├── base │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── base_tab.py │ │ │ ├── data_class.py │ │ │ ├── experiment_file_data.py │ │ │ ├── plot_data.py │ │ │ ├── simulation_tile.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_base_tab.py │ │ │ │ ├── test_nuboard_file.py │ │ │ │ └── test_simulation_tile.py │ │ ├── nuboard.py │ │ ├── resource │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── css │ │ │ │ ├── cloud.css │ │ │ │ ├── histogram.css │ │ │ │ ├── overview.css │ │ │ │ └── scenario.css │ │ │ ├── motional_logo.png │ │ │ ├── scripts │ │ │ │ └── utils.js │ │ │ ├── spectre-exp.min.css │ │ │ ├── spectre-icons.min.css │ │ │ ├── spectre.min.css │ │ │ └── style.css │ │ ├── style.py │ │ ├── tabs │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── cloud_tab.py │ │ │ ├── config │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── cloud_tab_config.py │ │ │ │ ├── histogram_tab_config.py │ │ │ │ ├── overview_tab_config.py │ │ │ │ └── scenario_tab_config.py │ │ │ ├── configuration_tab.py │ │ │ ├── histogram_tab.py │ │ │ ├── js_code │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── cloud_tab_js_code.py │ │ │ │ ├── histogram_tab_js_code.py │ │ │ │ └── scenario_tab_js_code.py │ │ │ ├── overview_tab.py │ │ │ ├── scenario_tab.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── skeleton_test_tab.py │ │ │ │ ├── test_cloud_tab.py │ │ │ │ ├── test_configuration_tab.py │ │ │ │ ├── test_histogram_tab.py │ │ │ │ ├── test_overview_tab.py │ │ │ │ └── test_scenario_tab.py │ │ ├── templates │ │ │ ├── index.html │ │ │ └── tabs │ │ │ │ ├── cloud.html │ │ │ │ ├── histogram.html │ │ │ │ ├── overview.html │ │ │ │ └── scenario.html │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_nuboard.py │ │ └── utils │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── nuboard_cloud_utils.py │ │ │ ├── nuboard_histogram_utils.py │ │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_nuboard_cloud_utils.py │ │ │ ├── test_nuboard_utils.py │ │ │ └── utils.py │ │ │ └── utils.py │ ├── scenario_builder │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── abstract_scenario.py │ │ ├── abstract_scenario_builder.py │ │ ├── cache │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── cached_scenario.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_cached_scenario.py │ │ ├── nuplan_db │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── nuplan_scenario.py │ │ │ ├── nuplan_scenario_builder.py │ │ │ ├── nuplan_scenario_filter_utils.py │ │ │ ├── nuplan_scenario_utils.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── nuplan_scenario_test_utils.py │ │ │ │ ├── test_nuplan_scenario.py │ │ │ │ ├── test_nuplan_scenario_builder.py │ │ │ │ ├── test_nuplan_scenario_filter_utils.py │ │ │ │ ├── test_nuplan_scenario_integration.py │ │ │ │ ├── test_nuplan_scenario_utils.py │ │ │ │ └── test_nuplan_scenario_utils_integration.py │ │ ├── scenario_filter.py │ │ ├── scenario_utils.py │ │ └── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── mock_abstract_scenario.py │ │ │ ├── mock_abstract_scenario_builder.py │ │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_mock_abstract_scenario.py │ │ │ └── test_mock_abstract_scenario_builder.py │ │ │ └── test_scenario_utils.py │ ├── script │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── builders │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── data_augmentation_builder.py │ │ │ ├── folder_builder.py │ │ │ ├── logging_builder.py │ │ │ ├── lr_scheduler_builder.py │ │ │ ├── main_callback_builder.py │ │ │ ├── metric_aggregator_builder.py │ │ │ ├── metric_builder.py │ │ │ ├── metric_runner_builder.py │ │ │ ├── model_builder.py │ │ │ ├── objectives_builder.py │ │ │ ├── observation_builder.py │ │ │ ├── planner_builder.py │ │ │ ├── scenario_builder.py │ │ │ ├── scenario_building_builder.py │ │ │ ├── scenario_filter_builder.py │ │ │ ├── simulation_builder.py │ │ │ ├── simulation_callback_builder.py │ │ │ ├── simulation_log_builder.py │ │ │ ├── splitter_builder.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_log.py │ │ │ │ ├── test_lr_scheduler_builder.py │ │ │ │ ├── test_scenario_builder.py │ │ │ │ └── test_simulation_callback_builder.py │ │ │ ├── training_builder.py │ │ │ ├── training_callback_builder.py │ │ │ ├── training_metrics_builder.py │ │ │ ├── utils │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_utils_checkpoint.py │ │ │ │ │ ├── test_utils_config.py │ │ │ │ │ ├── test_utils_config_distributed_training.py │ │ │ │ │ └── test_utils_type.py │ │ │ │ ├── utils_checkpoint.py │ │ │ │ ├── utils_config.py │ │ │ │ └── utils_type.py │ │ │ └── worker_pool_builder.py │ │ ├── config │ │ │ ├── __init__.py │ │ │ ├── common │ │ │ │ ├── __init__.py │ │ │ │ ├── default_common.yaml │ │ │ │ ├── default_experiment.yaml │ │ │ │ ├── default_submission.yaml │ │ │ │ ├── model │ │ │ │ │ ├── raster_model.yaml │ │ │ │ │ ├── simple_vector_model.yaml │ │ │ │ │ ├── urban_driver_open_loop_model.yaml │ │ │ │ │ └── vector_model.yaml │ │ │ │ ├── scenario_builder │ │ │ │ │ ├── mock_abstract_scenario_builder.yaml │ │ │ │ │ ├── nuplan.yaml │ │ │ │ │ ├── nuplan_challenge.yaml │ │ │ │ │ ├── nuplan_mini.yaml │ │ │ │ │ ├── scenario_mapping │ │ │ │ │ │ ├── nuplan_challenge_scenario_mapping.yaml │ │ │ │ │ │ └── nuplan_scenario_mapping.yaml │ │ │ │ │ └── vehicle_parameters │ │ │ │ │ │ └── nuplan_vehicle_parameters.yaml │ │ │ │ ├── scenario_filter │ │ │ │ │ ├── all_scenarios.yaml │ │ │ │ │ ├── closed_loop_few_training_scenario.yaml │ │ │ │ │ ├── few_training_scenarios.yaml │ │ │ │ │ ├── nuplan_challenge_scenarios.yaml │ │ │ │ │ ├── one_continuous_log.yaml │ │ │ │ │ ├── one_hand_picked_scenario.yaml │ │ │ │ │ ├── one_of_each_scenario_type.yaml │ │ │ │ │ ├── one_percent_of_lv_strip_scenarios.yaml │ │ │ │ │ ├── simulation_test_split.yaml │ │ │ │ │ ├── test_scenarios_hard20.yaml │ │ │ │ │ ├── training_scenarios.yaml │ │ │ │ │ └── val14.yaml │ │ │ │ ├── simulation_metric │ │ │ │ │ ├── common_metrics.yaml │ │ │ │ │ ├── default_metrics.yaml │ │ │ │ │ ├── ego_in_stop_line │ │ │ │ │ │ └── ego_stop_at_stop_line_statistics.yaml │ │ │ │ │ ├── high_level │ │ │ │ │ │ ├── drivable_area_compliance_statistics.yaml │ │ │ │ │ │ ├── driving_direction_compliance_statistics.yaml │ │ │ │ │ │ ├── ego_is_comfortable_statistics.yaml │ │ │ │ │ │ ├── ego_is_making_progress_statistics.yaml │ │ │ │ │ │ ├── no_ego_at_fault_collisions_statistics.yaml │ │ │ │ │ │ ├── planner_expert_average_heading_error_within_bound_statistics.yaml │ │ │ │ │ │ ├── planner_expert_final_heading_error_within_bound_statistics.yaml │ │ │ │ │ │ ├── planner_expert_final_l2_error_within_bound_statistics.yaml │ │ │ │ │ │ ├── planner_miss_rate_within_bound_statistics.yaml │ │ │ │ │ │ ├── speed_limit_compliance_statistics.yaml │ │ │ │ │ │ └── time_to_collision_within_bound_statistics.yaml │ │ │ │ │ ├── low_level │ │ │ │ │ │ ├── ego_acceleration_statistics.yaml │ │ │ │ │ │ ├── ego_expert_l2_error_statistics.yaml │ │ │ │ │ │ ├── ego_expert_l2_error_with_yaw_statistics.yaml │ │ │ │ │ │ ├── ego_jerk_statistics.yaml │ │ │ │ │ │ ├── ego_lane_change_statistics.yaml │ │ │ │ │ │ ├── ego_lat_acceleration_statistics.yaml │ │ │ │ │ │ ├── ego_lat_jerk_statistics.yaml │ │ │ │ │ │ ├── ego_lon_acceleration_statistics.yaml │ │ │ │ │ │ ├── ego_lon_jerk_statistics.yaml │ │ │ │ │ │ ├── ego_mean_speed_statistics.yaml │ │ │ │ │ │ ├── ego_progress_along_expert_route_statistics.yaml │ │ │ │ │ │ ├── ego_yaw_acceleration_statistics.yaml │ │ │ │ │ │ ├── ego_yaw_rate_statistics.yaml │ │ │ │ │ │ └── planner_expert_average_l2_error_within_bound_statistics.yaml │ │ │ │ │ ├── simulation_closed_loop_nonreactive_agents.yaml │ │ │ │ │ ├── simulation_closed_loop_reactive_agents.yaml │ │ │ │ │ └── simulation_open_loop_boxes.yaml │ │ │ │ ├── splitter │ │ │ │ │ └── nuplan.yaml │ │ │ │ └── worker │ │ │ │ │ ├── ray_distributed.yaml │ │ │ │ │ ├── sequential.yaml │ │ │ │ │ └── single_machine_thread_pool.yaml │ │ │ ├── nuboard │ │ │ │ ├── __init__.py │ │ │ │ └── default_nuboard.yaml │ │ │ ├── simulation │ │ │ │ ├── __init__.py │ │ │ │ ├── callback │ │ │ │ │ ├── serialization_callback.yaml │ │ │ │ │ ├── simulation_log_callback.yaml │ │ │ │ │ └── timing_callback.yaml │ │ │ │ ├── default_run_metric_aggregator.yaml │ │ │ │ ├── default_simulation.yaml │ │ │ │ ├── default_submission_planner.yaml │ │ │ │ ├── ego_controller │ │ │ │ │ ├── log_play_back_controller.yaml │ │ │ │ │ ├── motion_model │ │ │ │ │ │ └── kinematic_bicycle_model.yaml │ │ │ │ │ ├── perfect_tracking_controller.yaml │ │ │ │ │ ├── tracker │ │ │ │ │ │ ├── ilqr_tracker.yaml │ │ │ │ │ │ └── lqr_tracker.yaml │ │ │ │ │ └── two_stage_controller.yaml │ │ │ │ ├── main_callback │ │ │ │ │ ├── completion_callback.yaml │ │ │ │ │ ├── metric_aggregator_callback.yaml │ │ │ │ │ ├── metric_file_callback.yaml │ │ │ │ │ ├── metric_summary_callback.yaml │ │ │ │ │ ├── publisher_callback.yaml │ │ │ │ │ ├── time_callback.yaml │ │ │ │ │ └── validation_callback.yaml │ │ │ │ ├── metric_aggregator │ │ │ │ │ ├── closed_loop_nonreactive_agents_weighted_average.yaml │ │ │ │ │ ├── closed_loop_reactive_agents_weighted_average.yaml │ │ │ │ │ ├── default_weighted_average.yaml │ │ │ │ │ └── open_loop_boxes_weighted_average.yaml │ │ │ │ ├── observation │ │ │ │ │ ├── box_observation.yaml │ │ │ │ │ ├── ego_centric_ml_agents_observation.yaml │ │ │ │ │ ├── idm_agents_observation.yaml │ │ │ │ │ └── lidar_pc_observation.yaml │ │ │ │ ├── planner │ │ │ │ │ ├── idm_planner.yaml │ │ │ │ │ ├── llama4drive_lora_ins_wo_stop.yaml │ │ │ │ │ ├── llama4drive_lora_ins_wo_stop_refine.yaml │ │ │ │ │ ├── log_future_planner.yaml │ │ │ │ │ ├── ml_planner.yaml │ │ │ │ │ ├── remote_planner.yaml │ │ │ │ │ └── simple_planner.yaml │ │ │ │ ├── predictor │ │ │ │ │ └── log_future_predictor.yaml │ │ │ │ └── simulation_time_controller │ │ │ │ │ └── step_simulation_time_controller.yaml │ │ │ └── training │ │ │ │ ├── __init__.py │ │ │ │ ├── callbacks │ │ │ │ ├── default_callbacks.yaml │ │ │ │ ├── learning_rate_monitor_callback.yaml │ │ │ │ ├── model_checkpoint_callback.yaml │ │ │ │ ├── scenario_scoring_callback.yaml │ │ │ │ ├── time_logging_callback.yaml │ │ │ │ └── visualization_callback.yaml │ │ │ │ ├── data_augmentation │ │ │ │ ├── agent_dropout_augmentation.yaml │ │ │ │ ├── gaussian_smooth_agent_augmentation.yaml │ │ │ │ ├── generic_agent_dropout_augmentation.yaml │ │ │ │ ├── kinematic_agent_augmentation.yaml │ │ │ │ ├── kinematic_history_agent_augmentation.yaml │ │ │ │ ├── kinematic_history_generic_agent_augmentation.yaml │ │ │ │ └── simple_agent_augmentation.yaml │ │ │ │ ├── data_augmentation_scheduler │ │ │ │ ├── default_augmentation_schedulers.yaml │ │ │ │ ├── stepwise_augmentation_attribute_scheduler.yaml │ │ │ │ └── stepwise_augmentation_probability_scheduler.yaml │ │ │ │ ├── data_loader │ │ │ │ └── default_data_loader.yaml │ │ │ │ ├── default_training.yaml │ │ │ │ ├── lightning │ │ │ │ └── default_lightning.yaml │ │ │ │ ├── lr_scheduler │ │ │ │ ├── multistep_lr.yaml │ │ │ │ └── one_cycle_lr.yaml │ │ │ │ ├── objective │ │ │ │ ├── agents_imitation_objective.yaml │ │ │ │ ├── imitation_objective.yaml │ │ │ │ └── trajectory_weight_decay_imitation_objective.yaml │ │ │ │ ├── optimizer │ │ │ │ ├── adam.yaml │ │ │ │ ├── adamw.yaml │ │ │ │ └── sgd.yaml │ │ │ │ ├── scenario_type_weights │ │ │ │ └── default_scenario_type_weights.yaml │ │ │ │ ├── training_metric │ │ │ │ ├── agents_avg_displacement_error.yaml │ │ │ │ ├── agents_avg_heading_error.yaml │ │ │ │ ├── agents_final_displacement_error.yaml │ │ │ │ ├── agents_final_heading_error.yaml │ │ │ │ ├── avg_displacement_error.yaml │ │ │ │ ├── avg_heading_error.yaml │ │ │ │ ├── final_displacement_error.yaml │ │ │ │ └── final_heading_error.yaml │ │ │ │ └── warm_up_lr_scheduler │ │ │ │ ├── constant_warm_up.yaml │ │ │ │ └── linear_warm_up.yaml │ │ ├── experiments │ │ │ ├── __init__.py │ │ │ ├── simulation │ │ │ │ ├── closed_loop_nonreactive_agents.yaml │ │ │ │ ├── closed_loop_reactive_agents.yaml │ │ │ │ ├── open_loop_boxes.yaml │ │ │ │ ├── remote_closed_loop_nonreactive_agents.yaml │ │ │ │ ├── remote_closed_loop_reactive_agents.yaml │ │ │ │ ├── remote_open_loop_boxes.yaml │ │ │ │ └── validation_challenge.yaml │ │ │ └── training │ │ │ │ ├── training_raster_model.yaml │ │ │ │ ├── training_simple_vector_model.yaml │ │ │ │ ├── training_urban_driver_open_loop_model.yaml │ │ │ │ └── training_vector_model.yaml │ │ ├── profiler_context_manager.py │ │ ├── run_metric.py │ │ ├── run_metric_aggregator.py │ │ ├── run_nuboard.py │ │ ├── run_result_processor_aws.py │ │ ├── run_simulation.py │ │ ├── run_submission_planner.py │ │ ├── run_training.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── skeleton_test_simulation.py │ │ │ ├── skeleton_test_train.py │ │ │ ├── test_cache_mocked.py │ │ │ ├── test_cache_nuplandb.py │ │ │ ├── test_config_dataloader.py │ │ │ ├── test_model_build.py │ │ │ ├── test_one_cycle_lr_scheduler.py │ │ │ ├── test_profiling.py │ │ │ ├── test_run_challenge.py │ │ │ ├── test_run_metric.py │ │ │ ├── test_run_metric_aggregator.py │ │ │ ├── test_run_nuboard.py │ │ │ ├── test_run_parallel_worker.py │ │ │ ├── test_run_ray_worker.py │ │ │ ├── test_run_result_processor.py │ │ │ ├── test_run_sequential_worker.py │ │ │ ├── test_run_simulation.py │ │ │ ├── test_run_submission_planner.py │ │ │ ├── test_train_overfitting.py │ │ │ ├── test_train_raster_model.py │ │ │ ├── test_train_urban_driver_open_loop_model.py │ │ │ └── test_train_vector_model.py │ │ └── utils.py │ ├── simulation │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── callback │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_callback.py │ │ │ ├── metric_callback.py │ │ │ ├── multi_callback.py │ │ │ ├── serialization_callback.py │ │ │ ├── simulation_log_callback.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── skeleton_test_serialization_callback.py │ │ │ │ ├── test_metric_callback.py │ │ │ │ ├── test_serialization_callback_json.py │ │ │ │ ├── test_serialization_callback_msgpack.py │ │ │ │ ├── test_serialization_callback_pickle.py │ │ │ │ ├── test_simulation_log.py │ │ │ │ ├── test_simulation_log_callback.py │ │ │ │ ├── test_timing_callback.py │ │ │ │ └── test_visualization_callback.py │ │ │ ├── timing_callback.py │ │ │ └── visualization_callback.py │ │ ├── controller │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_controller.py │ │ │ ├── log_playback.py │ │ │ ├── motion_model │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── abstract_motion_model.py │ │ │ │ ├── kinematic_bicycle.py │ │ │ │ └── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_kinematic_motion_model.py │ │ │ ├── perfect_tracking.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_log_playback.py │ │ │ │ ├── test_perfect_tracking.py │ │ │ │ └── test_utils.py │ │ │ ├── tracker │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── abstract_tracker.py │ │ │ │ ├── ilqr │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── ilqr_solver.py │ │ │ │ │ └── test │ │ │ │ │ │ ├── BUILD │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── test_ilqr_solver.py │ │ │ │ ├── ilqr_tracker.py │ │ │ │ ├── lqr.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_ilqr_tracker.py │ │ │ │ │ ├── test_lqr_tracker.py │ │ │ │ │ └── test_tracker_utils.py │ │ │ │ └── tracker_utils.py │ │ │ ├── two_stage_controller.py │ │ │ └── utils.py │ │ ├── history │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── simulation_history.py │ │ │ ├── simulation_history_buffer.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_simulation_history.py │ │ │ │ └── test_simulation_history_buffer.py │ │ ├── main_callback │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_main_callback.py │ │ │ ├── completion_callback.py │ │ │ ├── metric_aggregator_callback.py │ │ │ ├── metric_file_callback.py │ │ │ ├── metric_summary_callback.py │ │ │ ├── multi_main_callback.py │ │ │ ├── publisher_callback.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_completion_callback.py │ │ │ │ ├── test_metric_aggregator_callback.py │ │ │ │ ├── test_metric_file_callback.py │ │ │ │ ├── test_metric_summary_callback.py │ │ │ │ ├── test_publisher_callback.py │ │ │ │ └── test_validation_callback.py │ │ │ ├── time_callback.py │ │ │ └── validation_callback.py │ │ ├── observation │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_ml_agents.py │ │ │ ├── abstract_observation.py │ │ │ ├── ego_centric_ml_agents.py │ │ │ ├── idm │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── idm_agent.py │ │ │ │ ├── idm_agent_manager.py │ │ │ │ ├── idm_agents_builder.py │ │ │ │ ├── idm_policy.py │ │ │ │ ├── idm_states.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── json │ │ │ │ │ │ ├── idm_agent_observation │ │ │ │ │ │ │ └── baseline.json │ │ │ │ │ │ └── idm_manager │ │ │ │ │ │ │ ├── baseline.json │ │ │ │ │ │ │ ├── green_traffic_lights.json │ │ │ │ │ │ │ ├── merging.json │ │ │ │ │ │ │ ├── red_traffic_lights.json │ │ │ │ │ │ │ └── red_traffic_lights_not_intersection.json │ │ │ │ │ ├── test_idm_agents_observation.py │ │ │ │ │ ├── test_idm_manager.py │ │ │ │ │ ├── test_idm_policy.py │ │ │ │ │ ├── test_profile_idm_observation.py │ │ │ │ │ ├── test_utils.py │ │ │ │ │ └── utils.py │ │ │ │ └── utils.py │ │ │ ├── idm_agents.py │ │ │ ├── lidar_pc.py │ │ │ ├── observation_type.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_ego_centric_ml_agents.py │ │ │ └── tracks_observation.py │ │ ├── occupancy_map │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_occupancy_map.py │ │ │ ├── geopandas_occupancy_map.py │ │ │ ├── strtree_occupancy_map.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_occupancy_map.py │ │ ├── path │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── interpolated_path.py │ │ │ ├── path.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_path.py │ │ │ └── utils.py │ │ ├── planner │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_idm_planner.py │ │ │ ├── abstract_planner.py │ │ │ ├── idm_planner.py │ │ │ ├── log_future_planner.py │ │ │ ├── ml_planner │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── ml_planner.py │ │ │ │ ├── model_loader.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_ml_planner.py │ │ │ │ │ └── test_transform_utils.py │ │ │ │ └── transform_utils.py │ │ │ ├── planner_report.py │ │ │ ├── remote_planner.py │ │ │ ├── simple_planner.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── mock_idm_planner.py │ │ │ │ ├── test_abstract_idm_planner.py │ │ │ │ ├── test_idm_planner.py │ │ │ │ ├── test_log_future_planner.py │ │ │ │ └── test_remote_planner.py │ │ │ └── utils │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── breadth_first_search.py │ │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_breadth_first_search.py │ │ ├── predictor │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_predictor.py │ │ │ ├── log_future_predictor.py │ │ │ ├── predictor_report.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── mock_abstract_predictor.py │ │ │ │ ├── test_abstract_predictor.py │ │ │ │ └── test_log_future_predictor.py │ │ ├── runner │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_runner.py │ │ │ ├── executor.py │ │ │ ├── metric_runner.py │ │ │ ├── runner_report.py │ │ │ ├── simulations_runner.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_metric_runner.py │ │ ├── simulation.py │ │ ├── simulation_log.py │ │ ├── simulation_setup.py │ │ ├── simulation_time_controller │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_simulation_time_controller.py │ │ │ ├── simulation_iteration.py │ │ │ └── step_simulation_time_controller.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_simulation.py │ │ ├── trajectory │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_trajectory.py │ │ │ ├── interpolated_trajectory.py │ │ │ ├── predicted_trajectory.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_interpolated_trajectory.py │ │ │ │ └── test_trajectory_sampling.py │ │ │ └── trajectory_sampling.py │ │ └── visualization │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── abstract_visualization.py │ ├── training │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── callbacks │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── checkpoint_callback.py │ │ │ ├── profile_callback.py │ │ │ ├── scenario_scoring_callback.py │ │ │ ├── stepwise_augmentation_scheduler.py │ │ │ ├── time_logging_callback.py │ │ │ ├── utils │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── scenario_scene_converter.py │ │ │ │ ├── scene_converter.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_scenario_scoring_callback.py │ │ │ │ │ ├── test_stepwise_augmentation_scheduler.py │ │ │ │ │ └── test_visualization_utils.py │ │ │ │ └── visualization_utils.py │ │ │ ├── validate_setup_callback.py │ │ │ └── visualization_callback.py │ │ ├── data_augmentation │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_data_augmentation.py │ │ │ ├── agent_dropout_augmentation.py │ │ │ ├── data_augmentation_util.py │ │ │ ├── gaussian_smooth_agent_augmentation.py │ │ │ ├── generic_agent_dropout_augmentation.py │ │ │ ├── kinematic_agent_augmentation.py │ │ │ ├── kinematic_history_agent_augmentation.py │ │ │ ├── kinematic_history_generic_agent_augmentation.py │ │ │ ├── simple_agent_augmentation.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_agent_dropout_augmentation.py │ │ │ │ ├── test_gaussian_smooth_agent_augmentation.py │ │ │ │ ├── test_generic_agent_dropout_augmentation.py │ │ │ │ ├── test_kinematic_agent_augmentation.py │ │ │ │ ├── test_kinematic_history_agent_augmentation.py │ │ │ │ ├── test_kinematic_history_generic_agent_augmentation.py │ │ │ │ └── test_simple_agent_augmentation.py │ │ ├── data_loader │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── datamodule.py │ │ │ ├── distributed_sampler_wrapper.py │ │ │ ├── log_splitter.py │ │ │ ├── scenario_dataset.py │ │ │ ├── splitter.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── skeleton_test_dataloader.py │ │ │ │ ├── test_dataloader_ray.py │ │ │ │ ├── test_dataloader_sequential.py │ │ │ │ ├── test_distributed_sampler_wrapper.py │ │ │ │ └── test_distributed_weighted_sampler_init.py │ │ ├── experiments │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── cache_metadata_entry.py │ │ │ ├── caching.py │ │ │ └── training.py │ │ ├── modeling │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── lightning_module_wrapper.py │ │ │ ├── metrics │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── abstract_training_metric.py │ │ │ │ ├── agents_imitation_metrics.py │ │ │ │ └── planning_metrics.py │ │ │ ├── models │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── dynamics_layers │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abstract_dynamics.py │ │ │ │ │ ├── deep_dynamical_system_layer.py │ │ │ │ │ ├── kinematic_bicycle_layer_geometric_center.py │ │ │ │ │ ├── kinematic_bicycle_layer_rear_axle.py │ │ │ │ │ ├── kinematic_bicycle_layers_utils.py │ │ │ │ │ ├── kinematic_unicycle_layer_rear_axle.py │ │ │ │ │ ├── kinematic_unicycle_layers_utils.py │ │ │ │ │ └── test │ │ │ │ │ │ ├── BUILD │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_deep_dynamical_system_layer.py │ │ │ │ │ │ ├── test_kinematic_bicycle_layers_utils.py │ │ │ │ │ │ └── test_kinematic_unicycle_layers_utils.py │ │ │ │ ├── lanegcn_model.py │ │ │ │ ├── lanegcn_utils.py │ │ │ │ ├── raster_model.py │ │ │ │ ├── simple_vector_map_model.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_lanegcn.py │ │ │ │ │ ├── test_simple_vector_map_model.py │ │ │ │ │ └── test_urban_driver_open_loop_model.py │ │ │ │ ├── urban_driver_open_loop_model.py │ │ │ │ └── urban_driver_open_loop_model_utils.py │ │ │ ├── objectives │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── abstract_objective.py │ │ │ │ ├── agents_imitation_objective.py │ │ │ │ ├── imitation_objective.py │ │ │ │ ├── scenario_weight_utils.py │ │ │ │ ├── test │ │ │ │ │ ├── BUILD │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_agents_imitation_objective.py │ │ │ │ │ ├── test_imitation_objective.py │ │ │ │ │ └── test_trajectory_weight_decay_imitation_objective.py │ │ │ │ └── trajectory_weight_decay_imitation_objective.py │ │ │ ├── scriptable_torch_module_wrapper.py │ │ │ ├── torch_module_wrapper.py │ │ │ └── types.py │ │ └── preprocessing │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── feature_builders │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_feature_builder.py │ │ │ ├── agents_feature_builder.py │ │ │ ├── generic_agents_feature_builder.py │ │ │ ├── raster_feature_builder.py │ │ │ ├── scriptable_feature_builder.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── mock_feature_utils.py │ │ │ │ ├── test_agents_feature_builder.py │ │ │ │ ├── test_generic_agents_feature_builder.py │ │ │ │ ├── test_vector_building.py │ │ │ │ ├── test_vector_map_feature_builder.py │ │ │ │ ├── test_vector_map_feature_builder_lane_metadata.py │ │ │ │ └── test_vector_set_map_feature_builder.py │ │ │ ├── vector_builder_utils.py │ │ │ ├── vector_map_feature_builder.py │ │ │ └── vector_set_map_feature_builder.py │ │ │ ├── feature_collate.py │ │ │ ├── feature_preprocessor.py │ │ │ ├── features │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_model_feature.py │ │ │ ├── agents.py │ │ │ ├── agents_trajectories.py │ │ │ ├── generic_agents.py │ │ │ ├── raster.py │ │ │ ├── raster_utils.py │ │ │ ├── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ ├── test_agents.py │ │ │ │ ├── test_generic_agents.py │ │ │ │ ├── test_raster_building.py │ │ │ │ ├── test_trajectories.py │ │ │ │ ├── test_trajectory.py │ │ │ │ ├── test_vector_set_map.py │ │ │ │ └── test_vector_utils.py │ │ │ ├── trajectories.py │ │ │ ├── trajectory.py │ │ │ ├── trajectory_utils.py │ │ │ ├── vector_map.py │ │ │ ├── vector_set_map.py │ │ │ └── vector_utils.py │ │ │ ├── target_builders │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── abstract_target_builder.py │ │ │ ├── ego_trajectory_target_builder.py │ │ │ └── test │ │ │ │ ├── BUILD │ │ │ │ ├── __init__.py │ │ │ │ └── test_ego_trajectory_target_builder.py │ │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── dummy_vectormap_builder.py │ │ │ ├── test_collate.py │ │ │ ├── test_collate_dataloader.py │ │ │ ├── test_feature_preprocessor.py │ │ │ └── test_utils_cache.py │ │ │ └── utils │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── agents_preprocessing.py │ │ │ ├── feature_cache.py │ │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_agent_processing.py │ │ │ └── test_vector_preprocessing.py │ │ │ ├── utils_cache.py │ │ │ ├── utils_scene.py │ │ │ └── vector_preprocessing.py │ └── utils │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── color.py │ │ ├── lr_schedulers │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── sequential_lr_scheduler.py │ │ └── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ └── test_sequential_lr_scheduler.py │ │ ├── multithreading │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── ray_execution.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── test_ray_worker.py │ │ │ ├── test_splitter.py │ │ │ ├── test_worker_pool.py │ │ │ └── test_workers_square_numbers_task.py │ │ ├── worker_parallel.py │ │ ├── worker_pool.py │ │ ├── worker_ray.py │ │ ├── worker_sequential.py │ │ └── worker_utils.py │ │ ├── serialization │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── from_scene.py │ │ ├── scene.py │ │ ├── scene_simple_trajectory.py │ │ ├── test │ │ │ ├── BUILD │ │ │ ├── __init__.py │ │ │ ├── json │ │ │ │ └── load_from_scene.json │ │ │ ├── test_from_scene_tracked_objects.py │ │ │ ├── test_scene_simple_trajectory.py │ │ │ ├── test_scene_trajectory.py │ │ │ ├── test_scene_trajectory_state.py │ │ │ └── test_to_scene.py │ │ └── to_scene.py │ │ └── test │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── test_color.py │ │ └── test_scene_color.py └── submission │ ├── BUILD │ ├── __init__.py │ ├── challenge_pb2.py │ ├── challenge_pb2_grpc.py │ ├── challenge_servicers.py │ ├── evalai │ ├── BUILD │ ├── __init__.py │ ├── evalai_interface.py │ ├── leaderboard_writer.py │ └── test │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── test_evalai_interface.py │ │ └── test_leaderboard_writer.py │ ├── proto_converters.py │ ├── protos │ └── challenge.proto │ ├── submission_container.py │ ├── submission_container_factory.py │ ├── submission_container_manager.py │ ├── submission_planner.py │ ├── test │ ├── BUILD │ ├── __init__.py │ ├── test_challenge_servicers.py │ ├── test_proto_converters.py │ ├── test_submission_container.py │ ├── test_submission_container_factory.py │ ├── test_submission_container_manager.py │ ├── test_submission_planner.py │ └── test_utils.py │ ├── utils │ ├── BUILD │ ├── __init__.py │ ├── aws_utils.py │ ├── test │ │ ├── BUILD │ │ ├── __init__.py │ │ ├── test_aws_utils.py │ │ └── test_utils.py │ └── utils.py │ ├── validate_submission.py │ └── validators │ ├── BUILD │ ├── __init__.py │ ├── abstract_submission_validator.py │ ├── base_submission_validator.py │ ├── image_exists_validator.py │ ├── image_is_runnable_validator.py │ ├── submission_computes_trajectory_validator.py │ └── test │ ├── BUILD │ ├── __init__.py │ ├── test_base_submission_validator.py │ ├── test_image_exists_validator.py │ ├── test_image_is_runnable_validator.py │ └── test_submission_computes_trajectory_validator.py ├── nuplan_garage ├── __init__.py └── planning │ ├── __init__.py │ ├── script │ ├── __init__.py │ └── config │ │ ├── common │ │ ├── __init__.py │ │ ├── model │ │ │ ├── gc_pgp_model.yaml │ │ │ ├── pdm_offset_model.yaml │ │ │ └── pdm_open_model.yaml │ │ └── scenario_filter │ │ │ ├── reduced_val14_split.yaml │ │ │ ├── train150k_split.yaml │ │ │ └── val14_split.yaml │ │ ├── simulation │ │ ├── __init__.py │ │ └── planner │ │ │ ├── pdm_closed_planner.yaml │ │ │ ├── pdm_hybrid_planner.yaml │ │ │ └── pdm_open_planner.yaml │ │ └── training │ │ ├── __init__.py │ │ ├── data_augmentation │ │ ├── pgp_agent_dropout_augmentation.yaml │ │ ├── pgp_ego_history_dropout_augmentation.yaml │ │ └── pgp_kinematic_agent_augmentation.yaml │ │ ├── objective │ │ ├── l1_objective.yaml │ │ ├── pgp_minADE_objective.yaml │ │ └── pgp_traversal_objective.yaml │ │ └── training_metric │ │ ├── min_avg_displacement_error.yaml │ │ └── min_final_displacement_error.yaml │ ├── simulation │ ├── __init__.py │ └── planner │ │ ├── __init__.py │ │ └── pdm_planner │ │ ├── abstract_pdm_closed_planner.py │ │ ├── abstract_pdm_planner.py │ │ ├── observation │ │ ├── pdm_object_manager.py │ │ ├── pdm_observation.py │ │ ├── pdm_observation_utils.py │ │ └── pdm_occupancy_map.py │ │ ├── pdm_closed_planner.py │ │ ├── pdm_hybrid_planner.py │ │ ├── pdm_open_planner.py │ │ ├── proposal │ │ ├── batch_idm_policy.py │ │ ├── pdm_generator.py │ │ └── pdm_proposal.py │ │ ├── scoring │ │ ├── llm_scorer.py │ │ ├── pdm_comfort_metrics.py │ │ ├── pdm_scorer.py │ │ └── pdm_scorer_utils.py │ │ ├── simulation │ │ ├── batch_kinematic_bicycle.py │ │ ├── batch_lqr.py │ │ ├── batch_lqr_utils.py │ │ └── pdm_simulator.py │ │ └── utils │ │ ├── graph_search │ │ ├── bfs_roadblock.py │ │ └── dijkstra.py │ │ ├── pdm_array_representation.py │ │ ├── pdm_emergency_brake.py │ │ ├── pdm_enums.py │ │ ├── pdm_feature_utils.py │ │ ├── pdm_geometry_utils.py │ │ ├── pdm_path.py │ │ └── route_utils.py │ └── training │ ├── __init__.py │ ├── data_augmentation │ └── pgp │ │ ├── __init__.py │ │ ├── pgp_agent_dropout_augmentation.py │ │ ├── pgp_ego_history_dropout_augmentation.py │ │ └── pgp_kinematic_agent_augmentation.py │ ├── modeling │ ├── __init__.py │ ├── metrics │ │ └── prediction_metrics.py │ ├── models │ │ ├── pdm_offset_model.py │ │ ├── pdm_open_model.py │ │ └── pgp │ │ │ ├── PGP_DESCRIPTION.md │ │ │ ├── pgp_aggregator.py │ │ │ ├── pgp_decoder.py │ │ │ ├── pgp_encoder.py │ │ │ ├── pgp_model.py │ │ │ └── utils.py │ └── objectives │ │ ├── l1_objective.py │ │ ├── pgp_minADE_objective.py │ │ └── pgp_traversal_objective.py │ └── preprocessing │ ├── __init__.py │ ├── feature_builders │ ├── pdm_feature_builder.py │ ├── pgp │ │ ├── pgp_ego_agents_feature_builder.py │ │ ├── pgp_feature_builder.py │ │ ├── pgp_graph_map_feature_builder.py │ │ └── pgp_graph_map_feature_builder_utils.py │ └── route_utils.py │ ├── features │ ├── pdm_feature.py │ ├── pgp │ │ ├── pgp_agent_node_masks.py │ │ ├── pgp_ego_agents.py │ │ ├── pgp_features.py │ │ ├── pgp_graph_map.py │ │ ├── pgp_targets.py │ │ └── pgp_traversals.py │ └── trajectories_multimodal.py │ └── target_builders │ └── multimodal_trajectories_target_builder.py ├── onnx_to_tensorrt ├── CMakeLists.txt └── src │ └── ONNX_to_TensorRT.cpp ├── onnx_to_trt.sh ├── requirements.txt ├── requirements_asyncdriver.txt ├── requirements_torch.txt └── train_script ├── inference ├── asyncdriver_infer.sh ├── simulator_llama4drive.py ├── with_interval.sh └── with_pdm_scorer.sh ├── train_from_scratch └── llm_load_pretrain_lora_gameformer.sh ├── train_gameformer.py └── train_qa ├── train_driveqa.sh └── train_mixed_desion_qa.sh /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/__init__.py -------------------------------------------------------------------------------- /data_generation/data_process.sh: -------------------------------------------------------------------------------- 1 | python data_generation/data_process.py \ 2 | --data_path ./nuplan/dataset/nuplan-v1.1/splits/trainval/ \ 3 | --map_path ./nuplan/dataset/maps/ \ 4 | --save_path ./asyncdriver_data/ \ 5 | --scenarios_per_type 5000 \ 6 | --scenario_cache ./scenario_cache.pkl \ 7 | --start_s $1 -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: nuplan 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.9 6 | - pip=21.2.4 7 | - nb_conda_kernels 8 | - pip: 9 | - -r requirements_torch.txt 10 | - -r requirements.txt 11 | -------------------------------------------------------------------------------- /gameformer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/gameformer/__init__.py -------------------------------------------------------------------------------- /gameformer/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/gameformer/script/__init__.py -------------------------------------------------------------------------------- /gameformer/script/planner/gameformer_planner.yaml: -------------------------------------------------------------------------------- 1 | gameformer_planner: 2 | _target_: gameformer.planner.Planner 3 | _convert_: 'all' -------------------------------------------------------------------------------- /llama2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/llama2/__init__.py -------------------------------------------------------------------------------- /llama2/planner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/llama2/planner/__init__.py -------------------------------------------------------------------------------- /llama2/planner/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/llama2/planner/script/__init__.py -------------------------------------------------------------------------------- /nuplan/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | -------------------------------------------------------------------------------- /nuplan/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/__init__.py -------------------------------------------------------------------------------- /nuplan/cli/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_binary", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "db_cli", 7 | srcs = ["db_cli.py"], 8 | deps = [ 9 | "//nuplan/database/nuplan_db:db_cli_queries", 10 | "//nuplan/planning/scenario_builder/nuplan_db:nuplan_scenario_utils", 11 | ], 12 | ) 13 | 14 | py_binary( 15 | name = "nuplan_cli", 16 | srcs = ["nuplan_cli.py"], 17 | deps = [ 18 | "//nuplan/cli:db_cli", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /nuplan/cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/cli/__init__.py -------------------------------------------------------------------------------- /nuplan/cli/nuplan_cli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import typer 4 | 5 | from nuplan.cli import db_cli 6 | 7 | # Construct main cli interface 8 | cli = typer.Typer() 9 | 10 | # Add database CLI 11 | cli.add_typer(db_cli.cli, name="db") 12 | 13 | 14 | def main() -> None: 15 | """ 16 | Main entry point for the CLI 17 | """ 18 | cli() 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /nuplan/cli/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_test( 7 | name = "test_nuplan_cli", 8 | size = "small", 9 | srcs = ["test_nuplan_cli.py"], 10 | deps = [ 11 | "//nuplan/cli:nuplan_cli", 12 | "//nuplan/database/nuplan_db:db_description_types", 13 | requirement("typer"), 14 | requirement("mock"), 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /nuplan/cli/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/cli/test/__init__.py -------------------------------------------------------------------------------- /nuplan/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/__init__.py -------------------------------------------------------------------------------- /nuplan/common/actor_state/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/actor_state/__init__.py -------------------------------------------------------------------------------- /nuplan/common/actor_state/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/actor_state/test/__init__.py -------------------------------------------------------------------------------- /nuplan/common/geometry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/geometry/__init__.py -------------------------------------------------------------------------------- /nuplan/common/geometry/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/geometry/test/__init__.py -------------------------------------------------------------------------------- /nuplan/common/maps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/maps/__init__.py -------------------------------------------------------------------------------- /nuplan/common/maps/abstract_map_factory.py: -------------------------------------------------------------------------------- 1 | import abc 2 | 3 | from nuplan.common.maps.abstract_map import AbstractMap 4 | 5 | 6 | class AbstractMapFactory(abc.ABC): 7 | """ 8 | Generic map factory interface. 9 | """ 10 | 11 | def build_map_from_name(self, map_name: str) -> AbstractMap: 12 | """ 13 | Builds a map interface given a map name. 14 | :param map_name: Name of the map. 15 | :return: The constructed map interface. 16 | """ 17 | pass 18 | -------------------------------------------------------------------------------- /nuplan/common/maps/map_manager.py: -------------------------------------------------------------------------------- 1 | from typing import Dict 2 | 3 | from nuplan.common.maps.abstract_map import AbstractMap 4 | from nuplan.common.maps.abstract_map_factory import AbstractMapFactory 5 | 6 | 7 | class MapManager: 8 | """Class to store created maps using a map factory.""" 9 | 10 | def __init__(self, map_factory: AbstractMapFactory): 11 | """ 12 | Constructor of MapManager. 13 | :param map_factory: map factory. 14 | """ 15 | self.map_factory = map_factory 16 | self.maps: Dict[str, AbstractMap] = {} 17 | 18 | def get_map(self, map_name: str) -> AbstractMap: 19 | """ 20 | Returns the queried map from the map factory, creating it if it's missing. 21 | :param map_name: Name of the map. 22 | :return: The queried map. 23 | """ 24 | if map_name not in self.maps: 25 | self.maps[map_name] = self.map_factory.build_map_from_name(map_name) 26 | 27 | return self.maps[map_name] 28 | -------------------------------------------------------------------------------- /nuplan/common/maps/nuplan_map/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/maps/nuplan_map/__init__.py -------------------------------------------------------------------------------- /nuplan/common/maps/nuplan_map/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/maps/nuplan_map/test/__init__.py -------------------------------------------------------------------------------- /nuplan/common/maps/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_test( 11 | name = "test_map_manager", 12 | size = "small", 13 | srcs = ["test_map_manager.py"], 14 | deps = [ 15 | "//nuplan/common/maps:map_manager", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /nuplan/common/maps/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/maps/test/__init__.py -------------------------------------------------------------------------------- /nuplan/common/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/common/utils/split_state.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Any, List 3 | 4 | 5 | @dataclass 6 | class SplitState: 7 | """Dataclass representing a state split between fixed states, linear states and angular states.""" 8 | 9 | linear_states: List[Any] # Variable states 10 | angular_states: List[float] # Variable states, representing angles, with 2pi period 11 | fixed_states: List[Any] # Constant states 12 | 13 | def __len__(self) -> int: 14 | """Returns the number of states""" 15 | return len(self.linear_states) + len(self.angular_states) + len(self.fixed_states) 16 | -------------------------------------------------------------------------------- /nuplan/common/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/common/utils/test/patch_test_methods.py: -------------------------------------------------------------------------------- 1 | def base_method(x: int) -> int: 2 | """ 3 | A base method that should be patched. 4 | :param x: The input. 5 | :return: The output. 6 | """ 7 | raise RuntimeError("Should be patched.") 8 | 9 | 10 | def swappable_with_base_method(x: int) -> int: 11 | """ 12 | A function that is swappable with base_method. 13 | This exists primarily to test the dynamic import capabilities of `patch_with_validation`. 14 | :param x: The input. 15 | :return: The output. 16 | """ 17 | raise RuntimeError("Should not be actually run.") 18 | 19 | 20 | def complex_method(x: int, y: int) -> int: 21 | """ 22 | A mock complex method to use with the patch tests. 23 | :param x: One input parameter. 24 | :param y: The other input parameter. 25 | :return: The output. 26 | """ 27 | # Some arbitrary math that involves base_method. 28 | xx = base_method(x) 29 | return xx * y 30 | -------------------------------------------------------------------------------- /nuplan/common/utils/test_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/common/utils/test_utils/__init__.py -------------------------------------------------------------------------------- /nuplan/database/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | -------------------------------------------------------------------------------- /nuplan/database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/__init__.py -------------------------------------------------------------------------------- /nuplan/database/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/common/__init__.py -------------------------------------------------------------------------------- /nuplan/database/common/blob_store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/common/blob_store/__init__.py -------------------------------------------------------------------------------- /nuplan/database/common/blob_store/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_library( 11 | name = "mock_s3_store", 12 | srcs = ["mock_s3_store.py"], 13 | deps = [ 14 | "//nuplan/database/common/blob_store", 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /nuplan/database/common/blob_store/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/common/blob_store/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/maps_db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/maps_db/__init__.py -------------------------------------------------------------------------------- /nuplan/database/maps_db/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/maps_db/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/nuplan_db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/nuplan_db/__init__.py -------------------------------------------------------------------------------- /nuplan/database/nuplan_db/db_description_types.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Dict 3 | 4 | 5 | @dataclass(frozen=True) 6 | class ColumnDescription: 7 | """ 8 | A description of a column present in a Sqlite DB 9 | """ 10 | 11 | column_id: int 12 | name: int 13 | data_type: str 14 | nullable: bool 15 | is_primary_key: bool 16 | 17 | 18 | @dataclass(frozen=True) 19 | class TableDescription: 20 | """ 21 | A description of a table present in a Sqlite DB 22 | """ 23 | 24 | # A mapping of [name, ColumnDescription] 25 | columns: Dict[str, ColumnDescription] 26 | row_count: int 27 | name: str 28 | 29 | 30 | @dataclass(frozen=True) 31 | class DbDescription: 32 | """ 33 | A description of a Sqlite DB. 34 | """ 35 | 36 | # A mapping of [name, TableColumn] 37 | tables: Dict[str, TableDescription] 38 | -------------------------------------------------------------------------------- /nuplan/database/nuplan_db/sensor_data_table_row.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import sqlite3 4 | from abc import ABC, abstractmethod 5 | from dataclasses import dataclass 6 | 7 | 8 | @dataclass(frozen=True) 9 | class SensorDataTableRowData: 10 | """Dummy class to enforce dataclass structure to SensorDataTableRow""" 11 | 12 | pass 13 | 14 | 15 | class SensorDataTableRow(SensorDataTableRowData, ABC): 16 | """ 17 | A class representing a row in the SensorData table. 18 | Each field corresponds to a column in the row. 19 | """ 20 | 21 | @classmethod 22 | @abstractmethod 23 | def from_db_row(cls, row: sqlite3.Row) -> SensorDataTableRow: 24 | """ 25 | A convenience method to convert a row from the SensorData table into a row. 26 | """ 27 | pass 28 | -------------------------------------------------------------------------------- /nuplan/database/nuplan_db/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/nuplan_db/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/nuplan_db_orm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/nuplan_db_orm/__init__.py -------------------------------------------------------------------------------- /nuplan/database/nuplan_db_orm/frame.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class Frame(IntEnum): 5 | """Coordinate frames.""" 6 | 7 | GLOBAL = 0 # Global frame 8 | VEHICLE = 1 # Vehicle frame 9 | SENSOR = 2 # Sensor frame 10 | -------------------------------------------------------------------------------- /nuplan/database/nuplan_db_orm/make_readme.py: -------------------------------------------------------------------------------- 1 | """ 2 | Renders README.md 3 | """ 4 | 5 | import argparse 6 | 7 | from nuplan.database.common.templates import tables 8 | from nuplan.database.common.utils import jsontabledump 9 | 10 | 11 | def make(version: str) -> None: 12 | """ 13 | Generate README.md. 14 | :param version: Database version. 15 | """ 16 | with open('README.md', 'w') as f: 17 | f.write('nuPlan DB schema. Version {} \n========== \n'.format(version)) 18 | f.write('`This file is automatically generated so do not edit this file. Stay DRY.`\n\n') 19 | 20 | for table in tables: 21 | jsontabledump(f, tables[table], table) 22 | 23 | 24 | if __name__ == '__main__': 25 | 26 | parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) 27 | parser.add_argument('version', type=str) 28 | args = parser.parse_args() 29 | 30 | make(args.version) 31 | -------------------------------------------------------------------------------- /nuplan/database/nuplan_db_orm/models.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.ext.declarative import declarative_base 2 | 3 | Base = declarative_base() -------------------------------------------------------------------------------- /nuplan/database/nuplan_db_orm/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/nuplan_db_orm/tests/__init__.py -------------------------------------------------------------------------------- /nuplan/database/tests/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_library( 11 | name = "test_utils_nuplan_db", 12 | srcs = ["test_utils_nuplan_db.py"], 13 | deps = [ 14 | "//nuplan/database/maps_db:gpkg_mapsdb", 15 | "//nuplan/database/maps_db:imapsdb", 16 | "//nuplan/database/nuplan_db_orm:camera", 17 | "//nuplan/database/nuplan_db_orm:image", 18 | "//nuplan/database/nuplan_db_orm:lidar", 19 | "//nuplan/database/nuplan_db_orm:nuplandb", 20 | "//nuplan/database/nuplan_db_orm:nuplandb_wrapper", 21 | ], 22 | ) 23 | 24 | py_test( 25 | name = "test_nuplan", 26 | size = "small", 27 | srcs = ["test_nuplan.py"], 28 | tags = ["integration"], 29 | deps = [ 30 | "//nuplan/database/nuplan_db_orm:nuplandb", 31 | "//nuplan/database/tests:test_utils_nuplan_db", 32 | ], 33 | ) 34 | -------------------------------------------------------------------------------- /nuplan/database/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/tests/__init__.py -------------------------------------------------------------------------------- /nuplan/database/tests/test_nuplan.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.database.tests.test_utils_nuplan_db import get_test_nuplan_db 4 | 5 | 6 | class TestNuplan(unittest.TestCase): 7 | """Test Nuplan DB.""" 8 | 9 | def test_nuplan(self) -> None: 10 | """ 11 | Check whether the nuPlan DB can be loaded without errors. 12 | """ 13 | db = get_test_nuplan_db() 14 | self.assertIsNotNone(db) 15 | 16 | 17 | if __name__ == '__main__': 18 | unittest.main() 19 | -------------------------------------------------------------------------------- /nuplan/database/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/boxes/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_library( 12 | name = "box", 13 | srcs = ["box.py"], 14 | ) 15 | 16 | py_library( 17 | name = "box3d", 18 | srcs = ["box3d.py"], 19 | deps = [ 20 | "//nuplan/database/utils:geometry", 21 | "//nuplan/database/utils:plot", 22 | "//nuplan/database/utils/boxes:box", 23 | "//nuplan/database/utils/label", 24 | requirement("opencv-python"), 25 | requirement("matplotlib"), 26 | requirement("pyquaternion"), 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /nuplan/database/utils/boxes/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/boxes/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/boxes/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_test( 12 | name = "test_box3d", 13 | size = "small", 14 | srcs = ["test_box3d.py"], 15 | deps = [ 16 | "//nuplan/database/utils:geometry", 17 | "//nuplan/database/utils/boxes:box3d", 18 | requirement("numpy"), 19 | requirement("pyquaternion"), 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /nuplan/database/utils/boxes/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/boxes/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/label/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_library( 11 | name = "label", 12 | srcs = ["label.py"], 13 | ) 14 | 15 | py_library( 16 | name = "utils", 17 | srcs = ["utils.py"], 18 | deps = ["//nuplan/database/utils/label"], 19 | ) 20 | -------------------------------------------------------------------------------- /nuplan/database/utils/label/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/label/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/label/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_test( 11 | name = "test_label", 12 | size = "small", 13 | srcs = ["test_label.py"], 14 | deps = ["//nuplan/database/utils/label"], 15 | ) 16 | 17 | py_test( 18 | name = "test_utils", 19 | size = "small", 20 | srcs = ["test_utils.py"], 21 | deps = [ 22 | "//nuplan/database/utils/label", 23 | "//nuplan/database/utils/label:utils", 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /nuplan/database/utils/label/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/label/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/label/test/test_label.py: -------------------------------------------------------------------------------- 1 | import json 2 | import unittest 3 | 4 | from nuplan.database.utils.label.label import Label 5 | 6 | 7 | class TestLabel(unittest.TestCase): 8 | """Test Label Serialization.""" 9 | 10 | def test_serialize(self) -> None: 11 | """Tests a serialized label are still the same after serializing.""" 12 | label = Label('my_name', (1, 3, 4, 1)) 13 | self.assertEqual(label, Label.deserialize(json.loads(json.dumps(label.serialize())))) 14 | 15 | 16 | if __name__ == '__main__': 17 | unittest.main() 18 | -------------------------------------------------------------------------------- /nuplan/database/utils/pointclouds/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_library( 12 | name = "pointcloud", 13 | srcs = ["pointcloud.py"], 14 | ) 15 | 16 | py_library( 17 | name = "lidar", 18 | srcs = ["lidar.py"], 19 | deps = [ 20 | "//nuplan/database/utils:geometry", 21 | "//nuplan/database/utils:plot", 22 | "//nuplan/database/utils/pointclouds:pointcloud", 23 | requirement("pytest"), 24 | requirement("py"), 25 | requirement("pluggy"), 26 | requirement("iniconfig"), 27 | requirement("matplotlib"), 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /nuplan/database/utils/pointclouds/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/pointclouds/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/pointclouds/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_test( 12 | name = "test_lidar", 13 | size = "small", 14 | srcs = ["test_lidar.py"], 15 | deps = [ 16 | "//nuplan/database/utils/pointclouds:lidar", 17 | requirement("numpy"), 18 | requirement("pyquaternion"), 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /nuplan/database/utils/pointclouds/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/pointclouds/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/database/utils/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/database/utils/tests/__init__.py -------------------------------------------------------------------------------- /nuplan/entrypoint_result_processor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -uox pipefail 4 | 5 | conda run -n nuplan --no-capture-output python -u nuplan/planning/script/run_result_processor_aws.py \ 6 | contestant_id="\"${APPLICANT_ID}\"" \ 7 | submission_id="\"${SUBMISSION_ID}\"" 8 | -------------------------------------------------------------------------------- /nuplan/entrypoint_submission.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -uox pipefail 4 | 5 | [ -d "/mnt/data" ] && cp -r /mnt/data/nuplan-v1.1/maps/* $NUPLAN_MAPS_ROOT 6 | 7 | # Modify `planner=simple_planner` to submit your planner instead. 8 | # For an example of how to write a hydra config, see nuplan/planning/script/config/simulation/planner/simple_planner.yaml. 9 | conda run -n nuplan --no-capture-output python -u nuplan/planning/script/run_submission_planner.py output_dir=/tmp/ planner=simple_planner 10 | -------------------------------------------------------------------------------- /nuplan/planning/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | -------------------------------------------------------------------------------- /nuplan/planning/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/aggregator/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_library( 12 | name = "abstract_metric_aggregator", 13 | srcs = ["abstract_metric_aggregator.py"], 14 | deps = [ 15 | "//nuplan/common/utils:io_utils", 16 | "//nuplan/planning/metrics:metric_dataframe", 17 | requirement("pyarrow"), 18 | requirement("s3fs"), 19 | ], 20 | ) 21 | 22 | py_library( 23 | name = "weighted_average_metric_aggregator", 24 | srcs = ["weighted_average_metric_aggregator.py"], 25 | deps = [ 26 | "//nuplan/common/utils:s3_utils", 27 | "//nuplan/planning/metrics:metric_dataframe", 28 | "//nuplan/planning/metrics/aggregator:abstract_metric_aggregator", 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/aggregator/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/aggregator/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/aggregator/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_library( 12 | name = "mock_abstract_metric_aggregator", 13 | srcs = ["mock_abstract_metric_aggregator.py"], 14 | deps = [ 15 | "//nuplan/planning/metrics:metric_dataframe", 16 | "//nuplan/planning/metrics/aggregator:abstract_metric_aggregator", 17 | requirement("pandas"), 18 | ], 19 | ) 20 | 21 | py_test( 22 | name = "test_weighted_average_metric_aggregator", 23 | srcs = ["test_weighted_average_metric_aggregator.py"], 24 | deps = [ 25 | "//nuplan/planning/metrics:metric_dataframe", 26 | "//nuplan/planning/metrics/aggregator:weighted_average_metric_aggregator", 27 | requirement("pandas"), 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/aggregator/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/aggregator/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/base/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/base/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/base/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_test( 11 | name = "test_violation_metric_base", 12 | srcs = ["test_violation_metric_base.py"], 13 | deps = [ 14 | "//nuplan/planning/metrics:metric_result", 15 | "//nuplan/planning/metrics/evaluation_metrics/base:violation_metric_base", 16 | "//nuplan/planning/scenario_builder/test:mock_abstract_scenario", 17 | ], 18 | ) 19 | 20 | py_test( 21 | name = "test_within_bound_metric_base", 22 | srcs = ["test_within_bound_metric_base.py"], 23 | deps = [ 24 | "//nuplan/planning/metrics/evaluation_metrics/base:within_bound_metric_base", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/base/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/base/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/common/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/common/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_acceleration.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_acceleration import EgoAccelerationStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_acceleration/ego_acceleration.json') 11 | def test_ego_expected_acceleration(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego acceleration by checking if it is the expected acceleration. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoAccelerationStatistics("ego_acceleration_statistics", "Dynamics") 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_expert_l2_error.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_expert_l2_error import EgoExpertL2ErrorStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_expert_l2_error/ego_expert_l2_error.json') 11 | def test_ego_expert_l2_error(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego expert l2 error is expected value. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoExpertL2ErrorStatistics('ego_expert_L2_error', 'Dynamics', discount_factor=1.0) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_jerk.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_jerk import EgoJerkStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_jerk/ego_jerk.json') 11 | def test_ego_jerk(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego jerk statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoJerkStatistics('ego_jerk_statistics', 'Dynamics', max_abs_mag_jerk=7.0) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_lane_change.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_lane_change import EgoLaneChangeStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_lane_change/ego_lane_change.json') 11 | def test_ego_lane_change(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego lane change statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoLaneChangeStatistics('ego_lane_change_statistics', 'Planning', max_fail_rate=0.3) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_lat_acceleration.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_lat_acceleration import EgoLatAccelerationStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_lat_acceleration/ego_lat_acceleration.json') 11 | def test_ego_lateral_acceleration(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego lateral acceleration statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoLatAccelerationStatistics('ego_lat_acceleration_statistics', 'Dynamics', max_abs_lat_accel=10.0) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_lat_jerk.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_lat_jerk import EgoLatJerkStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_lat_jerk/ego_lat_jerk.json') 11 | def test_ego_lateral_jerk(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego lateral jerk statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoLatJerkStatistics('ego_lat_jerk_statistics', 'Dynamics') 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_lon_acceleration.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_lon_acceleration import EgoLonAccelerationStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_lon_acceleration/ego_lon_acceleration.json') 11 | def test_ego_longitudinal_acceleration(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego longitudinal acceleration statistics as expected 14 | :param scene: the json scene. 15 | """ 16 | metric = EgoLonAccelerationStatistics( 17 | 'ego_lon_acceleration_statistics', 'Dynamics', min_lon_accel=0.0, max_lon_accel=10.0 18 | ) 19 | metric_statistic_test(scene=scene, metric=metric) 20 | 21 | 22 | if __name__ == '__main__': 23 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 24 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_lon_jerk.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_lon_jerk import EgoLonJerkStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_lon_jerk/ego_lon_jerk.json') 11 | def test_ego_longitudinal_jerk(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego longitudinal jerk statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoLonJerkStatistics('ego_lon_jerk_statistics', 'Dynamics', max_abs_lon_jerk=8.0) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_mean_speed.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_mean_speed import EgoMeanSpeedStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_mean_speed/ego_mean_speed.json') 11 | def test_ego_mean_speed(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego mean speed statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoMeanSpeedStatistics('ego_lon_jerk_statistics', 'Dynamics') 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_yaw_acceleration.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_yaw_acceleration import EgoYawAccelerationStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_yaw_acceleration/ego_yaw_acceleration.json') 11 | def test_ego_yaw_acceleration(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego yaw acceleration statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoYawAccelerationStatistics('ego_yaw_acceleration_statistics', 'Dynamics', max_abs_yaw_accel=3.0) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/common/test/test_ego_yaw_rate.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | 3 | import pytest 4 | 5 | from nuplan.common.utils.test_utils.nuplan_test import NUPLAN_TEST_PLUGIN, nuplan_test 6 | from nuplan.planning.metrics.evaluation_metrics.common.ego_yaw_rate import EgoYawRateStatistics 7 | from nuplan.planning.metrics.utils.testing_utils import metric_statistic_test 8 | 9 | 10 | @nuplan_test(path='json/ego_yaw_rate/ego_yaw_rate.json') 11 | def test_ego_yaw_rate(scene: Dict[str, Any]) -> None: 12 | """ 13 | Tests ego yaw rate statistics as expected. 14 | :param scene: the json scene 15 | """ 16 | metric = EgoYawRateStatistics('ego_yaw_rate_statistics', 'Dynamics', max_abs_yaw_rate=5.0) 17 | metric_statistic_test(scene=scene, metric=metric) 18 | 19 | 20 | if __name__ == '__main__': 21 | raise SystemExit(pytest.main([__file__], plugins=[NUPLAN_TEST_PLUGIN])) 22 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/scenario_dependent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/scenario_dependent/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/evaluation_metrics/scenario_dependent/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/evaluation_metrics/scenario_dependent/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/metrics/utils/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | filegroup( 11 | name = "test_json", 12 | srcs = glob(["json/**/*.json"]), 13 | visibility = ["//visibility:private"], 14 | ) 15 | 16 | py_test( 17 | name = "test_route_extractor", 18 | size = "small", 19 | srcs = ["test_route_extractor.py"], 20 | data = [":test_json"], 21 | tags = ["integration"], 22 | deps = [ 23 | "//nuplan/common/actor_state:car_footprint", 24 | "//nuplan/common/actor_state:state_representation", 25 | "//nuplan/common/actor_state:vehicle_parameters", 26 | "//nuplan/common/maps/nuplan_map:map_factory", 27 | "//nuplan/common/utils/test_utils:nuplan_test", 28 | "//nuplan/database/tests:test_utils_nuplan_db", 29 | "//nuplan/planning/metrics/utils:route_extractor", 30 | ], 31 | ) 32 | -------------------------------------------------------------------------------- /nuplan/planning/metrics/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/metrics/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/base/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/base/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/base/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/base/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/resource/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | -------------------------------------------------------------------------------- /nuplan/planning/nuboard/resource/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/resource/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/resource/motional_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/resource/motional_logo.png -------------------------------------------------------------------------------- /nuplan/planning/nuboard/tabs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/tabs/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/tabs/config/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_library( 12 | name = "cloud_tab_config", 13 | srcs = ["cloud_tab_config.py"], 14 | deps = [ 15 | requirement("bokeh"), 16 | ], 17 | ) 18 | 19 | py_library( 20 | name = "scenario_tab_config", 21 | srcs = ["scenario_tab_config.py"], 22 | ) 23 | 24 | py_library( 25 | name = "overview_tab_config", 26 | srcs = ["overview_tab_config.py"], 27 | ) 28 | 29 | py_library( 30 | name = "histogram_tab_config", 31 | srcs = ["histogram_tab_config.py"], 32 | deps = [ 33 | "//nuplan/planning/nuboard:style", 34 | requirement("bokeh"), 35 | requirement("numpy"), 36 | ], 37 | ) 38 | -------------------------------------------------------------------------------- /nuplan/planning/nuboard/tabs/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/tabs/config/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/tabs/js_code/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_library( 11 | name = "cloud_tab_js_code", 12 | srcs = ["cloud_tab_js_code.py"], 13 | ) 14 | 15 | py_library( 16 | name = "scenario_tab_js_code", 17 | srcs = ["scenario_tab_js_code.py"], 18 | ) 19 | 20 | py_library( 21 | name = "histogram_tab_js_code", 22 | srcs = ["histogram_tab_js_code.py"], 23 | ) 24 | -------------------------------------------------------------------------------- /nuplan/planning/nuboard/tabs/js_code/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/tabs/js_code/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/tabs/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/tabs/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "__init__", 8 | srcs = ["__init__.py"], 9 | ) 10 | 11 | py_test( 12 | name = "test_nuboard", 13 | size = "medium", 14 | srcs = ["test_nuboard.py"], 15 | tags = ["integration"], 16 | deps = [ 17 | "//nuplan/common/actor_state:vehicle_parameters", 18 | "//nuplan/planning/nuboard", 19 | "//nuplan/planning/nuboard/base:data_class", 20 | "//nuplan/planning/scenario_builder/test:mock_abstract_scenario_builder", 21 | requirement("hypothesis"), 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /nuplan/planning/nuboard/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/nuboard/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/nuboard/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/cache/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "cached_scenario", 7 | srcs = ["cached_scenario.py"], 8 | deps = [ 9 | "//nuplan/common/actor_state:ego_state", 10 | "//nuplan/common/actor_state:state_representation", 11 | "//nuplan/common/actor_state:vehicle_parameters", 12 | "//nuplan/common/maps:maps_datatypes", 13 | "//nuplan/planning/scenario_builder:abstract_scenario", 14 | "//nuplan/planning/simulation/observation:observation_type", 15 | "//nuplan/planning/simulation/trajectory:trajectory_sampling", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/cache/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/cache/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/cache/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | py_test( 4 | name = "test_cached_scenario", 5 | size = "small", 6 | srcs = ["test_cached_scenario.py"], 7 | deps = [ 8 | "//nuplan/planning/scenario_builder/cache:cached_scenario", 9 | ], 10 | ) 11 | -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/cache/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/cache/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/nuplan_db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/nuplan_db/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/nuplan_db/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/nuplan_db/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/test/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_mock_abstract_scenario", 7 | size = "small", 8 | srcs = ["test_mock_abstract_scenario.py"], 9 | deps = [ 10 | "//nuplan/common/utils/test_utils:interface_validation", 11 | "//nuplan/planning/scenario_builder:abstract_scenario", 12 | "//nuplan/planning/scenario_builder/test:mock_abstract_scenario", 13 | ], 14 | ) 15 | 16 | py_test( 17 | name = "test_mock_abstract_scenario_builder", 18 | size = "small", 19 | srcs = ["test_mock_abstract_scenario_builder.py"], 20 | deps = [ 21 | "//nuplan/common/utils/test_utils:interface_validation", 22 | "//nuplan/planning/scenario_builder:abstract_scenario_builder", 23 | "//nuplan/planning/scenario_builder/test:mock_abstract_scenario_builder", 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/test/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/scenario_builder/test/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/test/test/test_mock_abstract_scenario.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.common.utils.test_utils.interface_validation import assert_class_properly_implements_interface 4 | from nuplan.planning.scenario_builder.abstract_scenario import AbstractScenario 5 | from nuplan.planning.scenario_builder.test.mock_abstract_scenario import MockAbstractScenario 6 | 7 | 8 | class TestMockAbstractScenario(unittest.TestCase): 9 | """ 10 | A class to test the MockAbstractScenario utility class. 11 | """ 12 | 13 | def test_mock_abstract_scenario_implements_abstract_scenario(self) -> None: 14 | """ 15 | Tests that the mock abstract scenario class properly implements the interface. 16 | """ 17 | assert_class_properly_implements_interface(AbstractScenario, MockAbstractScenario) 18 | 19 | 20 | if __name__ == "__main__": 21 | unittest.main() 22 | -------------------------------------------------------------------------------- /nuplan/planning/scenario_builder/test/test/test_mock_abstract_scenario_builder.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.common.utils.test_utils.interface_validation import assert_class_properly_implements_interface 4 | from nuplan.planning.scenario_builder.abstract_scenario_builder import AbstractScenarioBuilder 5 | from nuplan.planning.scenario_builder.test.mock_abstract_scenario_builder import MockAbstractScenarioBuilder 6 | 7 | 8 | class TestMockAbstractScenarioBuilder(unittest.TestCase): 9 | """ 10 | A class to test the MockAbstractScenarioBuilder utility class. 11 | """ 12 | 13 | def test_mock_abstract_scenario_builder_implements_abstract_scenario_builder(self) -> None: 14 | """ 15 | Tests that the mock abstract scenario builder class properly implements the interface. 16 | """ 17 | assert_class_properly_implements_interface(AbstractScenarioBuilder, MockAbstractScenarioBuilder) 18 | 19 | 20 | if __name__ == "__main__": 21 | unittest.main() 22 | -------------------------------------------------------------------------------- /nuplan/planning/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/builders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/builders/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/builders/data_augmentation_builder.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from typing import List 3 | 4 | from hydra.utils import instantiate 5 | from omegaconf import DictConfig 6 | 7 | from nuplan.planning.script.builders.utils.utils_type import validate_type 8 | from nuplan.planning.training.data_augmentation.abstract_data_augmentation import AbstractAugmentor 9 | 10 | logger = logging.getLogger(__name__) 11 | 12 | 13 | def build_agent_augmentor(cfg: DictConfig) -> List[AbstractAugmentor]: 14 | """ 15 | Build list of augmentors based on config. 16 | :param cfg: Dict config. 17 | :return List of augmentor objects. 18 | """ 19 | logger.info('Building augmentors...') 20 | 21 | instantiated_augmentors = [] 22 | 23 | for augmentor_type in cfg.values(): 24 | augmentor: AbstractAugmentor = instantiate(augmentor_type) 25 | validate_type(augmentor, AbstractAugmentor) 26 | instantiated_augmentors.append(augmentor) 27 | 28 | logger.info('Building augmentors...DONE!') 29 | 30 | return instantiated_augmentors 31 | -------------------------------------------------------------------------------- /nuplan/planning/script/builders/model_builder.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from hydra.utils import instantiate 4 | from omegaconf import DictConfig 5 | 6 | from nuplan.planning.script.builders.utils.utils_type import validate_type 7 | from nuplan.planning.training.modeling.torch_module_wrapper import TorchModuleWrapper 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | 12 | def build_torch_module_wrapper(cfg: DictConfig) -> TorchModuleWrapper: 13 | """ 14 | Builds the NN module. 15 | :param cfg: DictConfig. Configuration that is used to run the experiment. 16 | :return: Instance of TorchModuleWrapper. 17 | """ 18 | logger.info('Building TorchModuleWrapper...') 19 | model = instantiate(cfg) 20 | validate_type(model, TorchModuleWrapper) 21 | logger.info('Building TorchModuleWrapper...DONE!') 22 | 23 | return model 24 | -------------------------------------------------------------------------------- /nuplan/planning/script/builders/scenario_building_builder.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from hydra.utils import instantiate 4 | from omegaconf import DictConfig 5 | 6 | from nuplan.planning.scenario_builder.abstract_scenario_builder import AbstractScenarioBuilder 7 | from nuplan.planning.script.builders.utils.utils_type import validate_type 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | 12 | def build_scenario_builder(cfg: DictConfig) -> AbstractScenarioBuilder: 13 | """ 14 | Builds scenario builder. 15 | :param cfg: DictConfig. Configuration that is used to run the experiment. 16 | :return: Instance of scenario builder. 17 | """ 18 | logger.info('Building AbstractScenarioBuilder...') 19 | scenario_builder = instantiate(cfg.scenario_builder) 20 | validate_type(scenario_builder, AbstractScenarioBuilder) 21 | logger.info('Building AbstractScenarioBuilder...DONE!') 22 | return scenario_builder 23 | -------------------------------------------------------------------------------- /nuplan/planning/script/builders/splitter_builder.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from hydra.utils import instantiate 4 | from omegaconf import DictConfig 5 | 6 | from nuplan.planning.script.builders.utils.utils_type import validate_type 7 | from nuplan.planning.training.data_loader.splitter import AbstractSplitter 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | 12 | def build_splitter(cfg: DictConfig) -> AbstractSplitter: 13 | """ 14 | Build the splitter. 15 | :param cfg: DictConfig. Configuration that is used to run the experiment. 16 | :return: Instance of Splitter. 17 | """ 18 | logger.info('Building Splitter...') 19 | splitter: AbstractSplitter = instantiate(cfg) 20 | validate_type(splitter, AbstractSplitter) 21 | logger.info('Building Splitter...DONE!') 22 | return splitter 23 | -------------------------------------------------------------------------------- /nuplan/planning/script/builders/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/builders/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/builders/training_metrics_builder.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from typing import List 3 | 4 | from hydra.utils import instantiate 5 | from omegaconf import DictConfig 6 | 7 | from nuplan.planning.script.builders.utils.utils_type import validate_type 8 | from nuplan.planning.training.modeling.metrics.abstract_training_metric import AbstractTrainingMetric 9 | 10 | logger = logging.getLogger(__name__) 11 | 12 | 13 | def build_training_metrics(cfg: DictConfig) -> List[AbstractTrainingMetric]: 14 | """ 15 | Build metrics based on config 16 | :param cfg: config 17 | :return list of metrics. 18 | """ 19 | instantiated_metrics = [] 20 | for metric_name, cfg_metric in cfg.training_metric.items(): 21 | new_metric: AbstractTrainingMetric = instantiate(cfg_metric) 22 | validate_type(new_metric, AbstractTrainingMetric) 23 | instantiated_metrics.append(new_metric) 24 | return instantiated_metrics 25 | -------------------------------------------------------------------------------- /nuplan/planning/script/builders/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/builders/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/builders/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/builders/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/builders/worker_pool_builder.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from hydra.utils import instantiate 4 | from omegaconf import DictConfig 5 | 6 | from nuplan.planning.script.builders.utils.utils_type import is_target_type, validate_type 7 | from nuplan.planning.utils.multithreading.worker_pool import WorkerPool 8 | from nuplan.planning.utils.multithreading.worker_ray import RayDistributed 9 | 10 | logger = logging.getLogger(__name__) 11 | 12 | 13 | def build_worker(cfg: DictConfig) -> WorkerPool: 14 | """ 15 | Builds the worker. 16 | :param cfg: DictConfig. Configuration that is used to run the experiment. 17 | :return: Instance of WorkerPool. 18 | """ 19 | logger.info('Building WorkerPool...') 20 | worker: WorkerPool = ( 21 | instantiate(cfg.worker, output_dir=cfg.output_dir) 22 | if is_target_type(cfg.worker, RayDistributed) 23 | else instantiate(cfg.worker) 24 | ) 25 | validate_type(worker, WorkerPool) 26 | 27 | logger.info('Building WorkerPool...DONE!') 28 | return worker 29 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/config/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/config/common/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/default_common.yaml: -------------------------------------------------------------------------------- 1 | # Default common configs 2 | 3 | defaults: 4 | # Add common items 5 | - scenario_builder: nuplan_mini 6 | - scenario_filter: one_continuous_log 7 | - model: null 8 | # Worker that is used to run simulations 9 | - worker: ray_distributed 10 | 11 | distribute_by_scenario: true 12 | 13 | distributed_timeout_seconds: 7200 # Sets how long to wait while synchronizing across worker nodes in a distributed context. 14 | 15 | selected_simulation_metrics: null 16 | 17 | # Sets verbosity level, in particular determines if progress bars are shown or not. 18 | verbose: false 19 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/default_submission.yaml: -------------------------------------------------------------------------------- 1 | contestant_id: null 2 | submission_id: null 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/model/simple_vector_model.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.training.modeling.models.simple_vector_map_model.VectorMapSimpleMLP 2 | _convert_: 'all' 3 | 4 | # Model Setup 5 | hidden_size: 128 6 | num_output_features: 48 7 | 8 | # VectorMapFeatureBuilder 9 | vector_map_feature_radius: 20 # [m] The query radius scope relative to the current ego-pose. 10 | 11 | # Parameters for past trajectory 12 | past_trajectory_sampling: 13 | _target_: nuplan.planning.simulation.trajectory.trajectory_sampling.TrajectorySampling 14 | _convert_: 'all' 15 | num_poses: 4 # target future poses 16 | time_horizon: 1.5 # [s] time horizon of future poses 17 | 18 | # Parameters for predicted trajectory 19 | future_trajectory_sampling: 20 | _target_: nuplan.planning.simulation.trajectory.trajectory_sampling.TrajectorySampling 21 | _convert_: 'all' 22 | num_poses: 16 # target future poses 23 | time_horizon: 8.0 # [s] time horizon of future poses 24 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/scenario_builder/mock_abstract_scenario_builder.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.scenario_builder.test.mock_abstract_scenario_builder.MockAbstractScenarioBuilder 2 | _convert_: 'all' 3 | 4 | num_scenarios: 5 # The number of scenarios to return from get_scenarios() 5 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/scenario_builder/nuplan.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario_builder.NuPlanScenarioBuilder 2 | _convert_: 'all' 3 | 4 | data_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/splits/trainval 5 | map_root: ${oc.env:NUPLAN_MAPS_ROOT} 6 | sensor_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/sensor_blobs 7 | 8 | db_files: null # if db file(s) exist locally, the data_root is ignored 9 | 10 | map_version: nuplan-maps-v1.0 11 | 12 | include_cameras: false # Include camera data in the scenarios. 13 | 14 | max_workers: null 15 | verbose: ${verbose} 16 | 17 | defaults: 18 | - vehicle_parameters: nuplan_vehicle_parameters 19 | - scenario_mapping: nuplan_scenario_mapping 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/scenario_builder/nuplan_challenge.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario_builder.NuPlanScenarioBuilder 2 | _convert_: 'all' 3 | 4 | data_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/splits/test/ 5 | map_root: ${oc.env:NUPLAN_MAPS_ROOT} 6 | sensor_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/sensor_blobs 7 | 8 | db_files: null # if db file(s) exist locally, the data_root is ignored 9 | 10 | map_version: nuplan-maps-v1.0 11 | 12 | include_cameras: false # Include camera data in the scenarios. 13 | 14 | max_workers: null 15 | verbose: ${verbose} 16 | 17 | defaults: 18 | - vehicle_parameters: nuplan_vehicle_parameters 19 | - scenario_mapping: nuplan_challenge_scenario_mapping 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/scenario_builder/nuplan_mini.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario_builder.NuPlanScenarioBuilder 2 | _convert_: 'all' 3 | 4 | data_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/splits/mini 5 | map_root: ${oc.env:NUPLAN_MAPS_ROOT} 6 | sensor_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/sensor_blobs 7 | 8 | db_files: null # if db file(s) exist locally, the data_root is ignored 9 | 10 | map_version: nuplan-maps-v1.0 11 | 12 | include_cameras: false # Include camera data in the scenarios. 13 | 14 | max_workers: null 15 | verbose: ${verbose} 16 | 17 | defaults: 18 | - vehicle_parameters: nuplan_vehicle_parameters 19 | - scenario_mapping: nuplan_scenario_mapping 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/scenario_builder/vehicle_parameters/nuplan_vehicle_parameters.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.common.actor_state.vehicle_parameters.VehicleParameters 2 | _convert_: 'all' 3 | width: 2.297 4 | front_length: 4.049 5 | rear_length: 1.127 6 | cog_position_from_rear_axle: 1.67 7 | height: 1.777 8 | wheel_base: 3.089 9 | vehicle_name: "pacifica" 10 | vehicle_type: "gen1" 11 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/common_metrics.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - low_level: 3 | - ego_mean_speed_statistics 4 | - ego_expert_l2_error_statistics 5 | - ego_expert_l2_error_with_yaw_statistics 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/default_metrics.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - common_metrics 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/ego_in_stop_line/ego_stop_at_stop_line_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_stop_at_stop_line_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.scenario_dependent.ego_stop_at_stop_line.EgoStopAtStopLineStatistics 3 | _convert_: 'all' 4 | name: 'ego_stop_at_stop_line' 5 | category: 'Scenario dependent' 6 | distance_threshold: 5.0 # m 7 | velocity_threshold: 0.1 # m/s^2 8 | max_violation_threshold: 0 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/drivable_area_compliance_statistics.yaml: -------------------------------------------------------------------------------- 1 | drivable_area_compliance_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.drivable_area_compliance.DrivableAreaComplianceStatistics 3 | _convert_: 'all' 4 | name: 'drivable_area_compliance' 5 | category: 'Planning' 6 | metric_score_unit: 'bool' 7 | 8 | max_violation_threshold: 0.3 # The violatation tolerance threshold in meters 9 | 10 | required_metrics: 11 | # Parameter: base metric name and other high level metrics used in this metric 12 | lane_change_metric: ego_lane_change_statistics 13 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/driving_direction_compliance_statistics.yaml: -------------------------------------------------------------------------------- 1 | driving_direction_compliance_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.driving_direction_compliance.DrivingDirectionComplianceStatistics 3 | _convert_: 'all' 4 | name: 'driving_direction_compliance' 5 | category: 'Planning' 6 | metric_score_unit: 'bool' 7 | 8 | driving_direction_compliance_threshold: 2 # [m] Driving in opposite direction up to this threshold isn't considered violation 9 | driving_direction_violation_threshold: 6 # [m] Driving in opposite direction above this threshold isn't tolerated 10 | time_horizon: 1 # [s] time horizon in which movement of the vehicle along baseline direction is computed. 11 | 12 | required_metrics: 13 | # Parameter: base metric name and other high level metrics used in this metric 14 | lane_change_metric: ego_lane_change_statistics 15 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/ego_is_comfortable_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_is_comfortable_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_is_comfortable.EgoIsComfortableStatistics 3 | _convert_: 'all' 4 | name: 'ego_is_comfortable' 5 | category: 'Violations' 6 | metric_score_unit: 'bool' 7 | 8 | required_metrics: 9 | # Parameter: base metric name 10 | ego_jerk_metric: ego_jerk_statistics 11 | ego_lat_acceleration_metric: ego_lat_acceleration_statistics 12 | ego_lon_acceleration_metric: ego_lon_acceleration_statistics 13 | ego_lon_jerk_metric: ego_lon_jerk_statistics 14 | ego_yaw_acceleration_metric: ego_yaw_acceleration_statistics 15 | ego_yaw_rate_metric: ego_yaw_rate_statistics 16 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/ego_is_making_progress_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_is_making_progress_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_is_making_progress.EgoIsMakingProgressStatistics 3 | _convert_: 'all' 4 | name: 'ego_is_making_progress' 5 | category: 'Planning' 6 | metric_score_unit: 'bool' 7 | min_progress_threshold: 0.2 8 | 9 | required_metrics: 10 | # Parameter: base metric name and other high level metrics used in this metric 11 | ego_progress_along_expert_route_metric: ego_progress_along_expert_route_statistics 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/no_ego_at_fault_collisions_statistics.yaml: -------------------------------------------------------------------------------- 1 | no_ego_at_fault_collisions_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.no_ego_at_fault_collisions.EgoAtFaultCollisionStatistics 3 | _convert_: 'all' 4 | name: 'no_ego_at_fault_collisions' 5 | category: 'Dynamics' 6 | metric_score_unit: 'float' 7 | 8 | max_violation_threshold_vru: 0 9 | max_violation_threshold_vehicle: 0 10 | max_violation_threshold_object: 1 11 | 12 | required_metrics: 13 | # Parameter: base metric name and other high level metrics used in this metric 14 | ego_lane_change_metric: ego_lane_change_statistics 15 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/planner_expert_average_heading_error_within_bound_statistics.yaml: -------------------------------------------------------------------------------- 1 | planner_expert_average_heading_error_within_bound_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.planner_expert_average_heading_error_within_bound.PlannerExpertAverageHeadingErrorStatistics 3 | _convert_: 'all' 4 | name: 'planner_expert_average_heading_error_within_bound' 5 | category: 'Planning' 6 | metric_score_unit: 'float' 7 | max_average_heading_error_threshold: 0.8 #radian 8 | 9 | required_metrics: 10 | # Parameter: base metric name and other high level metrics used in this metric 11 | planner_expert_average_l2_error_within_bound_metric: planner_expert_average_l2_error_within_bound_statistics 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/planner_expert_final_heading_error_within_bound_statistics.yaml: -------------------------------------------------------------------------------- 1 | planner_expert_final_heading_error_within_bound_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.planner_expert_final_heading_error_within_bound.PlannerExpertFinalHeadingErrorStatistics 3 | _convert_: 'all' 4 | name: 'planner_expert_final_heading_error_within_bound' 5 | category: 'Planning' 6 | metric_score_unit: 'float' 7 | max_final_heading_error_threshold: 0.8 #radian 8 | 9 | required_metrics: 10 | # Parameter: base metric name and other high level metrics used in this metric 11 | planner_expert_average_l2_error_within_bound_metric: planner_expert_average_l2_error_within_bound_statistics 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/planner_expert_final_l2_error_within_bound_statistics.yaml: -------------------------------------------------------------------------------- 1 | planner_expert_final_l2_error_within_bound_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.planner_expert_final_l2_error_within_bound.PlannerExpertFinalL2ErrorStatistics 3 | _convert_: 'all' 4 | name: 'planner_expert_final_l2_error_within_bound' 5 | category: 'Planning' 6 | metric_score_unit: 'float' 7 | max_final_l2_error_threshold: 8 #meter 8 | 9 | required_metrics: 10 | # Parameter: base metric name and other high level metrics used in this metric 11 | planner_expert_average_l2_error_within_bound_metric: planner_expert_average_l2_error_within_bound_statistics 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/planner_miss_rate_within_bound_statistics.yaml: -------------------------------------------------------------------------------- 1 | planner_miss_rate_within_bound_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.planner_miss_rate_within_bound.PlannerMissRateStatistics 3 | _convert_: 'all' 4 | name: 'planner_miss_rate_within_bound' 5 | category: 'Planning' 6 | metric_score_unit: 'bool' 7 | 8 | max_displacement_threshold: [6.0, 8.0, 16.0] #meter 9 | max_miss_rate_threshold: 0.3 10 | 11 | required_metrics: 12 | # Parameter: base metric name and other high level metrics used in this metric 13 | planner_expert_average_l2_error_within_bound_metric: planner_expert_average_l2_error_within_bound_statistics 14 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/speed_limit_compliance_statistics.yaml: -------------------------------------------------------------------------------- 1 | speed_limit_compliance_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.speed_limit_compliance.SpeedLimitComplianceStatistics 3 | _convert_: 'all' 4 | name: 'speed_limit_compliance' 5 | category: 'Violations' 6 | metric_score_unit: 'float' 7 | max_violation_threshold: 1.0 8 | max_overspeed_value_threshold: 2.23 9 | 10 | required_metrics: 11 | # Parameter: base metric name and other high level metrics used in this metric 12 | lane_change_metric: ego_lane_change_statistics 13 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/high_level/time_to_collision_within_bound_statistics.yaml: -------------------------------------------------------------------------------- 1 | time_to_collision_within_bound_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.time_to_collision_within_bound.TimeToCollisionStatistics 3 | _convert_: 'all' 4 | name: 'time_to_collision_within_bound' 5 | category: 'Planning' 6 | metric_score_unit: 'bool' 7 | 8 | time_step_size: 0.1 9 | time_horizon: 3.0 10 | least_min_ttc: 0.95 11 | 12 | required_metrics: 13 | # Parameter: base metric name and other high level metrics used in this metric 14 | ego_lane_change_metric: ego_lane_change_statistics 15 | no_ego_at_fault_collisions_metric: no_ego_at_fault_collisions_statistics 16 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_acceleration_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_acceleration_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_acceleration.EgoAccelerationStatistics 3 | _convert_: 'all' 4 | name: 'ego_acceleration' 5 | category: 'Dynamics' 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_expert_l2_error_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_expert_l2_error_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_expert_l2_error.EgoExpertL2ErrorStatistics 3 | _convert_: 'all' 4 | name: 'ego_expert_L2_error' 5 | category: 'Planning' 6 | discount_factor: 1 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_expert_l2_error_with_yaw_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_expert_l2_error_with_yaw_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_expert_l2_error_with_yaw.EgoExpertL2ErrorWithYawStatistics 3 | _convert_: 'all' 4 | name: 'ego_expert_l2_error_with_yaw' 5 | category: 'Planning' 6 | discount_factor: 1 7 | heading_diff_weight: 2.5 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_jerk_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_jerk_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_jerk.EgoJerkStatistics 3 | _convert_: 'all' 4 | name: 'ego_jerk' 5 | category: 'Dynamics' 6 | 7 | max_abs_mag_jerk: 8.37 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_lane_change_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_lane_change_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_lane_change.EgoLaneChangeStatistics 3 | _convert_: 'all' 4 | name: 'ego_lane_change' 5 | category: 'Planning' 6 | max_fail_rate: 0.3 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_lat_acceleration_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_lat_acceleration_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_lat_acceleration.EgoLatAccelerationStatistics 3 | _convert_: 'all' 4 | name: 'ego_lat_acceleration' 5 | category: 'Dynamics' 6 | 7 | max_abs_lat_accel: 4.89 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_lat_jerk_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_lat_jerk_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_lat_jerk.EgoLatJerkStatistics 3 | _convert_: 'all' 4 | name: 'ego_lat_jerk' 5 | category: 'Dynamics' 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_lon_acceleration_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_lon_acceleration_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_lon_acceleration.EgoLonAccelerationStatistics 3 | _convert_: 'all' 4 | name: 'ego_lon_acceleration' 5 | category: 'Dynamics' 6 | 7 | min_lon_accel: -4.05 8 | max_lon_accel: 2.40 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_lon_jerk_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_lon_jerk_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_lon_jerk.EgoLonJerkStatistics 3 | _convert_: 'all' 4 | name: 'ego_lon_jerk' 5 | category: 'Dynamics' 6 | 7 | max_abs_lon_jerk: 4.13 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_mean_speed_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_mean_speed_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_mean_speed.EgoMeanSpeedStatistics 3 | _convert_: 'all' 4 | name: 'ego_mean_speed' 5 | category: 'Dynamics' 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_progress_along_expert_route_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_progress_along_expert_route_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_progress_along_expert_route.EgoProgressAlongExpertRouteStatistics 3 | _convert_: 'all' 4 | name: 'ego_progress_along_expert_route' 5 | category: 'Planning' 6 | score_progress_threshold: 2 # [m] 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_yaw_acceleration_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_yaw_acceleration_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_yaw_acceleration.EgoYawAccelerationStatistics 3 | _convert_: 'all' 4 | name: 'ego_yaw_acceleration' 5 | category: 'Dynamics' 6 | 7 | max_abs_yaw_accel: 1.93 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/ego_yaw_rate_statistics.yaml: -------------------------------------------------------------------------------- 1 | ego_yaw_rate_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.ego_yaw_rate.EgoYawRateStatistics 3 | _convert_: 'all' 4 | name: 'ego_yaw_rate' 5 | category: 'Dynamics' 6 | 7 | max_abs_yaw_rate: 0.95 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/low_level/planner_expert_average_l2_error_within_bound_statistics.yaml: -------------------------------------------------------------------------------- 1 | planner_expert_average_l2_error_within_bound_statistics: 2 | _target_: nuplan.planning.metrics.evaluation_metrics.common.planner_expert_average_l2_error_within_bound.PlannerExpertAverageL2ErrorStatistics 3 | _convert_: 'all' 4 | name: 'planner_expert_average_l2_error_within_bound' 5 | category: 'Planning' 6 | metric_score_unit: 'float' 7 | comparison_horizon: [3, 5, 8] #seconds 8 | comparison_frequency: 1 #Hz 9 | max_average_l2_error_threshold: 8 #meter 10 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/simulation_closed_loop_nonreactive_agents.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | # - common_metrics # Uncomment this for common information about the scenario as specified in the config 3 | - low_level: # Low level metrics 4 | - ego_lane_change_statistics 5 | - ego_jerk_statistics 6 | - ego_lat_acceleration_statistics 7 | - ego_lon_acceleration_statistics 8 | - ego_lon_jerk_statistics 9 | - ego_yaw_acceleration_statistics 10 | - ego_yaw_rate_statistics 11 | - ego_progress_along_expert_route_statistics 12 | - high_level: # High level metrics that depend on low level metrics, they can also rely on the previously called high level metrics 13 | - drivable_area_compliance_statistics 14 | - no_ego_at_fault_collisions_statistics 15 | - time_to_collision_within_bound_statistics 16 | - speed_limit_compliance_statistics 17 | - ego_is_comfortable_statistics 18 | - ego_is_making_progress_statistics 19 | - driving_direction_compliance_statistics 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/simulation_closed_loop_reactive_agents.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | # - common_metrics # Uncomment this for common information about the scenario as specified in the config 3 | - low_level: # Low level metrics 4 | - ego_lane_change_statistics 5 | - ego_jerk_statistics 6 | - ego_lat_acceleration_statistics 7 | - ego_lon_acceleration_statistics 8 | - ego_lon_jerk_statistics 9 | - ego_yaw_acceleration_statistics 10 | - ego_yaw_rate_statistics 11 | - ego_progress_along_expert_route_statistics 12 | - high_level: # High level metrics that depend on low level metrics, they can also rely on the previously called high level metrics 13 | - drivable_area_compliance_statistics 14 | - no_ego_at_fault_collisions_statistics 15 | - time_to_collision_within_bound_statistics 16 | - speed_limit_compliance_statistics 17 | - ego_is_comfortable_statistics 18 | - ego_is_making_progress_statistics 19 | - driving_direction_compliance_statistics 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/simulation_metric/simulation_open_loop_boxes.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | # - common_metrics # Uncomment this for common information about the scenario as specified in the config 3 | - low_level: # Low level metrics 4 | - planner_expert_average_l2_error_within_bound_statistics 5 | - high_level: # High level metrics that depend on low level metrics, they can also rely on the previously called high level metrics 6 | - planner_expert_final_l2_error_within_bound_statistics 7 | - planner_miss_rate_within_bound_statistics 8 | - planner_expert_final_heading_error_within_bound_statistics 9 | - planner_expert_average_heading_error_within_bound_statistics 10 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/worker/ray_distributed.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.utils.multithreading.worker_ray.RayDistributed 2 | _convert_: 'all' 3 | master_node_ip: null # Set to a master node IP if you desire to connect to cluster remotely 4 | threads_per_node: null # Number of CPU threads to use per node, "null" means all threads available 5 | debug_mode: false # If true all tasks will be executed serially, mainly for testing 6 | log_to_driver: true # If true, all printouts from ray threads will be displayed in driver 7 | logs_subdir: 'logs' # Subdirectory to store logs inside the experiment directory 8 | use_distributed: false # Whether to use the built-in distributed mode of ray 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/worker/sequential.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.utils.multithreading.worker_sequential.Sequential 2 | _convert_: 'all' 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/common/worker/single_machine_thread_pool.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.utils.multithreading.worker_parallel.SingleMachineParallelExecutor 2 | _convert_: 'all' 3 | use_process_pool: False # If true, use ProcessPoolExecutor as the backend, otherwise uses ThreadPoolExecutor 4 | max_workers: null # Number of CPU workers (threads/processes) to use per node, "null" means all available 5 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/nuboard/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/config/nuboard/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/config/simulation/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/callback/serialization_callback.yaml: -------------------------------------------------------------------------------- 1 | serialization_callback: 2 | _target_: nuplan.planning.simulation.callback.serialization_callback.SerializationCallback 3 | _convert_: 'all' 4 | 5 | folder_name: simulation # Name of a folder in which the serialization will take place 6 | serialize_into_single_file: false # If true, the output will be a single file, if False, the data will be serialized 7 | # into one file per time step 8 | serialization_type: "json" # A way to serialize output, options: ["json", "pickle", "msgpack"] 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/callback/simulation_log_callback.yaml: -------------------------------------------------------------------------------- 1 | simulation_log_callback: 2 | _target_: nuplan.planning.simulation.callback.simulation_log_callback.SimulationLogCallback 3 | _convert_: 'all' 4 | 5 | output_directory: ${output_dir} 6 | simulation_log_dir: simulation_log # Simulation log dir 7 | serialization_type: "msgpack" # A way to serialize output, options: ["pickle", "msgpack"] 8 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/callback/timing_callback.yaml: -------------------------------------------------------------------------------- 1 | timing_callback: 2 | _target_: nuplan.planning.simulation.callback.timing_callback.TimingCallback 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/default_submission_planner.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | run: 3 | dir: ${output_dir} 4 | output_subdir: ${output_dir}/code/hydra # Store hydra's config breakdown here for debugging 5 | searchpath: # Only in these paths are discoverable 6 | - pkg://nuplan.planning.script.config.common 7 | - pkg://nuplan.planning.script.experiments # Put experiments configs in script/experiments/ 8 | 9 | defaults: 10 | - model: null 11 | - planner: ??? 12 | - override hydra/job_logging: none # Disable hydra's logging 13 | - override hydra/hydra_logging: none # Disable hydra's logging 14 | 15 | output_dir: ??? 16 | seed: 0 17 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/ego_controller/log_play_back_controller.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.controller.log_playback.LogPlaybackController 2 | _convert_: 'all' 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/ego_controller/motion_model/kinematic_bicycle_model.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.controller.motion_model.kinematic_bicycle.KinematicBicycleModel 2 | _convert_: 'all' 3 | 4 | vehicle: ${scenario_builder.vehicle_parameters} 5 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/ego_controller/perfect_tracking_controller.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.controller.perfect_tracking.PerfectTrackingController 2 | _convert_: 'all' 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/ego_controller/two_stage_controller.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.controller.two_stage_controller.TwoStageController 2 | _convert_: 'all' 3 | 4 | defaults: 5 | - tracker: lqr_tracker 6 | - motion_model: kinematic_bicycle_model 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/main_callback/completion_callback.yaml: -------------------------------------------------------------------------------- 1 | completion_callback: 2 | _target_: nuplan.planning.simulation.main_callback.completion_callback.CompletionCallback 3 | _convert_: 'all' 4 | 5 | output_dir: ${output_dir} 6 | challenge_name: ${job_name} 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/main_callback/metric_aggregator_callback.yaml: -------------------------------------------------------------------------------- 1 | metric_aggregator_callback: 2 | _target_: nuplan.planning.simulation.main_callback.metric_aggregator_callback.MetricAggregatorCallback 3 | _convert_: 'all' 4 | 5 | metric_save_path: ${output_dir}/${metric_dir} # Path of a folder in which the metrics are saved 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/main_callback/metric_file_callback.yaml: -------------------------------------------------------------------------------- 1 | metric_file_callback: 2 | _target_: nuplan.planning.simulation.main_callback.metric_file_callback.MetricFileCallback 3 | _convert_: 'all' 4 | 5 | metric_file_output_path: ${output_dir}/${metric_dir} # Path to save metric files 6 | scenario_metric_paths: # A list of paths in which scenario metrics are saved 7 | - ${output_dir}/${metric_dir} 8 | delete_scenario_metric_files: True # Delete previous scenario metric files 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/main_callback/metric_summary_callback.yaml: -------------------------------------------------------------------------------- 1 | metric_summary_callback: 2 | _target_: nuplan.planning.simulation.main_callback.metric_summary_callback.MetricSummaryCallback 3 | _convert_: 'all' 4 | 5 | metric_save_path: ${output_dir}/${metric_dir} # Path to saved metric files 6 | metric_aggregator_save_path: ${aggregator_save_path} # Path to saved aggregated files 7 | summary_output_path: ${output_dir}/summary 8 | num_bins: 20 9 | pdf_file_name: 'summary.pdf' 10 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/main_callback/time_callback.yaml: -------------------------------------------------------------------------------- 1 | time_callback: 2 | _target_: nuplan.planning.simulation.main_callback.time_callback.TimeCallback 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/main_callback/validation_callback.yaml: -------------------------------------------------------------------------------- 1 | validation_callback: 2 | _target_: nuplan.planning.simulation.main_callback.validation_callback.ValidationCallback 3 | _convert_: 'all' 4 | 5 | output_dir: ${output_dir} 6 | validation_dir_name: 'validation-results' 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/metric_aggregator/default_weighted_average.yaml: -------------------------------------------------------------------------------- 1 | weighted_average_metric_aggregator: 2 | _target_: nuplan.planning.metrics.aggregator.weighted_average_metric_aggregator.WeightedAverageMetricAggregator 3 | name: 'weighted_average_metric_aggregator' 4 | metric_weights: # Below we list the metrics used in the scenario scoring function and their corresponsing weights to calculate a weighted average score for each scenario, 5 | # if not specified, the weight is set as default. 6 | # metric name : metric weight in the weighted average function 7 | default: 1.0 8 | file_name: weighted_average_metrics_${now:${date_format}} 9 | # The scenario score is defined as the weighted average score of the metrics listed above, multiplied by the score of the multiple_metrics below. 10 | multiple_metrics: null 11 | challenge_name: null 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/observation/box_observation.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.observation.tracks_observation.TracksObservation 2 | _convert_: 'all' 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/observation/ego_centric_ml_agents_observation.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.observation.ego_centric_ml_agents.EgoCentricMLAgents 2 | _convert_: 'all' 3 | 4 | model_config: ??? # Dictionary key from existing planner model config (e.g. reactive_agents_model) 5 | checkpoint_path: ??? # Path to trained model checkpoint 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/observation/idm_agents_observation.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.observation.idm_agents.IDMAgents 2 | _convert_: 'all' 3 | target_velocity: 10 # Desired velocity in free traffic [m/s] 4 | min_gap_to_lead_agent: 1.0 # Minimum relative distance to lead vehicle [m] 5 | headway_time: 1.5 # Desired time headway. The minimum possible time to the vehicle in front [s] 6 | accel_max: 1.0 # maximum acceleration [m/s^2] 7 | decel_max: 2.0 # maximum deceleration (positive value) [m/s^2] 8 | open_loop_detections_types: ["PEDESTRIAN", "BARRIER", "CZONE_SIGN", "TRAFFIC_CONE", "GENERIC_OBJECT"] # Open-loop detections to include 9 | minimum_path_length: 20 # [m] The minimum path length to maintain 10 | planned_trajectory_samples: null # Number of elements to sample for the planned trajectory. 11 | planned_trajectory_sample_interval: null # [s] The time interval of sequence to sample from. 12 | radius: 100 # [m] Only agents within this radius around the ego will be simulated. 13 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/observation/lidar_pc_observation.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.observation.lidar_pc.LidarPcObservation 2 | _convert_: 'all' 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/planner/idm_planner.yaml: -------------------------------------------------------------------------------- 1 | idm_planner: 2 | _target_: nuplan.planning.simulation.planner.idm_planner.IDMPlanner 3 | _convert_: 'all' 4 | target_velocity: 10 # Desired velocity in free traffic [m/s] 5 | min_gap_to_lead_agent: 1.0 # Minimum relative distance to lead vehicle [m] 6 | headway_time: 1.5 # Desired time headway. The minimum possible time to the vehicle in front [s] 7 | accel_max: 1.0 # Maximum acceleration [m/s^2] 8 | decel_max: 3.0 # Maximum deceleration (positive value) [m/s^2] 9 | planned_trajectory_samples: 16 # Number of trajectory samples to generate 10 | planned_trajectory_sample_interval: 0.5 # The sampling time interval between samples [s] 11 | occupancy_map_radius: 40 # The range around the ego to add objects to be considered [m] 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/planner/llama4drive_lora_ins_wo_stop.yaml: -------------------------------------------------------------------------------- 1 | llama4drive_lora_ins_wo_stop: 2 | _target_: llama2.planner.llama4drive_planner.LLAMA4DrivePlanner 3 | _convert_: 'all' 4 | disable_refpath: False 5 | model_cfg: 6 | - model_name_or_path: null 7 | - finetune_model_path: null 8 | - adapter_fusion: True 9 | - enable_lora: True 10 | - ins_wo_stop: True -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/planner/log_future_planner.yaml: -------------------------------------------------------------------------------- 1 | log_future_planner: 2 | _target_: nuplan.planning.simulation.planner.log_future_planner.LogFuturePlanner 3 | _convert_: 'all' 4 | num_poses: 16 # number of poses in a trajectory 5 | future_time_horizon: 8.0 # [s] future time horizon over all poses 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/planner/ml_planner.yaml: -------------------------------------------------------------------------------- 1 | ml_planner: 2 | _target_: nuplan.planning.simulation.planner.ml_planner.ml_planner.MLPlanner 3 | _convert_: 'all' 4 | 5 | model_config: ??? # Dictionary key from existing planner model config (e.g. raster_model) 6 | checkpoint_path: ??? # Path to trained model checkpoint 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/planner/remote_planner.yaml: -------------------------------------------------------------------------------- 1 | remote_planner: 2 | _target_: nuplan.planning.simulation.planner.remote_planner.RemotePlanner 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/planner/simple_planner.yaml: -------------------------------------------------------------------------------- 1 | simple_planner: 2 | _target_: nuplan.planning.simulation.planner.simple_planner.SimplePlanner 3 | _convert_: 'all' 4 | horizon_seconds: 10.0 5 | sampling_time: 0.25 6 | acceleration: [0.0, 0.0] # x (longitudinal), y (lateral) 7 | max_velocity: 5.0 8 | steering_angle: 0.0 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/predictor/log_future_predictor.yaml: -------------------------------------------------------------------------------- 1 | log_future_planner: 2 | _target_: nuplan.planning.simulation.predictor.log_future_predictor.LogFuturePredictor 3 | _convert_: 'all' 4 | # Parameters for predicted trajectories 5 | future_trajectory_sampling: 6 | _target_: nuplan.planning.simulation.trajectory.trajectory_sampling.TrajectorySampling 7 | _convert_: 'all' 8 | num_poses: 16 # number of poses in a trajectory 9 | time_horizon: 8.0 # [s] time horizon of future poses 10 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/simulation/simulation_time_controller/step_simulation_time_controller.yaml: -------------------------------------------------------------------------------- 1 | _target_: nuplan.planning.simulation.simulation_time_controller.step_simulation_time_controller.StepSimulationTimeController 2 | _convert_: 'all' 3 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/config/training/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/callbacks/default_callbacks.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - learning_rate_monitor_callback 3 | - model_checkpoint_callback 4 | - time_logging_callback 5 | - visualization_callback 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/callbacks/learning_rate_monitor_callback.yaml: -------------------------------------------------------------------------------- 1 | learning_rate_monitor_callback: 2 | _target_: pytorch_lightning.callbacks.LearningRateMonitor 3 | _convert_: 'all' 4 | 5 | logging_interval: 'step' 6 | log_momentum: true 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/callbacks/model_checkpoint_callback.yaml: -------------------------------------------------------------------------------- 1 | model_checkpoint_callback: 2 | _target_: nuplan.planning.training.callbacks.checkpoint_callback.ModelCheckpointAtEpochEnd 3 | _convert_: 'all' 4 | 5 | save_last: false 6 | dirpath: ${output_dir}/best_model 7 | 8 | # see default_lightning.yaml 9 | save_top_k: ${lightning.trainer.checkpoint.save_top_k} 10 | monitor: ${lightning.trainer.checkpoint.monitor} 11 | mode: ${lightning.trainer.checkpoint.mode} 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/callbacks/scenario_scoring_callback.yaml: -------------------------------------------------------------------------------- 1 | scenario_scoring_callback: 2 | _target_: nuplan.planning.training.callbacks.scenario_scoring_callback.ScenarioScoringCallback 3 | _convert_: 'all' 4 | 5 | # Use scenario to scene converter 6 | scene_converter: 7 | _target_: nuplan.planning.training.callbacks.utils.scenario_scene_converter.ScenarioSceneConverter 8 | _convert_: 'all' 9 | ego_trajectory_horizon: 10.0 10 | ego_trajectory_poses: 20 11 | 12 | num_store: 3 # number of scenarios to be stored per evaluation score 13 | frequency: 0 # interval between epochs at which to perform the evaluation, set to 0 to skip callback 14 | output_dir: ${output_dir} 15 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/callbacks/time_logging_callback.yaml: -------------------------------------------------------------------------------- 1 | time_logging_callback: 2 | _target_: nuplan.planning.training.callbacks.time_logging_callback.TimeLoggingCallback 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/callbacks/visualization_callback.yaml: -------------------------------------------------------------------------------- 1 | visualization_callback: 2 | _target_: nuplan.planning.training.callbacks.visualization_callback.VisualizationCallback 3 | _convert_: 'all' 4 | 5 | images_per_tile: 8 # number of images per row 6 | num_train_tiles: 5 # number of rows of training images 7 | num_val_tiles: 5 # number of rows of validation images 8 | pixel_size: 0.1 # [m] pixel size of image 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/agent_dropout_augmentation.yaml: -------------------------------------------------------------------------------- 1 | agent_dropout_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.agent_dropout_augmentation.AgentDropoutAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | dropout_rate: 0.5 # probability of an agent being dropout 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/gaussian_smooth_agent_augmentation.yaml: -------------------------------------------------------------------------------- 1 | gaussian_smooth_agent_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.gaussian_smooth_agent_augmentation.GaussianSmoothAgentAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | mean: [1.0, 0.0, 0.0] # the mean vector of the Gaussian noise on [x, y, heading] 7 | std: [1.0, 1.0, 0.5] # the std vector of the Gaussian noise on [x, y, heading] 8 | low: [0.0, -1.0, -0.5] # lower bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 9 | high: [1.0, 1.0, 0.5] # upper bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 10 | use_uniform_noise: false # use uniform noise instead of gaussian noise 11 | sigma: 5.0 # the sigma for Guassian kernel smoothing, the higher the smoother 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/generic_agent_dropout_augmentation.yaml: -------------------------------------------------------------------------------- 1 | generic_agent_dropout_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.generic_agent_dropout_augmentation.GenericAgentDropoutAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | dropout_rate: 0.5 # probability of an agent being dropout 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/kinematic_agent_augmentation.yaml: -------------------------------------------------------------------------------- 1 | kinematic_agent_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.kinematic_agent_augmentation.KinematicAgentAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | mean: [1.0, 0.0, 0.0] # the mean vector of the Gaussian noise on [x, y, heading] 7 | std: [1.0, 1.0, 0.5] # the std vector of the Gaussian noise on [x, y, heading] 8 | low: [0.0, -1.0, -0.5] # lower bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 9 | high: [1.0, 1.0, 0.5] # upper bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 10 | use_uniform_noise: false # use uniform noise instead of gaussian noise 11 | trajectory_length: 16 # the augmentation trajectory length 12 | dt: 0.5 # the time interval between two consecutive points of the trajectory 13 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/kinematic_history_agent_augmentation.yaml: -------------------------------------------------------------------------------- 1 | kinematic_history_agent_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.kinematic_history_agent_augmentation.KinematicHistoryAgentAugmentor 3 | _convert_: 'all' 4 | 5 | dt: 0.5 # the time interval between trajectory points 6 | mean: [1.0, 0.0, 0.0] # the mean vector of the Gaussian noise on [x, y, heading] 7 | std: [1.0, 1.0, 0.5] # the std vector of the Gaussian noise on [x, y, heading] 8 | low: [0.0, -2.0, -0.75] # lower bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 9 | high: [2.0, 2.0, 0.75] # upper bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 10 | augment_prob: 0.5 # probability of applying data augmentation for training 11 | use_uniform_noise: true # use uniform noise instead of gaussian noise 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/kinematic_history_generic_agent_augmentation.yaml: -------------------------------------------------------------------------------- 1 | kinematic_history_generic_agent_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.kinematic_history_generic_agent_augmentation.KinematicHistoryGenericAgentAugmentor 3 | _convert_: 'all' 4 | 5 | dt: 0.5 # the time interval between trajectory points 6 | mean: [1.0, 0.0, 0.0] # the mean vector of the Gaussian noise on [x, y, heading] 7 | std: [1.0, 1.0, 0.5] # the std vector of the Gaussian noise on [x, y, heading] 8 | low: [0.0, -2.0, -0.75] # lower bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 9 | high: [2.0, 2.0, 0.75] # upper bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 10 | augment_prob: 0.5 # probability of applying data augmentation for training 11 | use_uniform_noise: true # use uniform noise instead of gaussian noise 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation/simple_agent_augmentation.yaml: -------------------------------------------------------------------------------- 1 | simple_agent_augmentation: 2 | _target_: nuplan.planning.training.data_augmentation.simple_agent_augmentation.SimpleAgentAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | mean: [1.0, 0.0, 0.0] # the mean vector of the Gaussian noise on [x, y, heading] 7 | std: [1.0, 1.0, 0.5] # the std vector of the Gaussian noise on [x, y, heading] 8 | low: [0.0, -1.0, -0.5] # lower bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 9 | high: [1.0, 1.0, 0.5] # upper bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 10 | use_uniform_noise: false # use uniform noise instead of gaussian noise 11 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation_scheduler/default_augmentation_schedulers.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - stepwise_augmentation_probability_scheduler 3 | - stepwise_augmentation_attribute_scheduler 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation_scheduler/stepwise_augmentation_attribute_scheduler.yaml: -------------------------------------------------------------------------------- 1 | stepwise_augmentation_attribute_scheduler: 2 | _target_: nuplan.planning.training.callbacks.stepwise_augmentation_scheduler.StepwiseAugmentationAttributeScheduler 3 | _convert_: 'all' 4 | 5 | pct_time_increasing: 0.8 # Percentage of the training time spent increasing augmentation probability 6 | scheduling_strategy: linear # Scheduling strategy for augmentation probability. Possible values [linear, milestones] 7 | milestones: null # List of milestones to be used if scheduling strategy is milestones. Eg [0.0, 0.5, 1.0] means that augmentation probability will increase at the 0%, 50% and 100% mark of training. 8 | max_aug_attribute_pct_increase: 0.2 # Percentage increase in the augmentation attribute when training is completed. 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_augmentation_scheduler/stepwise_augmentation_probability_scheduler.yaml: -------------------------------------------------------------------------------- 1 | stepwise_augmentation_probability_scheduler: 2 | _target_: nuplan.planning.training.callbacks.stepwise_augmentation_scheduler.StepwiseAugmentationProbabilityScheduler 3 | _convert_: 'all' 4 | 5 | pct_time_increasing: 0.8 # Percentage of the training time spent increasing augmentation probability 6 | scheduling_strategy: linear # Scheduling strategy for augmentation probability. Possible values [linear, milestones] 7 | milestones: null # List of milestones to be used if scheduling strategy is milestones. Eg [0.0, 0.5, 1.0] means that augmentation probability will increase at the 0%, 50% and 100% mark of training. 8 | max_augment_prob: 0.9 # Final augmentation probability to be reached when training is completed. 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/data_loader/default_data_loader.yaml: -------------------------------------------------------------------------------- 1 | datamodule: 2 | train_fraction: 1.0 # [%] fraction of training samples to use 3 | val_fraction: 1.0 # [%] fraction of validation samples to use 4 | test_fraction: 1.0 # [%] fraction of test samples to use 5 | 6 | params: 7 | batch_size: 2 # batch size per GPU 8 | num_workers: 8 # number of dataloader workers 9 | pin_memory: ${gpu} # allocate dataloader examples in a page-locked memory for faster host-to-device transfer 10 | drop_last: true # drop the last examples if the batch is not complete 11 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/lr_scheduler/multistep_lr.yaml: -------------------------------------------------------------------------------- 1 | _target_: torch.optim.lr_scheduler.MultiStepLR 2 | _convert_: all 3 | 4 | milestones: [100, 170] # decays the learning rate of each parameter group by gamma once the number of epochs equals one of the milestones 5 | gamma: 0.1 # multiplicative factor of learning rate decay 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/objective/agents_imitation_objective.yaml: -------------------------------------------------------------------------------- 1 | agents_imitation_objective: 2 | _target_: nuplan.planning.training.modeling.objectives.agents_imitation_objective.AgentsImitationObjective 3 | _convert_: 'all' 4 | 5 | weight: 1.0 # weight contribution to the overall loss 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/objective/imitation_objective.yaml: -------------------------------------------------------------------------------- 1 | imitation_objective: 2 | _target_: nuplan.planning.training.modeling.objectives.imitation_objective.ImitationObjective 3 | _convert_: 'all' 4 | 5 | weight: 1.0 # weight contribution to the overall loss 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/objective/trajectory_weight_decay_imitation_objective.yaml: -------------------------------------------------------------------------------- 1 | imitation_objective: 2 | _target_: nuplan.planning.training.modeling.objectives.trajectory_weight_decay_imitation_objective.TrajectoryWeightDecayImitationObjective 3 | _convert_: 'all' 4 | 5 | weight: 1.0 # weight contribution to the overall loss 6 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/optimizer/adam.yaml: -------------------------------------------------------------------------------- 1 | _target_: torch.optim.Adam 2 | _convert_: 'all' 3 | 4 | lr: 5e-5 # learning rate 5 | weight_decay: 5e-4 # l2 norm penalty 6 | betas: [0.9, 0.999] # coefficients used for computing running averages of gradient and its square 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/optimizer/adamw.yaml: -------------------------------------------------------------------------------- 1 | _target_: torch.optim.AdamW 2 | _convert_: 'all' 3 | 4 | lr: 5e-5 # learning rate 5 | weight_decay: 5e-4 # weight decay coefficient 6 | betas: [0.9, 0.999] # coefficients used for computing running averages of gradient and its square 7 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/optimizer/sgd.yaml: -------------------------------------------------------------------------------- 1 | _target_: torch.optim.SGD 2 | _convert_: 'all' 3 | 4 | lr: 5e-5 # learning rate 5 | momentum: 0.95 # momentum factor 6 | weight_decay: 1e-5 # l2 penalty 7 | dampening: 0.0 # dampening used for momentum 8 | nesterov: true # enables nesterov momentum if true, otherwise nesterov momentum is not used 9 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/scenario_type_weights/default_scenario_type_weights.yaml: -------------------------------------------------------------------------------- 1 | scenario_type_sampling_weights: 2 | # scenario_name: scenario_type_weights 3 | # If a scenario types weight is not specified by default its weight is 1.0. 4 | # To sample with a lower probability set a weight lower than 1.0 5 | # To sample with a higher probability set a weight higher than 1.0 6 | enable: false 7 | scenario_type_weights: 8 | unknown: 1.0 9 | 10 | scenario_type_loss_weights: 11 | unknown: 1.0 12 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/agents_avg_displacement_error.yaml: -------------------------------------------------------------------------------- 1 | agents_avg_displacement_error: 2 | _target_: nuplan.planning.training.modeling.metrics.agents_imitation_metrics.AgentsAverageDisplacementError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/agents_avg_heading_error.yaml: -------------------------------------------------------------------------------- 1 | agents_avg_heading_error: 2 | _target_: nuplan.planning.training.modeling.metrics.agents_imitation_metrics.AgentsAverageHeadingError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/agents_final_displacement_error.yaml: -------------------------------------------------------------------------------- 1 | agents_final_displacement_error: 2 | _target_: nuplan.planning.training.modeling.metrics.agents_imitation_metrics.AgentsFinalDisplacementError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/agents_final_heading_error.yaml: -------------------------------------------------------------------------------- 1 | agents_final_heading_error: 2 | _target_: nuplan.planning.training.modeling.metrics.agents_imitation_metrics.AgentsFinalHeadingError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/avg_displacement_error.yaml: -------------------------------------------------------------------------------- 1 | avg_displacement_error: 2 | _target_: nuplan.planning.training.modeling.metrics.planning_metrics.AverageDisplacementError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/avg_heading_error.yaml: -------------------------------------------------------------------------------- 1 | avg_heading_error: 2 | _target_: nuplan.planning.training.modeling.metrics.planning_metrics.AverageHeadingError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/final_displacement_error.yaml: -------------------------------------------------------------------------------- 1 | final_displacement_error: 2 | _target_: nuplan.planning.training.modeling.metrics.planning_metrics.FinalDisplacementError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/training_metric/final_heading_error.yaml: -------------------------------------------------------------------------------- 1 | final_heading_error: 2 | _target_: nuplan.planning.training.modeling.metrics.planning_metrics.FinalHeadingError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/warm_up_lr_scheduler/constant_warm_up.yaml: -------------------------------------------------------------------------------- 1 | _target_: torch.optim.lr_scheduler.LambdaLR 2 | _convert_: 'all' 3 | optimizer: null # Loaded in instantiation 4 | lr_lambda: 5 | _target_: nuplan.planning.script.builders.lr_scheduler_builder.get_warm_up_lr_scheduler_func 6 | warm_up_steps: 5 # Number of times that the warm up lr scheduler will be called. By default this is the number of training epochs before main scheduler is used 7 | # but if OneCycleLR is used, note that .step() will be called every few training steps instead of training epochs, so when the number of 8 | # calls of .step() reaches the number of warm_up_steps, trainin switches over to the main learning rate scheduler 9 | warm_up_strategy: constant # Warm up with a constant learning rate 10 | -------------------------------------------------------------------------------- /nuplan/planning/script/config/training/warm_up_lr_scheduler/linear_warm_up.yaml: -------------------------------------------------------------------------------- 1 | _target_: torch.optim.lr_scheduler.LambdaLR 2 | _convert_: 'all' 3 | optimizer: null # Loaded in instantiation 4 | lr_lambda: 5 | _target_: nuplan.planning.script.builders.lr_scheduler_builder.get_warm_up_lr_scheduler_func 6 | warm_up_steps: 5 # Number of times that the warm up lr scheduler will be called. By default this is the number of training epochs before main scheduler is used 7 | # but if OneCycleLR is used, note that .step() will be called every few training steps instead of training epochs, so when the number of 8 | # calls of .step() reaches the number of warm_up_steps, trainin switches over to the main learning rate scheduler 9 | warm_up_strategy: linear # warm up with a linearly increasing learning rate 10 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/experiments/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/closed_loop_nonreactive_agents.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: closed_loop_nonreactive_agents 3 | 4 | defaults: 5 | - override /observation: box_observation 6 | - override /ego_controller: two_stage_controller 7 | - override /planner: simple_planner 8 | - override /simulation_metric: simulation_closed_loop_nonreactive_agents 9 | - override /metric_aggregator: 10 | - closed_loop_nonreactive_agents_weighted_average 11 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/closed_loop_reactive_agents.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: closed_loop_reactive_agents 3 | 4 | defaults: 5 | - override /observation: idm_agents_observation 6 | - override /ego_controller: two_stage_controller 7 | - override /planner: simple_planner 8 | - override /simulation_metric: simulation_closed_loop_reactive_agents 9 | - override /metric_aggregator: 10 | - closed_loop_reactive_agents_weighted_average 11 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/open_loop_boxes.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: open_loop_boxes 3 | 4 | defaults: 5 | - override /observation: box_observation 6 | - override /ego_controller: log_play_back_controller 7 | - override /planner: log_future_planner 8 | - override /simulation_metric: simulation_open_loop_boxes 9 | - override /metric_aggregator: 10 | - open_loop_boxes_weighted_average 11 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/remote_closed_loop_nonreactive_agents.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: remote_closed_loop_nonreactive_agents 3 | 4 | defaults: 5 | - override /observation: box_observation 6 | - override /ego_controller: two_stage_controller 7 | - override /planner: simple_planner 8 | - override /simulation_metric: simulation_closed_loop_nonreactive_agents 9 | - override /main_callback: 10 | - time_callback 11 | - completion_callback 12 | - publisher_callback 13 | - override /scenario_builder: nuplan_challenge 14 | - override /scenario_filter: nuplan_challenge_scenarios 15 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/remote_closed_loop_reactive_agents.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: remote_closed_loop_reactive_agents 3 | 4 | defaults: 5 | - override /observation: idm_agents_observation 6 | - override /ego_controller: two_stage_controller 7 | - override /planner: simple_planner 8 | - override /simulation_metric: simulation_closed_loop_reactive_agents 9 | - override /main_callback: 10 | - time_callback 11 | - completion_callback 12 | - publisher_callback 13 | - override /scenario_builder: nuplan_challenge 14 | - override /scenario_filter: nuplan_challenge_scenarios 15 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/remote_open_loop_boxes.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: remote_open_loop_boxes 3 | 4 | defaults: 5 | - override /observation: box_observation 6 | - override /ego_controller: log_play_back_controller 7 | - override /planner: log_future_planner 8 | - override /simulation_metric: simulation_open_loop_boxes 9 | - override /main_callback: 10 | - time_callback 11 | - completion_callback 12 | - publisher_callback 13 | - override /scenario_builder: nuplan_challenge 14 | - override /scenario_filter: nuplan_challenge_scenarios 15 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/simulation/validation_challenge.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: validation_challenge 3 | 4 | defaults: 5 | - override /observation: box_observation 6 | - override /ego_controller: log_play_back_controller 7 | - override /planner: log_future_planner 8 | - override /main_callback: 9 | - time_callback 10 | - validation_callback 11 | - publisher_callback 12 | - override /scenario_builder: nuplan_challenge 13 | - override /scenario_filter: nuplan_challenge_scenarios 14 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/training/training_raster_model.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: raster_model 3 | py_func: train 4 | objective_aggregate_mode: mean 5 | 6 | defaults: 7 | - override /data_augmentation: 8 | - override /objective: 9 | - imitation_objective 10 | - override /splitter: nuplan 11 | - override /model: raster_model 12 | - override /scenario_filter: training_scenarios 13 | - override /training_metric: 14 | - avg_displacement_error 15 | - avg_heading_error 16 | - final_displacement_error 17 | - final_heading_error 18 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/training/training_simple_vector_model.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: simple_vector_model 3 | py_func: train 4 | objective_aggregate_mode: mean 5 | 6 | defaults: 7 | - override /data_augmentation: 8 | - kinematic_agent_augmentation 9 | - override /objective: 10 | - imitation_objective 11 | - override /splitter: nuplan 12 | - override /model: simple_vector_model 13 | - override /scenario_filter: training_scenarios 14 | - override /training_metric: 15 | - avg_displacement_error 16 | - avg_heading_error 17 | - final_displacement_error 18 | - final_heading_error 19 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/training/training_urban_driver_open_loop_model.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: urban_driver_open_loop_model 3 | py_func: train 4 | objective_aggregate_mode: mean 5 | 6 | defaults: 7 | - override /data_augmentation: 8 | - kinematic_history_generic_agent_augmentation 9 | - generic_agent_dropout_augmentation 10 | - override /objective: 11 | - trajectory_weight_decay_imitation_objective 12 | - override /splitter: nuplan 13 | - override /model: urban_driver_open_loop_model 14 | - override /scenario_filter: training_scenarios 15 | - override /training_metric: 16 | - avg_displacement_error 17 | - avg_heading_error 18 | - final_displacement_error 19 | - final_heading_error 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/experiments/training/training_vector_model.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | job_name: vector_model 3 | py_func: train 4 | objective_aggregate_mode: mean 5 | 6 | defaults: 7 | - override /data_augmentation: 8 | - kinematic_agent_augmentation 9 | - agent_dropout_augmentation 10 | - override /objective: 11 | - imitation_objective 12 | - override /splitter: nuplan 13 | - override /model: vector_model 14 | - override /scenario_filter: training_scenarios 15 | - override /training_metric: 16 | - avg_displacement_error 17 | - avg_heading_error 18 | - final_displacement_error 19 | - final_heading_error 20 | -------------------------------------------------------------------------------- /nuplan/planning/script/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/script/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/callback/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/callback/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/callback/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/callback/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/callback/test/test_serialization_callback_json.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.planning.simulation.callback.test.skeleton_test_serialization_callback import ( 4 | SkeletonTestSerializationCallback, 5 | ) 6 | 7 | 8 | class TestSerializationCallbackJson(SkeletonTestSerializationCallback): 9 | """Tests that SerializationCallback works correctly for JSON format.""" 10 | 11 | def setUp(self) -> None: 12 | """Will be called before every test""" 13 | self._serialization_type = "json" 14 | 15 | self._setUp() 16 | 17 | def test_serialization_callback(self) -> None: 18 | """Tests that we can correctly serialize data to JSON format.""" 19 | self._dump_test_scenario() 20 | 21 | 22 | if __name__ == '__main__': 23 | unittest.main() 24 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/callback/test/test_serialization_callback_msgpack.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.planning.simulation.callback.test.skeleton_test_serialization_callback import ( 4 | SkeletonTestSerializationCallback, 5 | ) 6 | 7 | 8 | class TestSerializationCallbackMsgpack(SkeletonTestSerializationCallback): 9 | """Tests that SerializationCallback works correctly for msgpack format.""" 10 | 11 | def setUp(self) -> None: 12 | """Will be called before every test""" 13 | self._serialization_type = "msgpack" 14 | 15 | self._setUp() 16 | 17 | def test_serialization_callback(self) -> None: 18 | """Tests that we can correctly serialize data to msgpack format.""" 19 | self._dump_test_scenario() 20 | 21 | 22 | if __name__ == '__main__': 23 | unittest.main() 24 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/callback/test/test_serialization_callback_pickle.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.planning.simulation.callback.test.skeleton_test_serialization_callback import ( 4 | SkeletonTestSerializationCallback, 5 | ) 6 | 7 | 8 | class TestSerializationCallbackPickle(SkeletonTestSerializationCallback): 9 | """Tests that SerializationCallback works correctly for pickle format.""" 10 | 11 | def setUp(self) -> None: 12 | """Will be called before every test""" 13 | self._serialization_type = "pickle" 14 | 15 | self._setUp() 16 | 17 | def test_serialization_callback(self) -> None: 18 | """Tests that we can correctly serialize data to pickle format.""" 19 | self._dump_test_scenario() 20 | 21 | 22 | if __name__ == '__main__': 23 | unittest.main() 24 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/motion_model/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "abstract_motion_model", 7 | srcs = ["abstract_motion_model.py"], 8 | deps = [ 9 | "//nuplan/common/actor_state:dynamic_car_state", 10 | "//nuplan/common/actor_state:ego_state", 11 | "//nuplan/common/actor_state:state_representation", 12 | ], 13 | ) 14 | 15 | py_library( 16 | name = "kinematic_bicycle", 17 | srcs = ["kinematic_bicycle.py"], 18 | deps = [ 19 | "//nuplan/common/actor_state:dynamic_car_state", 20 | "//nuplan/common/actor_state:ego_state", 21 | "//nuplan/common/actor_state:state_representation", 22 | "//nuplan/common/actor_state:vehicle_parameters", 23 | "//nuplan/common/geometry:compute", 24 | "//nuplan/planning/simulation/controller:utils", 25 | "//nuplan/planning/simulation/controller/motion_model:abstract_motion_model", 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/motion_model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/motion_model/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/motion_model/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_kinematic_motion_model", 7 | size = "small", 8 | srcs = ["test_kinematic_motion_model.py"], 9 | deps = [ 10 | "//nuplan/common/actor_state:state_representation", 11 | "//nuplan/common/actor_state:vehicle_parameters", 12 | "//nuplan/common/actor_state/test:test_utils", 13 | "//nuplan/planning/simulation/controller/motion_model:kinematic_bicycle", 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/motion_model/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/motion_model/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/tracker/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/tracker/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/tracker/ilqr/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "ilqr_solver", 7 | srcs = ["ilqr_solver.py"], 8 | deps = [ 9 | "//nuplan/common/actor_state:vehicle_parameters", 10 | "//nuplan/common/geometry:compute", 11 | "//nuplan/planning/simulation/controller/tracker:tracker_utils", 12 | ], 13 | ) 14 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/tracker/ilqr/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/tracker/ilqr/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/tracker/ilqr/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_ilqr_solver", 7 | size = "small", 8 | srcs = ["test_ilqr_solver.py"], 9 | deps = [ 10 | "//nuplan/planning/simulation/controller/tracker/ilqr:ilqr_solver", 11 | ], 12 | ) 13 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/tracker/ilqr/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/tracker/ilqr/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/tracker/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/controller/tracker/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/controller/utils.py: -------------------------------------------------------------------------------- 1 | from nuplan.common.actor_state.state_representation import TimePoint 2 | 3 | 4 | def forward_integrate(init: float, delta: float, sampling_time: TimePoint) -> float: 5 | """ 6 | Performs a simple euler integration. 7 | :param init: Initial state 8 | :param delta: The rate of chance of the state. 9 | :param sampling_time: The time duration to propagate for. 10 | :return: The result of integration 11 | """ 12 | return float(init + delta * sampling_time.time_s) 13 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/history/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/history/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/history/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/history/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/main_callback/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/main_callback/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/main_callback/abstract_main_callback.py: -------------------------------------------------------------------------------- 1 | import abc 2 | 3 | 4 | class AbstractMainCallback(abc.ABC): 5 | """Abstract class for main function callbacks.""" 6 | 7 | def on_run_simulation_start(self) -> None: 8 | """Callback after the simulation function starts.""" 9 | pass 10 | 11 | def on_run_simulation_end(self) -> None: 12 | """Callback before the simulation function ends.""" 13 | pass 14 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/main_callback/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/main_callback/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/observation/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/idm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/observation/idm/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/idm/idm_states.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import List 3 | 4 | 5 | @dataclass 6 | class IDMAgentState: 7 | """IDM smart-agent state.""" 8 | 9 | progress: float # [m] distane a long a path 10 | velocity: float # [m/s] velocity along the oath 11 | 12 | def to_array(self) -> List[float]: 13 | """Return agent state as an array.""" 14 | return [self.progress, self.velocity] 15 | 16 | 17 | @dataclass 18 | class IDMLeadAgentState(IDMAgentState): 19 | """IDM smart-agent state.""" 20 | 21 | length_rear: float # [m] length from vehicle CoG to the rear bumper 22 | 23 | def to_array(self) -> List[float]: 24 | """Return agent state as an array.""" 25 | return [self.progress, self.velocity, self.length_rear] 26 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/idm/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/observation/idm/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/idm/test/json/idm_agent_observation/baseline.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "version": "3.0.0" 4 | }, 5 | "camera": { 6 | "bearing": 0.913, 7 | "lookat": [ 8 | 664435.6257309598, 9 | 3997705.754709286, 10 | -2.842170943040401e-14 11 | ], 12 | "pitch": 47.60000000000014, 13 | "scale": 2192311.930100322 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_ego_centric_ml_agents", 7 | size = "small", 8 | srcs = ["test_ego_centric_ml_agents.py"], 9 | tags = ["integration"], 10 | deps = [ 11 | "//nuplan/common/actor_state:state_representation", 12 | "//nuplan/planning/scenario_builder/test:mock_abstract_scenario", 13 | "//nuplan/planning/simulation/observation:ego_centric_ml_agents", 14 | "//nuplan/planning/simulation/trajectory:trajectory_sampling", 15 | "//nuplan/planning/training/modeling:torch_module_wrapper", 16 | "//nuplan/planning/training/preprocessing/features:agents", 17 | "//nuplan/planning/training/preprocessing/features:agents_trajectories", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/observation/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/observation/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/occupancy_map/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "abstract_occupancy_map", 8 | srcs = ["abstract_occupancy_map.py"], 9 | ) 10 | 11 | py_library( 12 | name = "geopandas_occupancy_map", 13 | srcs = ["geopandas_occupancy_map.py"], 14 | deps = [ 15 | "//nuplan/planning/simulation/occupancy_map:abstract_occupancy_map", 16 | requirement("geopandas"), 17 | requirement("rtree"), 18 | ], 19 | ) 20 | 21 | py_library( 22 | name = "strtree_occupancy_map", 23 | srcs = ["strtree_occupancy_map.py"], 24 | deps = [ 25 | "//nuplan/database/utils/boxes:box3d", 26 | "//nuplan/planning/simulation/observation/idm:utils", 27 | "//nuplan/planning/simulation/occupancy_map:abstract_occupancy_map", 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/occupancy_map/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/occupancy_map/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/occupancy_map/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_occupancy_map", 7 | size = "small", 8 | srcs = ["test_occupancy_map.py"], 9 | deps = [ 10 | "//nuplan/planning/simulation/occupancy_map:geopandas_occupancy_map", 11 | "//nuplan/planning/simulation/occupancy_map:strtree_occupancy_map", 12 | ], 13 | ) 14 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/occupancy_map/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/occupancy_map/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/path/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "interpolated_path", 8 | srcs = ["interpolated_path.py"], 9 | deps = [ 10 | "//nuplan/common/actor_state:state_representation", 11 | "//nuplan/common/geometry:compute", 12 | "//nuplan/planning/simulation/path", 13 | requirement("scipy"), 14 | ], 15 | ) 16 | 17 | py_library( 18 | name = "path", 19 | srcs = ["path.py"], 20 | deps = ["//nuplan/common/actor_state:state_representation"], 21 | ) 22 | 23 | py_library( 24 | name = "utils", 25 | srcs = ["utils.py"], 26 | deps = [ 27 | "//nuplan/common/actor_state:state_representation", 28 | "//nuplan/planning/simulation/path", 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/path/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/path/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/path/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_path", 7 | size = "small", 8 | srcs = ["test_path.py"], 9 | deps = [ 10 | "//nuplan/common/actor_state:state_representation", 11 | "//nuplan/planning/simulation/path:interpolated_path", 12 | "//nuplan/planning/simulation/path:utils", 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/path/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/path/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/planner/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/ml_planner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/planner/ml_planner/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/ml_planner/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/planner/ml_planner/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/planner/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/utils/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_library( 11 | name = "breadth_first_search", 12 | srcs = ["breadth_first_search.py"], 13 | deps = [ 14 | "//nuplan/common/maps:abstract_map_objects", 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/planner/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/utils/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_breadth_first_search", 7 | size = "small", 8 | srcs = ["test_breadth_first_search.py"], 9 | deps = [ 10 | "@nuplan_devkit//nuplan/common/maps:abstract_map_objects", 11 | "@nuplan_devkit//nuplan/planning/simulation/planner/utils:breadth_first_search", 12 | ], 13 | ) 14 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/planner/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/planner/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/predictor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/predictor/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/predictor/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/predictor/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/runner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/runner/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/runner/abstract_runner.py: -------------------------------------------------------------------------------- 1 | from abc import ABCMeta, abstractmethod 2 | 3 | from nuplan.planning.scenario_builder.abstract_scenario import AbstractScenario 4 | from nuplan.planning.simulation.planner.abstract_planner import AbstractPlanner 5 | from nuplan.planning.simulation.runner.runner_report import RunnerReport 6 | 7 | 8 | class AbstractRunner(metaclass=ABCMeta): 9 | """Interface for a generic runner.""" 10 | 11 | @abstractmethod 12 | def run(self) -> RunnerReport: 13 | """ 14 | Run through all runners with simulation history. 15 | :return A list of runner reports. 16 | """ 17 | pass 18 | 19 | @property 20 | @abstractmethod 21 | def scenario(self) -> AbstractScenario: 22 | """ 23 | :return: Get a list of scenarios. 24 | """ 25 | pass 26 | 27 | @property 28 | @abstractmethod 29 | def planner(self) -> AbstractPlanner: 30 | """ 31 | :return: Get a planner. 32 | """ 33 | pass 34 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/runner/runner_report.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import logging 4 | from dataclasses import dataclass 5 | from typing import Optional 6 | 7 | from nuplan.planning.simulation.planner.abstract_planner import PlannerReport 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | 12 | @dataclass 13 | class RunnerReport: 14 | """Report for a runner.""" 15 | 16 | succeeded: bool # True if simulation was successful 17 | error_message: Optional[str] # None if simulation succeeded, traceback if it failed 18 | start_time: float # Time simulation.run() was called 19 | end_time: Optional[float] # Time simulation.run() returned, when the error was logged, or None temporarily 20 | planner_report: Optional[PlannerReport] # Planner report containing stats about planner runtime, None if the 21 | # runner didn't run a planner (eg. MetricRunner), or when a run fails 22 | 23 | # Metadata about the simulations 24 | scenario_name: str 25 | planner_name: str 26 | log_name: str 27 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/runner/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/runner/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/simulation_time_controller/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "abstract_simulation_time_controller", 7 | srcs = ["abstract_simulation_time_controller.py"], 8 | deps = ["//nuplan/planning/simulation/simulation_time_controller:simulation_iteration"], 9 | ) 10 | 11 | py_library( 12 | name = "simulation_iteration", 13 | srcs = ["simulation_iteration.py"], 14 | deps = ["//nuplan/common/actor_state:state_representation"], 15 | ) 16 | 17 | py_library( 18 | name = "step_simulation_time_controller", 19 | srcs = ["step_simulation_time_controller.py"], 20 | deps = [ 21 | "//nuplan/planning/scenario_builder:abstract_scenario", 22 | "//nuplan/planning/simulation/simulation_time_controller:abstract_simulation_time_controller", 23 | "//nuplan/planning/simulation/simulation_time_controller:simulation_iteration", 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/simulation_time_controller/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/simulation_time_controller/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/trajectory/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/trajectory/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/trajectory/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_interpolated_trajectory", 7 | size = "small", 8 | srcs = ["test_interpolated_trajectory.py"], 9 | deps = [ 10 | "//nuplan/common/actor_state:state_representation", 11 | "//nuplan/common/utils:helpers", 12 | "//nuplan/common/utils:interpolatable_state", 13 | "//nuplan/common/utils:split_state", 14 | "//nuplan/planning/simulation/trajectory:interpolated_trajectory", 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/trajectory/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/trajectory/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/simulation/visualization/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | 10 | py_library( 11 | name = "abstract_visualization", 12 | srcs = ["abstract_visualization.py"], 13 | deps = [ 14 | "//nuplan/common/actor_state:ego_state", 15 | "//nuplan/common/actor_state:state_representation", 16 | "//nuplan/planning/scenario_builder:abstract_scenario", 17 | "//nuplan/planning/simulation/simulation_time_controller:simulation_iteration", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /nuplan/planning/simulation/visualization/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/simulation/visualization/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "__init__", 7 | srcs = ["__init__.py"], 8 | ) 9 | -------------------------------------------------------------------------------- /nuplan/planning/training/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/callbacks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/callbacks/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/callbacks/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/callbacks/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/callbacks/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/callbacks/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/data_augmentation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/data_augmentation/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/data_augmentation/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/data_augmentation/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/data_loader/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/data_loader/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/data_loader/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/data_loader/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/data_loader/test/test_dataloader_ray.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.planning.training.data_loader.test.skeleton_test_dataloader import SkeletonTestDataloader 4 | from nuplan.planning.utils.multithreading.worker_ray import RayDistributed 5 | 6 | 7 | class TestDataloaderRay(SkeletonTestDataloader): 8 | """ 9 | Tests data loading functionality in ray. 10 | """ 11 | 12 | def test_dataloader_nuplan_ray(self) -> None: 13 | """ 14 | Test dataloader using nuPlan DB. 15 | """ 16 | self._test_dataloader(RayDistributed()) 17 | 18 | 19 | if __name__ == '__main__': 20 | unittest.main() 21 | -------------------------------------------------------------------------------- /nuplan/planning/training/data_loader/test/test_dataloader_sequential.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from nuplan.planning.training.data_loader.test.skeleton_test_dataloader import SkeletonTestDataloader 4 | from nuplan.planning.utils.multithreading.worker_sequential import Sequential 5 | 6 | 7 | class TestDataloaderSequential(SkeletonTestDataloader): 8 | """ 9 | Tests data loading functionality in a sequential manner. 10 | """ 11 | 12 | def test_dataloader_nuplan_sequential(self) -> None: 13 | """ 14 | Test dataloader using nuPlan DB using a sequential worker. 15 | """ 16 | self._test_dataloader(Sequential()) 17 | 18 | 19 | if __name__ == '__main__': 20 | unittest.main() 21 | -------------------------------------------------------------------------------- /nuplan/planning/training/experiments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/experiments/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/metrics/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/metrics/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/models/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/models/dynamics_layers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/models/dynamics_layers/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/models/dynamics_layers/kinematic_bicycle_layers_utils.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class StateIndex(IntEnum): 5 | """ 6 | Index mapping for the state vector 7 | """ 8 | 9 | X_POS = 0 # [m] The x position in global coordinates. 10 | Y_POS = 1 # [m] The y position in global coordinates. 11 | YAW = 2 # [rad] The yaw in global coordinates. 12 | X_VELOCITY = 3 # [m/s] The velocity along the longitudinal axis of the vehicles. 13 | Y_VELOCITY = 4 # [m/s] The velocity along the lateral axis of the vehicles. 14 | YAW_RATE = 5 # [m/s] The yaw rate. 15 | 16 | 17 | class InputIndex(IntEnum): 18 | """ 19 | Index mapping for the input vector 20 | """ 21 | 22 | ACCEL = 0 # [m/s^2] The acceleration along the longitudinal axis of the vehicles. 23 | STEERING_ANGLE = 1 # [rad] The steering angle. 24 | -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/models/dynamics_layers/kinematic_unicycle_layers_utils.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class StateIndex(IntEnum): 5 | """ 6 | Index mapping for the state vector 7 | """ 8 | 9 | X_POS = 0 # [m] The x position in global coordinates. 10 | Y_POS = 1 # [m] The y position in global coordinates. 11 | YAW = 2 # [rad] The yaw in global coordinates. 12 | X_VELOCITY = 3 # [m/s] The velocity along the longitudinal axis of the vehicle. 13 | Y_VELOCITY = 4 # [m/s] The velocity along the lateral axis of the vehicle. 14 | X_ACCEL = 5 # [m/s^2] The acceleration along the longitudinal axis of the vehicle. 15 | Y_ACCEL = 6 # [m/s^2] The acceleration along the lateral axis of the vehicle. 16 | 17 | 18 | class InputIndex(IntEnum): 19 | """ 20 | Index mapping for the input vector 21 | """ 22 | 23 | CURVATURE = 0 # [rad/m] The curvature. 24 | JERK = 1 # [m/s^3] The jerk along the longitudinal axis of the vehicle. 25 | -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/models/dynamics_layers/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/models/dynamics_layers/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/models/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/models/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/objectives/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/objectives/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/objectives/scenario_weight_utils.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, List 2 | 3 | import torch 4 | 5 | from nuplan.planning.scenario_builder.abstract_scenario import AbstractScenario 6 | 7 | 8 | def extract_scenario_type_weight( 9 | scenarios: List[AbstractScenario], scenario_type_loss_weights: Dict[str, float], device: torch.device 10 | ) -> torch.Tensor: 11 | """ 12 | Gets the scenario loss weights. 13 | :param scenarios: List of scenario objects 14 | :return: Tensor with scenario_weights 15 | """ 16 | default_scenario_weight = 1.0 17 | scenario_weights = [scenario_type_loss_weights.get(s.scenario_type, default_scenario_weight) for s in scenarios] 18 | return torch.FloatTensor(scenario_weights).to(device) 19 | -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/objectives/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/modeling/objectives/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/modeling/types.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, List 2 | 3 | import torch 4 | 5 | from nuplan.planning.training.preprocessing.feature_builders.abstract_feature_builder import ( 6 | AbstractModelFeature, 7 | AbstractScenario, 8 | ) 9 | 10 | 11 | class MissingFeature(Exception): 12 | """ 13 | Exception used when a features is not present 14 | """ 15 | 16 | pass 17 | 18 | 19 | FeaturesType = Dict[str, AbstractModelFeature] 20 | TargetsType = Dict[str, AbstractModelFeature] 21 | ScenarioListType = List[AbstractScenario] 22 | TensorFeaturesType = Dict[str, torch.Tensor] 23 | 24 | 25 | def move_features_type_to_device(batch: FeaturesType, device: torch.device) -> FeaturesType: 26 | """ 27 | Move all features to a device 28 | :param batch: batch of features 29 | :param device: new device 30 | :return: batch moved to new device 31 | """ 32 | output = {} 33 | for key, value in batch.items(): 34 | output[key] = value.to_device(device) 35 | return output 36 | -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "feature_collate", 7 | srcs = ["feature_collate.py"], 8 | deps = ["//nuplan/planning/training/modeling:types"], 9 | ) 10 | 11 | py_library( 12 | name = "feature_preprocessor", 13 | srcs = ["feature_preprocessor.py"], 14 | deps = [ 15 | "//nuplan/planning/scenario_builder:abstract_scenario", 16 | "//nuplan/planning/scenario_builder/cache:cached_scenario", 17 | "//nuplan/planning/training/modeling:types", 18 | "//nuplan/planning/training/preprocessing/feature_builders:abstract_feature_builder", 19 | "//nuplan/planning/training/preprocessing/target_builders:abstract_target_builder", 20 | "//nuplan/planning/training/preprocessing/utils:feature_cache", 21 | "//nuplan/planning/training/preprocessing/utils:utils_cache", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/feature_builders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/feature_builders/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/feature_builders/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/feature_builders/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/features/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/features/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/features/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/features/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/target_builders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/target_builders/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/target_builders/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_test( 7 | name = "test_ego_trajectory_target_builder", 8 | size = "medium", 9 | srcs = ["test_ego_trajectory_target_builder.py"], 10 | tags = ["manual"], 11 | deps = [ 12 | "//nuplan/planning/scenario_builder/test:mock_abstract_scenario", 13 | "//nuplan/planning/simulation/trajectory:trajectory_sampling", 14 | "//nuplan/planning/training/preprocessing/target_builders:ego_trajectory_target_builder", 15 | requirement("hypothesis"), 16 | requirement("numpy"), 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/target_builders/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/target_builders/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/training/preprocessing/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/training/preprocessing/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "color", 8 | srcs = ["color.py"], 9 | deps = [ 10 | requirement("numpy"), 11 | ], 12 | ) 13 | -------------------------------------------------------------------------------- /nuplan/planning/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/lr_schedulers/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_library( 6 | name = "sequential_lr_scheduler", 7 | srcs = ["sequential_lr_scheduler.py"], 8 | deps = [], 9 | ) 10 | -------------------------------------------------------------------------------- /nuplan/planning/utils/lr_schedulers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/lr_schedulers/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/lr_schedulers/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | load("@pip_torch_deps//:requirements.bzl", requirement_torch = "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_test( 7 | name = "test_sequential_lr_scheduler", 8 | size = "small", 9 | srcs = ["test_sequential_lr_scheduler.py"], 10 | deps = [ 11 | "//nuplan/planning/utils/lr_schedulers:sequential_lr_scheduler", 12 | requirement_torch("torch"), 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /nuplan/planning/utils/lr_schedulers/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/lr_schedulers/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/multithreading/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/multithreading/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/multithreading/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/multithreading/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/serialization/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/serialization/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/serialization/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/serialization/test/__init__.py -------------------------------------------------------------------------------- /nuplan/planning/utils/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_color", 7 | srcs = ["test_color.py"], 8 | deps = [ 9 | "//nuplan/planning/utils:color", 10 | ], 11 | ) 12 | 13 | py_test( 14 | name = "test_scene_color", 15 | srcs = ["test_scene_color.py"], 16 | deps = [ 17 | "//nuplan/planning/utils:color", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /nuplan/planning/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/planning/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/evalai/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "evalai_interface", 8 | srcs = ["evalai_interface.py"], 9 | deps = [ 10 | requirement("requests"), 11 | ], 12 | ) 13 | 14 | py_library( 15 | name = "leaderboard_writer", 16 | srcs = ["leaderboard_writer.py"], 17 | deps = [ 18 | ":evalai_interface", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /nuplan/submission/evalai/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/evalai/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/evalai/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_test( 7 | name = "test_evalai_interface", 8 | size = "small", 9 | srcs = ["test_evalai_interface.py"], 10 | deps = [ 11 | "//nuplan/submission/evalai:evalai_interface", 12 | ], 13 | ) 14 | 15 | py_test( 16 | name = "test_leaderboard_writer", 17 | size = "small", 18 | srcs = ["test_leaderboard_writer.py"], 19 | deps = [ 20 | "//nuplan/submission/evalai:leaderboard_writer", 21 | requirement("hydra-core"), 22 | requirement("pandas"), 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /nuplan/submission/evalai/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/evalai/test/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/submission_container_factory.py: -------------------------------------------------------------------------------- 1 | from nuplan.submission.submission_container import SubmissionContainer 2 | 3 | 4 | class SubmissionContainerFactory: 5 | """Factory for SubmissionContainer""" 6 | 7 | @staticmethod 8 | def build_submission_container(submission_image: str, container_name: str, port: int) -> SubmissionContainer: 9 | """ 10 | Builds a SubmissionContainer given submission image, container name and port 11 | :param submission_image: Name of the Docker image 12 | :param container_name: Name for the Docker container 13 | :param port: Port number 14 | :return: The constructed SubmissionContainer 15 | """ 16 | return SubmissionContainer(submission_image, container_name, port) 17 | -------------------------------------------------------------------------------- /nuplan/submission/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/test/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/test/test_submission_container_factory.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from unittest.mock import Mock, patch 3 | 4 | from nuplan.submission.submission_container_factory import SubmissionContainerFactory 5 | 6 | 7 | class TestSubmissionContainerFactory(unittest.TestCase): 8 | """Tests for SubmissionContainerFactory class""" 9 | 10 | @patch("nuplan.submission.submission_container_factory.SubmissionContainer") 11 | def test_build_submission_container(self, mock_submission_container: Mock) -> None: 12 | """Tests that the submission container factory correctly calls the builder.""" 13 | submission_image = "foo" 14 | container_name = "bar" 15 | port = 1234 16 | _ = SubmissionContainerFactory.build_submission_container(submission_image, container_name, port) 17 | mock_submission_container.assert_called_with(submission_image, container_name, port) 18 | 19 | 20 | if __name__ == '__main__': 21 | unittest.main() 22 | -------------------------------------------------------------------------------- /nuplan/submission/test/test_utils.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from unittest.mock import Mock, patch 3 | 4 | from nuplan.submission.utils.utils import find_free_port_number 5 | 6 | 7 | class TestUtils(unittest.TestCase): 8 | """Tests for util functions""" 9 | 10 | @patch("socket.socket") 11 | def test_find_port(self, mock_socket: Mock) -> None: 12 | """Test that method uses socket to find a free port, and returns it.""" 13 | mock_socket().getsockname.return_value = [0, "1234"] 14 | port = find_free_port_number() 15 | 16 | # Check a free port was searched 17 | mock_socket().bind.assert_called_once_with(("", 0)) 18 | # Check connection was closed 19 | mock_socket().close.assert_called_once() 20 | 21 | self.assertEqual(1234, port) 22 | 23 | 24 | if __name__ == '__main__': 25 | unittest.main() 26 | -------------------------------------------------------------------------------- /nuplan/submission/utils/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_library") 2 | load("@pip_nuplan_devkit_deps//:requirements.bzl", "requirement") 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | py_library( 7 | name = "utils", 8 | srcs = ["utils.py"], 9 | deps = [], 10 | ) 11 | 12 | py_library( 13 | name = "aws_utils", 14 | srcs = ["aws_utils.py"], 15 | deps = [ 16 | requirement("boto3"), 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /nuplan/submission/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/utils/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/utils/test/BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_python//python:defs.bzl", "py_test") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | py_test( 6 | name = "test_aws_utils", 7 | size = "small", 8 | srcs = ["test_aws_utils.py"], 9 | deps = [ 10 | "@nuplan_devkit//nuplan/submission/utils:aws_utils", 11 | ], 12 | ) 13 | 14 | py_test( 15 | name = "test_utils", 16 | size = "small", 17 | srcs = ["test_utils.py"], 18 | deps = [ 19 | "@nuplan_devkit//nuplan/submission/utils", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /nuplan/submission/utils/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/utils/test/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/utils/test/test_utils.py: -------------------------------------------------------------------------------- 1 | import tempfile 2 | import unittest 3 | 4 | from nuplan.submission.utils.utils import get_submission_logger 5 | 6 | 7 | class TestUtils(unittest.TestCase): 8 | """Tests for utils function.""" 9 | 10 | def test_submission_logger(self) -> None: 11 | """Tests the two handlers of the submission logger.""" 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | self.addCleanup(tmp_dir.cleanup) 14 | 15 | logfile = '/'.join([tmp_dir.name, 'bar.log']) 16 | 17 | logger = get_submission_logger('foo', logfile) 18 | 19 | logger.info("DONT MIND ME") 20 | logger.warning("HELLO") 21 | logger.error("WORLD!") 22 | 23 | # Only warning and error should appear on file 24 | with open(logfile, 'r') as f: 25 | self.assertEqual(len(f.readlines()), 2) 26 | -------------------------------------------------------------------------------- /nuplan/submission/validators/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/validators/__init__.py -------------------------------------------------------------------------------- /nuplan/submission/validators/abstract_submission_validator.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from abc import ABC, abstractmethod 4 | 5 | 6 | class AbstractSubmissionValidator(ABC): 7 | """Abstract class for submission validators.""" 8 | 9 | @abstractmethod 10 | def set_next(self, validator: AbstractSubmissionValidator) -> AbstractSubmissionValidator: 11 | """ 12 | Sets the next validator for the chain of validation of the submission. 13 | :param validator: The validator to be added after self 14 | :return: the added validator 15 | """ 16 | pass 17 | 18 | @abstractmethod 19 | def validate(self, submission: str) -> bool: 20 | """ 21 | Validates whether an image passes the chain of checks specified in the single validators. 22 | :param submission: The query submission 23 | :return: Whether all checks are passed 24 | """ 25 | pass 26 | -------------------------------------------------------------------------------- /nuplan/submission/validators/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan/submission/validators/test/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/script/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/script/config/common/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/simulation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/script/config/simulation/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/script/config/training/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/data_augmentation/pgp_agent_dropout_augmentation.yaml: -------------------------------------------------------------------------------- 1 | pgp_agent_dropout_augmentation: 2 | _target_: nuplan_garage.planning.training.data_augmentation.pgp.pgp_agent_dropout_augmentation.PGPAgentDropoutAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | dropout_rate: 0.5 # probability of an agent being dropout 7 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/data_augmentation/pgp_ego_history_dropout_augmentation.yaml: -------------------------------------------------------------------------------- 1 | PGPEgoHistoryDropoutAugmentor: 2 | _target_: nuplan_garage.planning.training.data_augmentation.pgp.pgp_ego_history_dropout_augmentation.PGPEgoHistoryDropoutAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.2 # probability of applying data augmentation for training 6 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/data_augmentation/pgp_kinematic_agent_augmentation.yaml: -------------------------------------------------------------------------------- 1 | pgp_kinematic_agent_augmentation: 2 | _target_: nuplan_garage.planning.training.data_augmentation.pgp.pgp_kinematic_agent_augmentation.PGPKinematicAgentAugmentor 3 | _convert_: 'all' 4 | 5 | augment_prob: 0.5 # probability of applying data augmentation for training 6 | mean: [1.0, 0.0, 0.0] # the mean vector of the Gaussian noise on [x, y, heading] 7 | std: [1.0, 1.0, 0.5] # the std vector of the Gaussian noise on [x, y, heading] 8 | low: [0.0, -1.0, -0.5] # lower bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 9 | high: [1.0, 1.0, 0.5] # upper bound on Uniform noise on [x, y, heading], used only if use_uniform_noise == true 10 | use_uniform_noise: false # use uniform noise instead of gaussian noise 11 | trajectory_length: 16 # the augmentation trajectory length 12 | dt: 0.5 # the time interval between two consecutive points of the trajectory 13 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/objective/l1_objective.yaml: -------------------------------------------------------------------------------- 1 | l1_objective: 2 | _target_: nuplan_garage.planning.training.modeling.objectives.l1_objective.L1Objective 3 | _convert_: 'all' 4 | weight: 1.0 # weight contribution to the overall loss 5 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/objective/pgp_minADE_objective.yaml: -------------------------------------------------------------------------------- 1 | minADE_objective: 2 | _target_: nuplan_garage.planning.training.modeling.objectives.pgp_minADE_objective.minADEObjective 3 | _convert_: 'all' 4 | weight: 1.0 5 | k: ${model.decoder.num_clusters} 6 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/objective/pgp_traversal_objective.yaml: -------------------------------------------------------------------------------- 1 | pgp_traversal_objective: 2 | _target_: nuplan_garage.planning.training.modeling.objectives.pgp_traversal_objective.PGPTraversalObjective 3 | _convert_: 'all' 4 | weight: 0.5 5 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/training_metric/min_avg_displacement_error.yaml: -------------------------------------------------------------------------------- 1 | min_avg_displacement_error: 2 | _target_: nuplan_garage.planning.training.modeling.metrics.prediction_metrics.MinAverageDisplacementError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan_garage/planning/script/config/training/training_metric/min_final_displacement_error.yaml: -------------------------------------------------------------------------------- 1 | min_final_displacement_error: 2 | _target_: nuplan_garage.planning.training.modeling.metrics.prediction_metrics.MinFinalDisplacementError 3 | _convert_: 'all' 4 | -------------------------------------------------------------------------------- /nuplan_garage/planning/simulation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/simulation/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/simulation/planner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/simulation/planner/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/training/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/training/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/training/data_augmentation/pgp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/training/data_augmentation/pgp/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/training/modeling/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/training/modeling/__init__.py -------------------------------------------------------------------------------- /nuplan_garage/planning/training/preprocessing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AIR-THU/Asyncdriver-Tensorrt/fa014547f14dd4326482f5a9c6868f8f61581962/nuplan_garage/planning/training/preprocessing/__init__.py -------------------------------------------------------------------------------- /onnx_to_trt.sh: -------------------------------------------------------------------------------- 1 | /usr/src/tensorrt/bin/trtexec --onnx=./onnx32_lora_hidden/model.onnx \ 2 | --minShapes=inputs_embeds:1x1x2048,attention_mask:1x1,position_ids:1x1 \ 3 | --optShapes=inputs_embeds:1x64x2048,attention_mask:1x64,position_ids:1x64 \ 4 | --maxShapes=inputs_embeds:1x512x2048,attention_mask:1x512,position_ids:1x512 \ 5 | --saveEngine=model_dynamic_hiddden_lora_32.engine 6 | --fp16 -------------------------------------------------------------------------------- /requirements_asyncdriver.txt: -------------------------------------------------------------------------------- 1 | theseus-ai==0.1.3 2 | transformers==4.34.1 3 | tokenizers==0.14.1 4 | deepspeed==0.11.1 5 | accelerate==0.21.0 6 | peft==0.6.0 7 | scikit-learn==1.2.2 8 | sentencepiece==0.1.99 9 | einops==0.6.1 10 | bitsandbytes==0.39.0 11 | pydantic==1.10.12 -------------------------------------------------------------------------------- /requirements_torch.txt: -------------------------------------------------------------------------------- 1 | --find-links https://download.pytorch.org/whl/torch_stable.html 2 | --find-links https://data.pyg.org/whl/torch-1.9.0+cu111.html 3 | future==0.18.1 4 | pytorch-lightning==1.3.8 # Used widely 5 | setuptools==59.5.0 6 | timm # Used in model_raster 7 | 8 | torch==1.9.0+cu111; platform_system == "Linux" 9 | torch==1.9.0; platform_system == "Darwin" 10 | torch_scatter==2.0.9; platform_system == "Linux" 11 | torchmetrics==0.7.2 12 | torchvision==0.10.0+cu111 13 | -------------------------------------------------------------------------------- /train_script/inference/asyncdriver_infer.sh: -------------------------------------------------------------------------------- 1 | CUDA_VISIBLE_DEVICES=$1 python train_script/inference/simulator_llama4drive.py \ 2 | --planner path/to/ckpt \ 3 | --base_model path/to/llama-2-13b-chat-hf \ 4 | --planner_type llama4drive_lora_ins_wo_stop \ 5 | --save_dir asyncdriver_exp \ 6 | --ins_wo_stop \ 7 | --short_ins 30 \ 8 | --lora_r 8 \ 9 | --type $2 \ 10 | --simulation_root_path path/to/simulation_save_root_path \ 11 | --onnx_model_path path/to/onnx_model_path \ 12 | --tensorrt_model_path path/to/tensorrt_model_path \ 13 | --inference_model_type torch \ -------------------------------------------------------------------------------- /train_script/inference/with_interval.sh: -------------------------------------------------------------------------------- 1 | CUDA_VISIBLE_DEVICES=$1 python train_script/inference/simulator_llama4drive.py \ 2 | --planner path/to/ckpt \ 3 | --base_model path/to/llama-2-13b-chat-hf \ 4 | --planner_type llama4drive_lora_ins_wo_stop \ 5 | --save_dir asyncdriver_inter_$3 \ 6 | --ins_wo_stop \ 7 | --short_ins 30 \ 8 | --lora_r 8 \ 9 | --type $2 \ 10 | --llm_inf_step $3 \ 11 | --simulation_root_path path/to/simulation_save_root_path \ -------------------------------------------------------------------------------- /train_script/inference/with_pdm_scorer.sh: -------------------------------------------------------------------------------- 1 | CUDA_VISIBLE_DEVICES=$1 python train_script/inference/simulator_llama4drive.py \ 2 | --planner path/to/ckpt \ 3 | --base_model path/to/llama-2-13b-chat-hf \ 4 | --planner_type llama4drive_lora_ins_wo_stop_refine \ 5 | --save_dir asyncdriver_with_pdm_scorer \ 6 | --ins_wo_stop \ 7 | --short_ins 30 \ 8 | --refine \ 9 | --lora_r 8 \ 10 | --type $2 \ 11 | --simulation_root_path path/to/simulation_save_root_path \ --------------------------------------------------------------------------------