Skip to content

Commit

Permalink
feat(autoware_test_utils): move test_map, add launcher for test_map (#…
Browse files Browse the repository at this point in the history
…9045)

Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin authored Oct 21, 2024
1 parent 5a89973 commit d7bc6f4
Show file tree
Hide file tree
Showing 17 changed files with 90,240 additions and 30,281 deletions.
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

0 comments on commit d7bc6f4

Please sign in to comment.