Skip to content

Commit

Permalink
feat: replace python launch with xml launch for system monitor (autow…
Browse files Browse the repository at this point in the history
…arefoundation#2430)

* feat: replace python launch with xml launch for system monitor

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* ci(pre-commit): autofix

* update figure

Signed-off-by: Daisuke Nishimatsu <[email protected]>

Signed-off-by: Daisuke Nishimatsu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
wep21 and pre-commit-ci[bot] authored Dec 12, 2022
1 parent 4a6990c commit fa04d54
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 206 deletions.
3 changes: 2 additions & 1 deletion launch/tier4_system_launch/launch/system.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
<!-- System Monitor -->
<group if="$(var launch_system_monitor)">
<push-ros-namespace namespace="system_monitor"/>
<include file="$(find-pkg-share system_monitor)/launch/system_monitor.launch.py">
<include file="$(find-pkg-share system_monitor)/launch/system_monitor.launch.xml">
<arg name="cpu_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/cpu_monitor.param.yaml"/>
<arg name="hdd_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/hdd_monitor.param.yaml"/>
<arg name="mem_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/mem_monitor.param.yaml"/>
<arg name="net_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/net_monitor.param.yaml"/>
<arg name="ntp_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/ntp_monitor.param.yaml"/>
<arg name="process_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/process_monitor.param.yaml"/>
<arg name="gpu_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/gpu_monitor.param.yaml"/>
<arg name="voltage_monitor_config_file" value="$(var tier4_system_launch_param_path)/system_monitor/voltage_monitor.param.yaml"/>
</include>
</group>

Expand Down
4 changes: 2 additions & 2 deletions launch/tier4_system_launch/system_launch.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
171 changes: 0 additions & 171 deletions system/system_monitor/launch/system_monitor.launch.py

This file was deleted.

66 changes: 34 additions & 32 deletions system/system_monitor/launch/system_monitor.launch.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
<launch>
<arg name="cpu_monitor_config_file" default="$(find-pkg-share system_monitor)/config/cpu_monitor.param.yaml"/>
<arg name="hdd_monitor_config_file" default="$(find-pkg-share system_monitor)/config/hdd_monitor.param.yaml"/>
<arg name="mem_monitor_config_file" default="$(find-pkg-share system_monitor)/config/mem_monitor.param.yaml"/>
<arg name="net_monitor_config_file" default="$(find-pkg-share system_monitor)/config/net_monitor.param.yaml"/>
<arg name="ntp_monitor_config_file" default="$(find-pkg-share system_monitor)/config/ntp_monitor.param.yaml"/>
<arg name="process_monitor_config_file" default="$(find-pkg-share system_monitor)/config/process_monitor.param.yaml"/>
<arg name="gpu_monitor_config_file" default="$(find-pkg-share system_monitor)/config/gpu_monitor.param.yaml"/>
<arg name="voltage_monitor_config_file" default="$(find-pkg-share system_monitor)/config/voltage_monitor.param.yaml"/>
<arg name="cpu_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/cpu_monitor.param.yaml"/>
<arg name="hdd_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/hdd_monitor.param.yaml"/>
<arg name="mem_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/mem_monitor.param.yaml"/>
<arg name="net_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/net_monitor.param.yaml"/>
<arg name="ntp_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/ntp_monitor.param.yaml"/>
<arg name="process_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/process_monitor.param.yaml"/>
<arg name="gpu_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/gpu_monitor.param.yaml"/>
<arg name="voltage_monitor_config_file" default="$(find-pkg-share tier4_system_launch)/config/system_monitor/voltage_monitor.param.yaml"/>

<group>
<node pkg="system_monitor" exec="cpu_monitor" name="cpu_monitor" output="log" respawn="true">
<param from="$(var cpu_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="hdd_monitor" name="hdd_monitor" output="log" respawn="true">
<param from="$(var hdd_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="mem_monitor" name="mem_monitor" output="log" respawn="true">
<param from="$(var mem_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="net_monitor" name="net_monitor" output="log" respawn="true">
<param from="$(var net_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="ntp_monitor" name="ntp_monitor" output="log" respawn="true">
<param from="$(var ntp_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="process_monitor" name="process_monitor" output="log" respawn="true">
<param from="$(var process_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="gpu_monitor" name="gpu_monitor" output="log" respawn="true">
<param from="$(var gpu_monitor_config_file)"/>
</node>
<node pkg="system_monitor" exec="voltage_monitor" name="voltage_monitor" output="log" respawn="true">
<param from="$(var voltage_monitor_config_file)"/>
</node>
<node_container pkg="rclcpp_components" exec="component_container_mt" name="system_monitor_container" namespace="system_monitor" output="screen">
<composable_node pkg="system_monitor" plugin="CPUMonitor" name="cpu_monitor">
<param from="$(var cpu_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="MemMonitor" name="mem_monitor">
<param from="$(var mem_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="NetMonitor" name="net_monitor">
<param from="$(var net_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="NTPMonitor" name="ntp_monitor">
<param from="$(var ntp_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="ProcessMonitor" name="process_monitor">
<param from="$(var process_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="HddMonitor" name="hdd_monitor">
<param from="$(var hdd_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="GPUMonitor" name="gpu_monitor">
<param from="$(var gpu_monitor_config_file)"/>
</composable_node>
<composable_node pkg="system_monitor" plugin="VoltageMonitor" name="voltage_monitor">
<param from="$(var voltage_monitor_config_file)"/>
</composable_node>
</node_container>
</group>
</launch>

0 comments on commit fa04d54

Please sign in to comment.