Skip to content

Commit

Permalink
Add simulator_launch package (autowarefoundation#459)
Browse files Browse the repository at this point in the history
* Add simulator_launch package

* add argument

* fix depend order

* add argument

* move dummy_perception_publisher

* add arg for dummy_perception_publisher

* Update simulator_launch/launch/simulator.launch.xml

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
  • Loading branch information
KeisukeShima and kenji-miyake authored Oct 14, 2021
1 parent 13b8362 commit c4fd7d6
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 9 deletions.
17 changes: 8 additions & 9 deletions autoware_launch/launch/planning_simulator.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@
<arg name="pointcloud_map_path" value="$(var map_path)/$(var pointcloud_map_file)"/>
</include>

<!-- Dummy Perception -->
<group unless="$(var scenario_simulation)">
<include file="$(find-pkg-share dummy_perception_publisher)/launch/dummy_perception_publisher.launch.xml">
<arg name="real" value="$(var perception/enable_detection_failure)"/>
<arg name="use_object_recognition" value="$(var perception/enable_object_recognition)"/>
<arg name="visible_range" value="$(var sensing/visible_range)"/>
</include>
</group>

<!-- Planning -->
<include file="$(find-pkg-share planning_launch)/launch/planning.launch.xml">
</include>
Expand All @@ -74,4 +65,12 @@

<!-- Web Controller -->
<include file="$(find-pkg-share autoware_web_controller)/launch/autoware_web_controller.launch.xml" unless="$(var scenario_simulation)"/>

<!-- Simulator -->
<include file="$(find-pkg-share simulator_launch)/launch/simulator.launch.xml">
<arg name="scenario_simulation" value="$(var scenario_simulation)"/>
<arg name="perception/enable_detection_failure" value="$(var perception/enable_detection_failure)"/>
<arg name="perception/enable_object_recognition" value="$(var perception/enable_object_recognition)"/>
<arg name="sensing/visible_range" value="$(var sensing/visible_range)"/>
</include>
</launch>
1 change: 1 addition & 0 deletions autoware_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<exec_depend>python3-tornado</exec_depend>
<exec_depend>rviz2</exec_depend>
<exec_depend>sensing_launch</exec_depend>
<exec_depend>simulator_launch</exec_depend>
<exec_depend>system_launch</exec_depend>
<exec_depend>vehicle_launch</exec_depend>

Expand Down
14 changes: 14 additions & 0 deletions simulator_launch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(simulator_launch)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(INSTALL_TO_SHARE
launch
)
11 changes: 11 additions & 0 deletions simulator_launch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# simulator_launch

## Package Dependencies

Please see `<exec_depend>` in `package.xml`.

## Usage

```xml
<include file="$(find-pkg-share simulator_launch)/launch/simulator.launch.xml"/>
```
20 changes: 20 additions & 0 deletions simulator_launch/launch/simulator.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<launch>
<arg name="scenario_simulation" description="use scenario simulation"/>
<arg name="perception/enable_detection_failure" description="enable to simulate detection failure when using dummy perception"/>
<arg name="perception/enable_object_recognition" description="enable object recognition when using dummy perception"/>
<arg name="sensing/visible_range" description="visible range when using dummy perception"/>

<group if="$(var scenario_simulation)">
<include file="$(find-pkg-share fault_injection)/launch/fault_injection.launch.xml"/>
</group>

<!-- Dummy Perception -->
<group unless="$(var scenario_simulation)">
<include file="$(find-pkg-share dummy_perception_publisher)/launch/dummy_perception_publisher.launch.xml">
<arg name="real" value="$(var perception/enable_detection_failure)"/>
<arg name="use_object_recognition" value="$(var perception/enable_object_recognition)"/>
<arg name="visible_range" value="$(var sensing/visible_range)"/>
</include>
</group>

</launch>
22 changes: 22 additions & 0 deletions simulator_launch/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>simulator_launch</name>
<version>0.1.0</version>
<description>The simulator_launch package</description>

<maintainer email="keisuke.shima@tier4.jp">Keisuke Shima</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<exec_depend>dummy_perception_publisher</exec_depend>
<exec_depend>fault_injection</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>

0 comments on commit c4fd7d6

Please sign in to comment.