Skip to content

Commit

Permalink
feat: use new diagsnotics for camera topic rate (#240)
Browse files Browse the repository at this point in the history
* test

* fix: update dummy_diag
  • Loading branch information
0x126 committed Jul 2, 2024
1 parent 4cfcbad commit 342f381
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 169 deletions.
16 changes: 8 additions & 8 deletions aip_x2_launch/config/dummy_diag_publisher/sensor_kit.param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@
"pandar_monitor: /sensing/lidar/rear_upper: pandar_ptp": default

## /sensing/camera/001-connection
"topic_state_monitor_camera0: camera0_topic_status": default
"topic_state_monitor_camera1: camera1_topic_status": default
"topic_state_monitor_camera2: camera2_topic_status": default
"topic_state_monitor_camera3: camera3_topic_status": default
"topic_state_monitor_camera4: camera4_topic_status": default
"topic_state_monitor_camera5: camera5_topic_status": default
"topic_state_monitor_camera6: camera6_topic_status": default
"topic_state_monitor_camera7: camera7_topic_status": default
"v4l2_camera_camera0: capture_status": default
"v4l2_camera_camera1: capture_status": default
"v4l2_camera_camera2: capture_status": default
"v4l2_camera_camera3: capture_status": default
"v4l2_camera_camera4: capture_status": default
"v4l2_camera_camera5: capture_status": default
"v4l2_camera_camera6: capture_status": default
"v4l2_camera_camera7: capture_status": default

## /sensing/radar/001-connection
"topic_state_monitor_radar_front_center: radar_front_center_topic_status": default
Expand Down
161 changes: 0 additions & 161 deletions aip_x2_launch/launch/topic_state_monitor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,159 +173,6 @@ def generate_launch_description():
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",
Expand All @@ -341,14 +188,6 @@ def generate_launch_description():
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",
)
Expand Down

0 comments on commit 342f381

Please sign in to comment.