Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(autoware_test_utils): move test_map, add launcher for test_map #9045

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/autoware_test_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ ament_auto_package(INSTALL_TO_SHARE
config
test_map
test_data
launch
)
36 changes: 35 additions & 1 deletion common/autoware_test_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The objective of the `test_utils` is to develop a unit testing library for the A

## Available Maps

The following maps are available [here](https://github.com/autowarefoundation/autoware.universe/tree/main/planning/autoware_test_utils/test_map)
The following maps are available [here](https://github.com/autowarefoundation/autoware.universe/tree/main/common/autoware_test_utils/test_map)

### Common

Expand All @@ -33,6 +33,40 @@ The following illustrates the design of the map.

![straight_diagram](./images/2km-test.svg)

### road_shoulders

The road_shoulders lanelet map consist of a variety of pick-up/drop-off site maps with road_shoulder tags including:

- pick-up/drop-off sites on the side of street lanes
- pick-up/drop-off sites on the side of curved lanes
- pick-up/drop-off sites inside a private area

![road_shoulder_test](./images/road_shoulder_test_map.png)

You can easily launch planning_simulator by

```bash
ros2 launch autoware_test_utils psim_road_shoulder.launch.xml vehicle_model:=<> sensor_model:=<> use_sim_time:=true
```

### intersection

The intersections lanelet map consist of a variety of intersections including:

- 4-way crossing with traffic light
- 4-way crossing without traffic light
- T-shape crossing without traffic light
- intersection with a loop
- complicated intersection

![intersection_test](./images/intersection_test_map.png)

You can easily launch planning_simulator by

```bash
ros2 launch autoware_test_utils psim_intersection.launch.xml vehicle_model:=<> sensor_model:=<> use_sim_time:=true
```

## Example use cases

### Autoware Planning Test Manager
Expand Down
16 changes: 16 additions & 0 deletions common/autoware_test_utils/launch/psim_intersection.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- Essential parameters -->
<arg name="vehicle_model" default="sample_vehicle" description="vehicle model name"/>
<arg name="sensor_model" default="sample_sensor_kit" description="sensor model name"/>
<arg name="rviz_config" default="$(find-pkg-share autoware_launch)/rviz/autoware.rviz" description="rviz config"/>
<arg name="use_sim_time" default="true"/>

<include file="$(find-pkg-share autoware_launch)/launch/planning_simulator.launch.xml">
<arg name="map_path" value="$(find-pkg-share autoware_test_utils)/test_map/intersection"/>
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="rviz_config" value="$(var rviz_config)"/>
</include>
</launch>
16 changes: 16 additions & 0 deletions common/autoware_test_utils/launch/psim_road_shoulder.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- Essential parameters -->
<arg name="vehicle_model" default="sample_vehicle" description="vehicle model name"/>
<arg name="sensor_model" default="sample_sensor_kit" description="sensor model name"/>
<arg name="rviz_config" default="$(find-pkg-share autoware_launch)/rviz/autoware.rviz" description="rviz config"/>
<arg name="use_sim_time" default="true"/>

<include file="$(find-pkg-share autoware_launch)/launch/planning_simulator.launch.xml">
<arg name="map_path" value="$(find-pkg-share autoware_test_utils)/test_map/road_shoulder"/>
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="rviz_config" value="$(var rviz_config)"/>
</include>
</launch>
Loading
Loading