Skip to content

Commit

Permalink
chore: update diagnostics config (#124)
Browse files Browse the repository at this point in the history
* chore: add imu aggregator

* chore: update diag settings
  • Loading branch information
0x126 authored Apr 17, 2023
1 parent 7037d87 commit 385fb8f
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 1 deletion.
19 changes: 19 additions & 0 deletions aip_x2_launch/config/diagnostic_aggregator/sensor_kit.param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,22 @@
path: gnss
contains: [": gnss"]
timeout: 1.0
node_alive_monitoring:
type: diagnostic_aggregator/AnalyzerGroup
path: node_alive_monitoring
analyzers:
topic_status:
type: diagnostic_aggregator/GenericAnalyzer
path: topic_status
contains: [": septentrio_topic_status"]
timeout: 1.0

imu:
type: diagnostic_aggregator/AnalyzerGroup
path: imu
analyzers:
yaw_rate:
type: diagnostic_aggregator/GenericAnalyzer
path: yaw_rate
contains: [": yaw_rate_status"]
timeout: 1.0
8 changes: 8 additions & 0 deletions aip_x2_launch/launch/dummy_diag_publisher/sensing.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<arg name="diag_name" value="sensing_topic_status"/>
</include>

<include file="$(find-pkg-share dummy_diag_publisher)/launch/dummy_diag_publisher_node.launch.xml">
<arg name="diag_name" value="septentrio_topic_status"/>
</include>

<include file="$(find-pkg-share dummy_diag_publisher)/launch/dummy_diag_publisher_node.launch.xml">
<arg name="diag_name" value="concat_status"/>
</include>
Expand All @@ -15,4 +19,8 @@
<arg name="diag_name" value="temperature_status"/>
</include>

<include file="$(find-pkg-share dummy_diag_publisher)/launch/dummy_diag_publisher_node.launch.xml">
<arg name="diag_name" value="emergency_vehicle"/>
</include>

</launch>
5 changes: 4 additions & 1 deletion aip_x2_launch/launch/sensing.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<arg name="output_twist_with_covariance" value="/sensing/vehicle_velocity_converter/twist_with_covariance"/>
<arg name="config_file" value="$(find-pkg-share individual_params)/config/$(env VEHICLE_ID default)/aip_x2/vehicle_velocity_converter.param.yaml" />
</include>
</group>

<include file="$(find-pkg-share aip_x2_launch)/launch/topic_state_monitor.launch.py" />

</group>

</launch>
52 changes: 52 additions & 0 deletions aip_x2_launch/launch/topic_state_monitor.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2021 Tier IV, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from launch.launch_description import LaunchDescription
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode


def generate_launch_description():
topic_state_monitor_gnss = ComposableNode(
package="topic_state_monitor",
plugin="topic_state_monitor::TopicStateMonitorNode",
name="topic_state_monitor_gnss",
parameters=[
{
"topic": "/sensing/gnss/pose",
"topic_type": "geometry_msgs/msg/PoseStamped",
"best_effort": False,
"diag_name": "septentrio_topic_status",
"warn_rate": 2.5,
"error_rate": 0.5,
"timeout": 1.0,
"window_size": 10,
},
],
extra_arguments=[{"use_intra_process_comms": True}],
)

# set container to run all required components in the same process
container = ComposableNodeContainer(
name="topic_state_monitor_container",
namespace="topic_state_monitor",
package="rclcpp_components",
executable="component_container",
composable_node_descriptions=[
topic_state_monitor_gnss,
],
output="screen",
)

return LaunchDescription([container])

0 comments on commit 385fb8f

Please sign in to comment.