Skip to content

Commit

Permalink
Merge branch 'tier4/proposal' into 1-add-sensing-launch
Browse files Browse the repository at this point in the history
  • Loading branch information
taikitanaka3 authored Dec 14, 2021
2 parents 6c07aca + 3653645 commit 0b33bac
Show file tree
Hide file tree
Showing 15 changed files with 576 additions and 4 deletions.
20 changes: 20 additions & 0 deletions launch/system_launch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.5)
project(system_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()

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

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

## Structure

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

## Package Dependencies

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

## Usage

```xml
<include file="$(find-pkg-share system_launch)/launch/system.launch.xml">
<arg name="run_mode" value="online"/>
<arg name="sensor_model" value="SENSOR_MODEL"/>
</include>
```

The sensing configuration parameters used in autoware_error_monitor are loaded from "config/diagnostic_aggregator/sensor_kit.param.yaml" in the "`SENSOR_MODEL`\_description" package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**:
ros__parameters:
vehicle:
type: diagnostic_aggregator/AnalyzerGroup
path: vehicle
analyzers:
vehicle_errors:
type: diagnostic_aggregator/GenericAnalyzer
path: vehicle_errors
contains: [": vehicle_errors"]
timeout: 1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**:
ros__parameters:
usage_warn: 0.96
usage_error: 1.00
usage_count: 2
usage_avg: true
msr_reader_port: 7634
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**:
ros__parameters:
temp_warn: 90.0
temp_error: 95.0
gpu_usage_warn: 0.90
gpu_usage_error: 1.00
memory_usage_warn: 0.95
memory_usage_error: 0.99
11 changes: 11 additions & 0 deletions launch/system_launch/config/system_monitor/hdd_monitor.param.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**:
ros__parameters:
hdd_reader_port: 7635
num_disks: 1
disks: # Until multi type lists are allowed, name N the disks as disk0...disk{N-1}
disk0:
name: /dev/sda3
temp_warn: 55.0
temp_error: 70.0
free_warn: 5120 # MB(8hour)
free_error: 100 # MB(last 1 minute)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**:
ros__parameters:
available_size: 1024 # MB
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**:
ros__parameters:
devices: ["*"]
traffic_reader_port: 7636
monitor_program: "greengrass"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**:
ros__parameters:
server: ntp.nict.jp
offset_warn: 0.1
offset_error: 5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**:
ros__parameters:
num_of_procs: 5
48 changes: 48 additions & 0 deletions launch/system_launch/launch/system.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="run_mode" default="online" description="options: online, planning_simulation"/>
<arg name="sensor_model" description="sensor model name"/>

<let name="sensor_launch_pkg" value="$(find-pkg-share $(var sensor_model)_launch)"/>

<group>
<push-ros-namespace namespace="/system"/>

<!-- System Monitor -->
<group>
<push-ros-namespace namespace="system_monitor"/>
<include file="$(find-pkg-share system_monitor)/launch/system_monitor.launch.py">
<arg name="cpu_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/cpu_monitor.param.yaml"/>
<arg name="hdd_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/hdd_monitor.param.yaml"/>
<arg name="mem_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/mem_monitor.param.yaml"/>
<arg name="net_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/net_monitor.param.yaml"/>
<arg name="ntp_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/ntp_monitor.param.yaml"/>
<arg name="process_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/process_monitor.param.yaml"/>
<arg name="gpu_monitor_config_file" value="$(find-pkg-share system_launch)/config/system_monitor/gpu_monitor.param.yaml"/>
</include>
</group>

<!-- State Monitor -->
<let name="config_file" value="$(find-pkg-share autoware_state_monitor)/config/autoware_state_monitor.param.yaml" if="$(eval &quot;'$(var run_mode)'=='online'&quot;)"/>
<let name="config_file" value="$(find-pkg-share autoware_state_monitor)/config/autoware_state_monitor.planning_simulation.param.yaml" if="$(eval &quot;'$(var run_mode)'=='planning_simulation'&quot;)"/>
<include file="$(find-pkg-share autoware_state_monitor)/launch/autoware_state_monitor.launch.xml">
<arg name="config_file" value="$(var config_file)" />
</include>

<!-- Error Monitor -->
<let name="config_file" value="$(find-pkg-share autoware_error_monitor)/config/autoware_error_monitor.param.yaml" if="$(eval &quot;'$(var run_mode)'=='online'&quot;)"/>
<let name="config_file" value="$(find-pkg-share autoware_error_monitor)/config/autoware_error_monitor.planning_simulation.param.yaml" if="$(eval &quot;'$(var run_mode)'=='planning_simulation'&quot;)"/>
<include file="$(find-pkg-share autoware_error_monitor)/launch/autoware_error_monitor.launch.xml">
<arg name="config_file" value="$(var config_file)" />
<arg name="extra_agg_config_file_sensing" value="$(var sensor_launch_pkg)/config/diagnostic_aggregator/sensor_kit.param.yaml" />
<arg name="extra_agg_config_file_vehicle" value="$(find-pkg-share system_launch)/config/diagnostic_aggregator/vehicle.param.yaml" />
<arg name="use_emergency_hold" value="false" />
</include>

<!-- Emergency Handler -->
<include file="$(find-pkg-share emergency_handler)/launch/emergency_handler.launch.xml">
<arg name="config_file" value="$(find-pkg-share emergency_handler)/config/emergency_handler.param.yaml" />
</include>

</group>
</launch>
24 changes: 24 additions & 0 deletions launch/system_launch/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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>system_launch</name>
<version>0.1.0</version>
<description>The system_launch package</description>

<maintainer email="[email protected]">Kenji Miyake</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<exec_depend>autoware_error_monitor</exec_depend>
<exec_depend>autoware_state_monitor</exec_depend>
<exec_depend>emergency_handler</exec_depend>
<exec_depend>system_monitor</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 0b33bac

Please sign in to comment.