-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
283 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
wget https://motional-nuplan.s3-ap-northeast-1.amazonaws.com/public/nuplan-v1.1/nuplan-maps-v1.1.zip | ||
unzip nuplan-maps-v1.1.zip | ||
rm nuplan-maps-v1.1.zip | ||
mv nuplan-maps-v1.0 maps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/openscene-v1.1/openscene_metadata_mini.tgz | ||
tar -xzf openscene_metadata_mini.tgz | ||
rm openscene_metadata_mini.tgz | ||
|
||
for split in {0..31}; do | ||
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/openscene-v1.1/openscene_sensor_mini_camera/openscene_sensor_mini_camera_${split}.tgz | ||
echo "Extracting file openscene_sensor_mini_camera_${split}.tgz" | ||
tar -xzf openscene_sensor_mini_camera_${split}.tgz | ||
rm openscene_sensor_mini_camera_${split}.tgz | ||
done | ||
|
||
for split in {0..31}; do | ||
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/openscene-v1.1/openscene_sensor_mini_lidar/openscene_sensor_mini_lidar_${split}.tgz | ||
echo "Extracting file openscene_sensor_mini_lidar_${split}.tgz" | ||
tar -xzf openscene_sensor_mini_lidar_${split}.tgz | ||
rm openscene_sensor_mini_lidar_${split}.tgz | ||
done | ||
|
||
mv openscene_v1.1/meta_datas mini_navsim_logs | ||
rm -r openscene_v1.1 | ||
|
||
mv openscene-v1.1/sensor_blobs mini_sensor_blobs | ||
rm -r openscene-v1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/openscene-v1.1/openscene_metadata_test.tgz | ||
tar -xzf openscene_metadata_test.tgz | ||
rm openscene_metadata_test.tgz | ||
|
||
for split in {0..31}; do | ||
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/openscene-v1.1/openscene_sensor_test_camera/openscene_sensor_test_camera_${split}.tgz | ||
echo "Extracting file openscene_sensor_test_camera_${split}.tgz" | ||
tar -xzf openscene_sensor_test_camera_${split}.tgz | ||
rm openscene_sensor_test_camera_${split}.tgz | ||
done | ||
|
||
for split in {0..31}; do | ||
wget https://huggingface.co/datasets/OpenDriveLab/OpenScene/resolve/main/openscene-v1.1/openscene_sensor_test_lidar/openscene_sensor_test_lidar_${split}.tgz | ||
echo "Extracting file openscene_sensor_test_lidar_${split}.tgz" | ||
tar -xzf openscene_sensor_test_lidar_${split}.tgz | ||
rm openscene_sensor_test_lidar_${split}.tgz | ||
done | ||
|
||
mv openscene_v1.1/meta_datas test_navsim_logs | ||
rm -r openscene_v1.1 | ||
mkdir | ||
mv openscene-v1.1/sensor_blobs test_sensor_blobs | ||
rm -r openscene-v1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from typing import List | ||
from nuplan.planning.simulation.trajectory.trajectory_sampling import TrajectorySampling | ||
from navsim.agents.abstract_agent import AbstractAgent | ||
from navsim.common.dataclasses import AgentInput, Trajectory, Scene | ||
|
||
class HumanAgent(AbstractAgent): | ||
|
||
requires_scene = True | ||
|
||
def __init__( | ||
self, | ||
trajectory_sampling: TrajectorySampling = TrajectorySampling( | ||
time_horizon=4, interval_length=0.5 | ||
), | ||
): | ||
self._trajectory_sampling = trajectory_sampling | ||
|
||
def name(self) -> str: | ||
"""Inherited, see superclass.""" | ||
|
||
return self.__class__.__name__ | ||
|
||
def initialize(self) -> None: | ||
"""Inherited, see superclass.""" | ||
pass | ||
|
||
def get_sensor_modalities(self) -> List[str]: | ||
"""Inherited, see superclass.""" | ||
return [] | ||
|
||
def compute_trajectory(self, agent_input: AgentInput, scene: Scene) -> Trajectory: | ||
""" | ||
Computes the ego vehicle trajectory. | ||
:param current_input: Dataclass with agent inputs. | ||
:return: Trajectory representing the predicted ego's position in future | ||
""" | ||
return scene.get_future_trajectory(self._trajectory_sampling.num_poses) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.