From b8bbcfd8f69d403bdf7f9b03100e8515293d1f1f Mon Sep 17 00:00:00 2001 From: Tomohito Ando Date: Mon, 25 Mar 2024 11:20:08 +0900 Subject: [PATCH 1/5] feat: add topic state monitor for sensors Signed-off-by: Tomohito Ando --- aip_x2_launch/launch/sensing.launch.xml | 4 + .../launch/topic_state_monitor.launch.xml | 201 ++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 aip_x2_launch/launch/topic_state_monitor.launch.xml diff --git a/aip_x2_launch/launch/sensing.launch.xml b/aip_x2_launch/launch/sensing.launch.xml index 51614263..8b4888d0 100644 --- a/aip_x2_launch/launch/sensing.launch.xml +++ b/aip_x2_launch/launch/sensing.launch.xml @@ -37,6 +37,10 @@ + + + + diff --git a/aip_x2_launch/launch/topic_state_monitor.launch.xml b/aip_x2_launch/launch/topic_state_monitor.launch.xml new file mode 100644 index 00000000..f68f2692 --- /dev/null +++ b/aip_x2_launch/launch/topic_state_monitor.launch.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 29992213c1fd1e41382b07d5b722e3a0dc037766 Mon Sep 17 00:00:00 2001 From: Tomohito Ando Date: Mon, 25 Mar 2024 18:23:59 +0900 Subject: [PATCH 2/5] fix comments Signed-off-by: Tomohito Ando --- aip_x2_launch/launch/sensing.launch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip_x2_launch/launch/sensing.launch.xml b/aip_x2_launch/launch/sensing.launch.xml index 8b4888d0..9e5ee977 100644 --- a/aip_x2_launch/launch/sensing.launch.xml +++ b/aip_x2_launch/launch/sensing.launch.xml @@ -38,7 +38,7 @@ - + From 722a4c0b5047fe6e6ab1a6b1627525e3f44e37ab Mon Sep 17 00:00:00 2001 From: Tomohito Ando Date: Tue, 26 Mar 2024 16:18:46 +0900 Subject: [PATCH 3/5] replace launch.xml with launch.py Signed-off-by: Tomohito Ando --- aip_x2_launch/launch/sensing.launch.xml | 2 +- .../launch/topic_state_monitor.launch.py | 311 ++++++++++++++++++ .../launch/topic_state_monitor.launch.xml | 201 ----------- 3 files changed, 312 insertions(+), 202 deletions(-) create mode 100644 aip_x2_launch/launch/topic_state_monitor.launch.py delete mode 100644 aip_x2_launch/launch/topic_state_monitor.launch.xml diff --git a/aip_x2_launch/launch/sensing.launch.xml b/aip_x2_launch/launch/sensing.launch.xml index 9e5ee977..29713934 100644 --- a/aip_x2_launch/launch/sensing.launch.xml +++ b/aip_x2_launch/launch/sensing.launch.xml @@ -39,7 +39,7 @@ - + diff --git a/aip_x2_launch/launch/topic_state_monitor.launch.py b/aip_x2_launch/launch/topic_state_monitor.launch.py new file mode 100644 index 00000000..71480a29 --- /dev/null +++ b/aip_x2_launch/launch/topic_state_monitor.launch.py @@ -0,0 +1,311 @@ +from launch import LaunchDescription +from launch_ros.actions import ComposableNodeContainer +from launch_ros.descriptions import ComposableNode + +def generate_launch_description(): + # GNSS topic monitor + gnss_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_gnss_pose", + parameters=[{ + "topic": "/sensing/gnss/pose", + "topic_type": "geometry_msgs/msg/PoseStamped", + "best_effort": True, + "diag_name": "gnss_topic_status", + "warn_rate": 2.5, + "error_rate": 0.5, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + # IMU topic monitor + imu_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_imu_data", + parameters=[{ + "topic": "/sensing/imu/imu_data", + "topic_type": "sensor_msgs/msg/Imu", + "best_effort": True, + "diag_name": "imu_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + # Radar topic monitors + radar_front_center_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_radar_front_center", + parameters=[{ + "topic": "/sensing/radar/front_center/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_front_center_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + radar_front_left_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_radar_front_left", + parameters=[{ + "topic": "/sensing/radar/front_left/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_front_left_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + radar_front_right_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_radar_front_right", + parameters=[{ + "topic": "/sensing/radar/front_right/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_front_right_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + radar_rear_center_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_radar_rear_center", + parameters=[{ + "topic": "/sensing/radar/rear_center/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_rear_center_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + radar_rear_left_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_radar_rear_left", + parameters=[{ + "topic": "/sensing/radar/rear_left/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_rear_left_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + radar_rear_right_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_radar_rear_right", + parameters=[{ + "topic": "/sensing/radar/rear_right/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_rear_right_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + # Camera topic monitors + camera0_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera0", + parameters=[{ + "topic": "/sensing/camera/camera0/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera0_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera1_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera1", + parameters=[{ + "topic": "/sensing/camera/camera1/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera1_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera2_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera2", + parameters=[{ + "topic": "/sensing/camera/camera2/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera2_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera3_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera3", + parameters=[{ + "topic": "/sensing/camera/camera3/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera3_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera4_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera4", + parameters=[{ + "topic": "/sensing/camera/camera4/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera4_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera5_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera5", + parameters=[{ + "topic": "/sensing/camera/camera5/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera5_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera6_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera6", + parameters=[{ + "topic": "/sensing/camera/camera6/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera6_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + camera7_topic_monitor = ComposableNode( + package="topic_state_monitor", + plugin="topic_state_monitor::TopicStateMonitorNode", + name="topic_state_monitor_camera7", + parameters=[{ + "topic": "/sensing/camera/camera7/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera7_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + }], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + # ComposableNodeContainer to run all ComposableNodes + container = ComposableNodeContainer( + name="topic_state_monitor_container", + namespace="topic_state_monitor", + package="rclcpp_components", + executable="component_container", + composable_node_descriptions=[ + gnss_topic_monitor, + imu_topic_monitor, + radar_front_center_monitor, + radar_front_left_monitor, + radar_front_right_monitor, + radar_rear_center_monitor, + radar_rear_left_monitor, + radar_rear_right_monitor, + camera0_topic_monitor, + camera1_topic_monitor, + camera2_topic_monitor, + camera3_topic_monitor, + camera4_topic_monitor, + camera5_topic_monitor, + camera6_topic_monitor, + camera7_topic_monitor, + ], + output="screen", + ) + + return LaunchDescription([ + container + ]) diff --git a/aip_x2_launch/launch/topic_state_monitor.launch.xml b/aip_x2_launch/launch/topic_state_monitor.launch.xml deleted file mode 100644 index f68f2692..00000000 --- a/aip_x2_launch/launch/topic_state_monitor.launch.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 6b90c30e596a5d975a02266be48d9b0023897600 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 07:19:10 +0000 Subject: [PATCH 4/5] ci(pre-commit): autofix --- .../launch/topic_state_monitor.launch.py | 357 ++++++++++-------- 1 file changed, 194 insertions(+), 163 deletions(-) diff --git a/aip_x2_launch/launch/topic_state_monitor.launch.py b/aip_x2_launch/launch/topic_state_monitor.launch.py index 71480a29..4ff61e05 100644 --- a/aip_x2_launch/launch/topic_state_monitor.launch.py +++ b/aip_x2_launch/launch/topic_state_monitor.launch.py @@ -2,22 +2,25 @@ from launch_ros.actions import ComposableNodeContainer from launch_ros.descriptions import ComposableNode + def generate_launch_description(): # GNSS topic monitor gnss_topic_monitor = ComposableNode( package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_gnss_pose", - parameters=[{ - "topic": "/sensing/gnss/pose", - "topic_type": "geometry_msgs/msg/PoseStamped", - "best_effort": True, - "diag_name": "gnss_topic_status", - "warn_rate": 2.5, - "error_rate": 0.5, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/gnss/pose", + "topic_type": "geometry_msgs/msg/PoseStamped", + "best_effort": True, + "diag_name": "gnss_topic_status", + "warn_rate": 2.5, + "error_rate": 0.5, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -26,16 +29,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_imu_data", - parameters=[{ - "topic": "/sensing/imu/imu_data", - "topic_type": "sensor_msgs/msg/Imu", - "best_effort": True, - "diag_name": "imu_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/imu/imu_data", + "topic_type": "sensor_msgs/msg/Imu", + "best_effort": True, + "diag_name": "imu_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -44,16 +49,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_radar_front_center", - parameters=[{ - "topic": "/sensing/radar/front_center/objects_raw", - "topic_type": "radar_msgs/msg/RadarTracks", - "best_effort": True, - "diag_name": "radar_front_center_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/radar/front_center/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_front_center_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -61,16 +68,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_radar_front_left", - parameters=[{ - "topic": "/sensing/radar/front_left/objects_raw", - "topic_type": "radar_msgs/msg/RadarTracks", - "best_effort": True, - "diag_name": "radar_front_left_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/radar/front_left/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_front_left_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -78,16 +87,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_radar_front_right", - parameters=[{ - "topic": "/sensing/radar/front_right/objects_raw", - "topic_type": "radar_msgs/msg/RadarTracks", - "best_effort": True, - "diag_name": "radar_front_right_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/radar/front_right/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_front_right_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -95,16 +106,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_radar_rear_center", - parameters=[{ - "topic": "/sensing/radar/rear_center/objects_raw", - "topic_type": "radar_msgs/msg/RadarTracks", - "best_effort": True, - "diag_name": "radar_rear_center_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/radar/rear_center/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_rear_center_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -112,16 +125,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_radar_rear_left", - parameters=[{ - "topic": "/sensing/radar/rear_left/objects_raw", - "topic_type": "radar_msgs/msg/RadarTracks", - "best_effort": True, - "diag_name": "radar_rear_left_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/radar/rear_left/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_rear_left_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -129,16 +144,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_radar_rear_right", - parameters=[{ - "topic": "/sensing/radar/rear_right/objects_raw", - "topic_type": "radar_msgs/msg/RadarTracks", - "best_effort": True, - "diag_name": "radar_rear_right_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/radar/rear_right/objects_raw", + "topic_type": "radar_msgs/msg/RadarTracks", + "best_effort": True, + "diag_name": "radar_rear_right_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -147,16 +164,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera0", - parameters=[{ - "topic": "/sensing/camera/camera0/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera0_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera0/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera0_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -164,16 +183,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera1", - parameters=[{ - "topic": "/sensing/camera/camera1/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera1_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera1/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera1_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -181,16 +202,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera2", - parameters=[{ - "topic": "/sensing/camera/camera2/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera2_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera2/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera2_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -198,16 +221,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera3", - parameters=[{ - "topic": "/sensing/camera/camera3/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera3_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera3/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera3_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -215,16 +240,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera4", - parameters=[{ - "topic": "/sensing/camera/camera4/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera4_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera4/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera4_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -232,16 +259,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera5", - parameters=[{ - "topic": "/sensing/camera/camera5/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera5_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera5/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera5_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -249,16 +278,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera6", - parameters=[{ - "topic": "/sensing/camera/camera6/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera6_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera6/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera6_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -266,16 +297,18 @@ def generate_launch_description(): package="topic_state_monitor", plugin="topic_state_monitor::TopicStateMonitorNode", name="topic_state_monitor_camera7", - parameters=[{ - "topic": "/sensing/camera/camera7/camera_info", - "topic_type": "sensor_msgs/msg/CameraInfo", - "best_effort": True, - "diag_name": "camera7_topic_status", - "warn_rate": 5.0, - "error_rate": 1.0, - "timeout": 5.0, - "window_size": 10, - }], + parameters=[ + { + "topic": "/sensing/camera/camera7/camera_info", + "topic_type": "sensor_msgs/msg/CameraInfo", + "best_effort": True, + "diag_name": "camera7_topic_status", + "warn_rate": 5.0, + "error_rate": 1.0, + "timeout": 5.0, + "window_size": 10, + } + ], extra_arguments=[{"use_intra_process_comms": True}], ) @@ -306,6 +339,4 @@ def generate_launch_description(): output="screen", ) - return LaunchDescription([ - container - ]) + return LaunchDescription([container]) From c20e00bb797f299bff75ff57fbdbb88c232837d1 Mon Sep 17 00:00:00 2001 From: Tomohito Ando Date: Tue, 26 Mar 2024 16:21:18 +0900 Subject: [PATCH 5/5] add copyright Signed-off-by: Tomohito Ando --- aip_x2_launch/launch/topic_state_monitor.launch.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/aip_x2_launch/launch/topic_state_monitor.launch.py b/aip_x2_launch/launch/topic_state_monitor.launch.py index 4ff61e05..33752590 100644 --- a/aip_x2_launch/launch/topic_state_monitor.launch.py +++ b/aip_x2_launch/launch/topic_state_monitor.launch.py @@ -1,3 +1,17 @@ +# Copyright 2024 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 import LaunchDescription from launch_ros.actions import ComposableNodeContainer from launch_ros.descriptions import ComposableNode