Skip to content

Commit

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

* 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 <[email protected]>

Co-authored-by: Kenji Miyake <[email protected]>

* Move simple_planning_simulator to simulator_launch (autowarefoundation#462)

* move simple_planning_simulator

* add simulation arg to logging_simulator.launch

* delete unused argument

* add arguments for logging simulation

* change default value

* update README

* add default value to simulator arg

* restore vehicle_simulation arg

* Fix/revert initial engage state (autowarefoundation#484)

* Fix args

Signed-off-by: Kenji Miyake <[email protected]>

* Add initial_engage_state to vehicle.launch.xml

Signed-off-by: Kenji Miyake <[email protected]>

* Update vehicle.launch.xml

* Change formatter to black (autowarefoundation#488)

* Update pre-commit settings

* Apply Black

* Replace ament_lint_common with autoware_lint_common

* Update build_depends.repos

* Fix build_depends

* Auto/fix launch (autowarefoundation#110)

* fix namespace

* remove dynamic_object_visualization

* fix rviz

* add default vehicle param file

Signed-off-by: tomoya.kimura <[email protected]>

* ci(pre-commit): autofix

* fix typo

Signed-off-by: tomoya.kimura <[email protected]>

Co-authored-by: Keisuke Shima <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka3 <[email protected]>
  • Loading branch information
6 people authored Dec 14, 2021
1 parent bea243d commit 9f2e63c
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 42 deletions.
14 changes: 14 additions & 0 deletions launch/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
)
20 changes: 20 additions & 0 deletions launch/simulator_launch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# simulator_launch

## Structure

![simulator_launch](./simulator_launch.drawio.svg)

## Package Dependencies

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

## Usage

```xml
<include file="$(find-pkg-share simulator_launch)/launch/simulator.launch.xml">
<arg name="vehicle_info_param_file" value="VEHICLE_INFO_PARAM_FILE" />
<arg name="vehicle_model" value="VEHICLE_MODEL"/>
</include>
```

The simulator model used in simple_planning_simulator is loaded from "config/simulator_model.param.yaml" in the "`VEHICLE_MODEL`\_description" package.
40 changes: 40 additions & 0 deletions launch/simulator_launch/launch/simulator.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<launch>
<arg name="vehicle_info_param_file" />
<arg name="scenario_simulation" default="" description="use scenario simulation"/>

<arg name="perception/enable_detection_failure" default="true" description="enable to simulate detection failure when using dummy perception"/>
<arg name="perception/enable_object_recognition" default="false" description="enable object recognition when using dummy perception"/>
<arg name="sensing/visible_range" default="300.0" description="visible range when using dummy perception"/>

<arg name="vehicle_simulation" default="true" description="use vehicle simulation"/>
<arg name="vehicle_model" description="vehicle model name"/>
<arg name="initial_engage_state" default="true" description="/vehicle/engage state after starting Autoware"/>

<let name="vehicle_model_pkg" value="$(find-pkg-share $(var vehicle_model)_description)"/>

<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>

<!-- Simulator model -->
<group if="$(var vehicle_simulation)">
<group unless="$(var scenario_simulation)">
<arg name="simulator_model" default="$(var vehicle_model_pkg)/config/simulator_model.param.yaml" description="path to the file of simulator model"/>
<include file="$(find-pkg-share simple_planning_simulator)/launch/simple_planning_simulator.launch.py">
<arg name="vehicle_info_param_file" value="$(var vehicle_info_param_file)" />
<arg name="simulator_model_param_file" value="$(var simulator_model)"/>
<arg name="initial_engage_state" value="$(var initial_engage_state)"/>
</include>
</group>
</group>

</launch>
23 changes: 23 additions & 0 deletions launch/simulator_launch/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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="[email protected]">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>
<exec_depend>simple_planning_simulator</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

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

0 comments on commit 9f2e63c

Please sign in to comment.