Skip to content

Commit 54e07b4

Browse files
committed
fix issue where if path is empty list it won't ingest topic
1 parent 3826fb1 commit 54e07b4

File tree

1 file changed

+4
-1
lines changed
  • formant_ros2_adapter/scripts

1 file changed

+4
-1
lines changed

formant_ros2_adapter/scripts/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,10 @@ def handle_ros2_message(self, msg, subscriber_config):
908908
ros2_topic = subscriber_config["ros2_topic"]
909909

910910
# Select the part of the message based on the path
911-
if "ros2_message_paths" in subscriber_config:
911+
if (
912+
"ros2_message_paths" in subscriber_config
913+
and len(subscriber_config["ros2_message_paths"]) > 0
914+
):
912915
for path_config in subscriber_config["ros2_message_paths"]:
913916
try:
914917
path_msg = get_message_path_value(msg, path_config["path"])

0 commit comments

Comments
 (0)