From bb1e8e793be6caa03603f7856f8a4d55fe91effd Mon Sep 17 00:00:00 2001 From: Max SCHMELLER Date: Mon, 23 Dec 2024 17:54:52 +0900 Subject: [PATCH] chore(hesai): disallow 255.255.255.255 in config Signed-off-by: Max SCHMELLER --- nebula_ros/src/hesai/hesai_ros_wrapper.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nebula_ros/src/hesai/hesai_ros_wrapper.cpp b/nebula_ros/src/hesai/hesai_ros_wrapper.cpp index 2d8ff2ea..c1af93ba 100644 --- a/nebula_ros/src/hesai/hesai_ros_wrapper.cpp +++ b/nebula_ros/src/hesai/hesai_ros_wrapper.cpp @@ -223,6 +223,13 @@ Status HesaiRosWrapper::validate_and_set_config( if (new_config->frame_id.empty()) { return Status::SENSOR_CONFIG_ERROR; } + if (new_config->host_ip == "255.255.255.255") { + RCLCPP_ERROR( + get_logger(), + "Due to potential network performance issues when using IP broadcast for sensor data, Nebula " + "disallows use of the broadcast IP. Please specify the concrete host IP instead."); + return Status::SENSOR_CONFIG_ERROR; + } if (new_config->ptp_profile == nebula::drivers::PtpProfile::UNKNOWN_PROFILE) { RCLCPP_ERROR( get_logger(), "Invalid PTP Profile Provided. Please use '1588v2', '802.1as' or 'automotive'");