From 97c2256dd9927ea92182a0c13bc231688193cbb7 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Thu, 26 Dec 2024 13:09:25 +0900 Subject: [PATCH 1/6] feat: hack to produce correct-looking objects for corner ars548 radars. This essentially assumes that continental ignores the configuration's yaw for FRONT corner radars. Kinematics will be wrong no matter what... Signed-off-by: Kenzo Lobos-Tsunekawa --- .../decoders/continental_ars548_decoder.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp index a6d3e983f..72f4b92df 100644 --- a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp +++ b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp @@ -345,6 +345,20 @@ bool ContinentalARS548Decoder::parse_objects_list_packet( object_msg.orientation = object.position_orientation.value(); object_msg.orientation_std = object.position_orientation_std.value(); + if ( + std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && + std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + const double dx = radar_status_.longitudinal + radar_status_.wheel_base; + const double dy = radar_status_.lateral; + double x = object_msg.position.x - dx; + double y = object_msg.position.y - dy; + const auto & yaw = radar_status_.yaw; + + object_msg.position.x = x * std::cos(yaw) - y * std::sin(yaw) + dx; + object_msg.position.y = x * std::sin(yaw) + y * std::cos(yaw) + dy; + object_msg.orientation += yaw; + } + object_msg.existence_probability = object.existence_probability.value(); object_msg.classification_car = object.classification_car; object_msg.classification_truck = object.classification_truck; From f49bb47cfc91c4f9b6e95e9aac569a648b13a141 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Wed, 8 Jan 2025 09:41:44 +0900 Subject: [PATCH 2/6] chore: added log messages to warn the user against using corner radars (it should only be for evaluation purposes) Signed-off-by: Kenzo Lobos-Tsunekawa --- .../decoders/continental_ars548_decoder.cpp | 6 ++++++ .../continental_ars548_decoder_wrapper.cpp | 17 +++++++++++++++++ .../continental_ars548_hw_interface_wrapper.cpp | 17 +++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp index 72f4b92df..936db1e7a 100644 --- a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp +++ b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp @@ -345,6 +345,12 @@ bool ContinentalARS548Decoder::parse_objects_list_packet( object_msg.orientation = object.position_orientation.value(); object_msg.orientation_std = object.position_orientation_std.value(); + // NOTE(knzo25): In the radar firmware used when developing this driver, + // corner radars are not supported. We can partially address this, + // but the coordinates look only spatially correct (not the dynamics). + // so its use is the responsibility of the user. + // Corner radars are expected to be supported in a new firmware version, + // but this is not yet confirmed. if ( std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { diff --git a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp index 1bdfdd717..0e3129559 100644 --- a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp @@ -191,6 +191,23 @@ void ContinentalARS548DecoderWrapper::object_list_callback( void ContinentalARS548DecoderWrapper::sensor_status_callback( const drivers::continental_ars548::ContinentalARS548Status & sensor_status) { + // NOTE(knzo25): In the radar firmware used when developing this driver, + // corner radars are not supported. We can partially address this, + // but the coordinates look only spatially correct (not the dynamics). + // so its use is the responsibility of the user. + // Corner radars are expected to be supported in a new firmware version, + // but this is not yet confirmed. + if ( + std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && + std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + RCLCPP_WARN_THROTTLE( + logger_, *rclcpp::Clock::now(), 5000, + "This radar has been configured as a corner radar, which is not supported by the sensor. We " + "can partially address this, but the coordinates look only spatially correct (not the " + "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " + "supported in a new firmware version, but this is not yet confirmed."); + } + diagnostic_msgs::msg::DiagnosticArray diagnostic_array_msg; diagnostic_array_msg.header.stamp.sec = sensor_status.timestamp_seconds; diagnostic_array_msg.header.stamp.nanosec = sensor_status.timestamp_nanoseconds; diff --git a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp index 0fc179524..333c7fd61 100644 --- a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp @@ -215,6 +215,23 @@ void ContinentalARS548HwInterfaceWrapper::set_sensor_mounting_request_callback( pitch = rpy.y; } + // NOTE(knzo25): In the radar firmware used when developing this driver, + // corner radars are not supported. We can partially address this, + // but the coordinates look only spatially correct (not the dynamics). + // so its use is the responsibility of the user. + // Corner radars are expected to be supported in a new firmware version, + // but this is not yet confirmed. + if ( + std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && + std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + RCLCPP_WARN( + logger_, *rclcpp::Clock::now(), 5000, + "This radar has been configured as a corner radar, which is not supported by the sensor. We " + "can partially address this, but the coordinates look only spatially correct (not the " + "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " + "supported in a new firmware version, but this is not yet confirmed."); + } + auto result = hw_interface_->set_sensor_mounting( longitudinal, lateral, vertical, yaw, pitch, request->plug_orientation); From de1ba743f1aa1c8fc1c35e5c592c7303e24759ac Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Wed, 8 Jan 2025 10:25:20 +0900 Subject: [PATCH 3/6] fix: fixed compilation and spells Signed-off-by: Kenzo Lobos-Tsunekawa --- .../decoders/continental_ars548_decoder.cpp | 1 + .../continental/continental_ars548_decoder_wrapper.cpp | 8 +++++--- .../continental_ars548_hw_interface_wrapper.cpp | 7 +++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp index 936db1e7a..c2ee20c54 100644 --- a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp +++ b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp @@ -345,6 +345,7 @@ bool ContinentalARS548Decoder::parse_objects_list_packet( object_msg.orientation = object.position_orientation.value(); object_msg.orientation_std = object.position_orientation_std.value(); + // cSpell:ignore knzo25 // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars are not supported. We can partially address this, // but the coordinates look only spatially correct (not the dynamics). diff --git a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp index 0e3129559..a0040b8f2 100644 --- a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp @@ -191,6 +191,7 @@ void ContinentalARS548DecoderWrapper::object_list_callback( void ContinentalARS548DecoderWrapper::sensor_status_callback( const drivers::continental_ars548::ContinentalARS548Status & sensor_status) { + // cSpell:ignore knzo25 // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars are not supported. We can partially address this, // but the coordinates look only spatially correct (not the dynamics). @@ -198,10 +199,11 @@ void ContinentalARS548DecoderWrapper::sensor_status_callback( // Corner radars are expected to be supported in a new firmware version, // but this is not yet confirmed. if ( - std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && - std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + std::abs(sensor_status.yaw) > 5.0 * M_PI / 180.0 && + std::abs(sensor_status.yaw) < 90.0 * M_PI / 180.0) { + rclcpp::Clock clock{RCL_ROS_TIME}; RCLCPP_WARN_THROTTLE( - logger_, *rclcpp::Clock::now(), 5000, + logger_, clock, 5000, "This radar has been configured as a corner radar, which is not supported by the sensor. We " "can partially address this, but the coordinates look only spatially correct (not the " "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " diff --git a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp index 333c7fd61..905e8a40b 100644 --- a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp @@ -215,17 +215,16 @@ void ContinentalARS548HwInterfaceWrapper::set_sensor_mounting_request_callback( pitch = rpy.y; } + // cSpell:ignore knzo25 // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars are not supported. We can partially address this, // but the coordinates look only spatially correct (not the dynamics). // so its use is the responsibility of the user. // Corner radars are expected to be supported in a new firmware version, // but this is not yet confirmed. - if ( - std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && - std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + if (std::abs(yaw) > 5.0 * M_PI / 180.0 && std::abs(yaw) < 90.0 * M_PI / 180.0) { RCLCPP_WARN( - logger_, *rclcpp::Clock::now(), 5000, + logger_, "This radar has been configured as a corner radar, which is not supported by the sensor. We " "can partially address this, but the coordinates look only spatially correct (not the " "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " From 9ab56a108d17871456bdb5e5d6c386259dac7ff1 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Wed, 8 Jan 2025 10:42:10 +0900 Subject: [PATCH 4/6] feat: added a diagnostics message Signed-off-by: Kenzo Lobos-Tsunekawa --- .../continental_ars548_decoder_wrapper.cpp | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp index a0040b8f2..7515fb010 100644 --- a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp @@ -191,6 +191,19 @@ void ContinentalARS548DecoderWrapper::object_list_callback( void ContinentalARS548DecoderWrapper::sensor_status_callback( const drivers::continental_ars548::ContinentalARS548Status & sensor_status) { + diagnostic_msgs::msg::DiagnosticArray diagnostic_array_msg; + diagnostic_array_msg.header.stamp.sec = sensor_status.timestamp_seconds; + diagnostic_array_msg.header.stamp.nanosec = sensor_status.timestamp_nanoseconds; + diagnostic_array_msg.header.frame_id = config_ptr_->frame_id; + + diagnostic_array_msg.status.resize(1); + auto & status = diagnostic_array_msg.status[0]; + status.values.reserve(36); + status.level = diagnostic_msgs::msg::DiagnosticStatus::OK; + status.hardware_id = config_ptr_->frame_id; + status.name = config_ptr_->frame_id; + status.message = "Diagnostic messages from ARS548"; + // cSpell:ignore knzo25 // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars are not supported. We can partially address this, @@ -208,20 +221,12 @@ void ContinentalARS548DecoderWrapper::sensor_status_callback( "can partially address this, but the coordinates look only spatially correct (not the " "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " "supported in a new firmware version, but this is not yet confirmed."); - } - diagnostic_msgs::msg::DiagnosticArray diagnostic_array_msg; - diagnostic_array_msg.header.stamp.sec = sensor_status.timestamp_seconds; - diagnostic_array_msg.header.stamp.nanosec = sensor_status.timestamp_nanoseconds; - diagnostic_array_msg.header.frame_id = config_ptr_->frame_id; - - diagnostic_array_msg.status.resize(1); - auto & status = diagnostic_array_msg.status[0]; - status.values.reserve(36); - status.level = diagnostic_msgs::msg::DiagnosticStatus::OK; - status.hardware_id = config_ptr_->frame_id; - status.name = config_ptr_->frame_id; - status.message = "Diagnostic messages from ARS548"; + status.level = diagnostic_msgs::msg::DiagnosticStatus::WARN; + status.message += + ". Unsupported mounting configuration (corner radar). This should only be used for " + "evaluation purposes."; + } auto add_diagnostic = [&status](const std::string & key, const std::string & value) { diagnostic_msgs::msg::KeyValue key_value; From e48c43c56c9adf55b4b9988cde5a53d651bdba27 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Fri, 17 Jan 2025 15:45:31 +0900 Subject: [PATCH 5/6] feat: disabled objects from corner radars since they are not supported Signed-off-by: Kenzo Lobos-Tsunekawa --- .../decoders/continental_ars548_decoder.cpp | 31 ++++++------------- .../continental_ars548_decoder_wrapper.cpp | 17 ++++------ ...ontinental_ars548_hw_interface_wrapper.cpp | 13 +++----- 3 files changed, 20 insertions(+), 41 deletions(-) diff --git a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp index c2ee20c54..f33a94829 100644 --- a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp +++ b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp @@ -245,6 +245,16 @@ bool ContinentalARS548Decoder::parse_detections_list_packet( bool ContinentalARS548Decoder::parse_objects_list_packet( const nebula_msgs::msg::NebulaPacket & packet_msg) { + // cSpell:ignore knzo25 + // NOTE(knzo25): In the radar firmware used when developing this driver, + // corner radars were not supported. When a new firmware addresses this, + // the driver will be updated. + if ( + std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && + std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + return true; + } + auto msg_ptr = std::make_unique(); auto & msg = *msg_ptr; @@ -345,27 +355,6 @@ bool ContinentalARS548Decoder::parse_objects_list_packet( object_msg.orientation = object.position_orientation.value(); object_msg.orientation_std = object.position_orientation_std.value(); - // cSpell:ignore knzo25 - // NOTE(knzo25): In the radar firmware used when developing this driver, - // corner radars are not supported. We can partially address this, - // but the coordinates look only spatially correct (not the dynamics). - // so its use is the responsibility of the user. - // Corner radars are expected to be supported in a new firmware version, - // but this is not yet confirmed. - if ( - std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && - std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { - const double dx = radar_status_.longitudinal + radar_status_.wheel_base; - const double dy = radar_status_.lateral; - double x = object_msg.position.x - dx; - double y = object_msg.position.y - dy; - const auto & yaw = radar_status_.yaw; - - object_msg.position.x = x * std::cos(yaw) - y * std::sin(yaw) + dx; - object_msg.position.y = x * std::sin(yaw) + y * std::cos(yaw) + dy; - object_msg.orientation += yaw; - } - object_msg.existence_probability = object.existence_probability.value(); object_msg.classification_car = object.classification_car; object_msg.classification_truck = object.classification_truck; diff --git a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp index 7515fb010..da389d3d7 100644 --- a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp @@ -206,26 +206,21 @@ void ContinentalARS548DecoderWrapper::sensor_status_callback( // cSpell:ignore knzo25 // NOTE(knzo25): In the radar firmware used when developing this driver, - // corner radars are not supported. We can partially address this, - // but the coordinates look only spatially correct (not the dynamics). - // so its use is the responsibility of the user. - // Corner radars are expected to be supported in a new firmware version, - // but this is not yet confirmed. + // corner radars were not supported. When a new firmware addresses this, + // the driver will be updated. if ( std::abs(sensor_status.yaw) > 5.0 * M_PI / 180.0 && std::abs(sensor_status.yaw) < 90.0 * M_PI / 180.0) { rclcpp::Clock clock{RCL_ROS_TIME}; RCLCPP_WARN_THROTTLE( logger_, clock, 5000, - "This radar has been configured as a corner radar, which is not supported by the sensor. We " - "can partially address this, but the coordinates look only spatially correct (not the " - "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " - "supported in a new firmware version, but this is not yet confirmed."); + "This radar has been configured as a corner radar, which is not supported by the sensor. The " + "driver will not output any objects"); status.level = diagnostic_msgs::msg::DiagnosticStatus::WARN; status.message += - ". Unsupported mounting configuration (corner radar). This should only be used for " - "evaluation purposes."; + ". Unsupported mounting configuration (corner radar). Only detections should be used under " + "these conditions."; } auto add_diagnostic = [&status](const std::string & key, const std::string & value) { diff --git a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp index 905e8a40b..dae6cf062 100644 --- a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp @@ -217,18 +217,13 @@ void ContinentalARS548HwInterfaceWrapper::set_sensor_mounting_request_callback( // cSpell:ignore knzo25 // NOTE(knzo25): In the radar firmware used when developing this driver, - // corner radars are not supported. We can partially address this, - // but the coordinates look only spatially correct (not the dynamics). - // so its use is the responsibility of the user. - // Corner radars are expected to be supported in a new firmware version, - // but this is not yet confirmed. + // corner radars were not supported. When a new firmware addresses this, + // the driver will be updated. if (std::abs(yaw) > 5.0 * M_PI / 180.0 && std::abs(yaw) < 90.0 * M_PI / 180.0) { RCLCPP_WARN( logger_, - "This radar has been configured as a corner radar, which is not supported by the sensor. We " - "can partially address this, but the coordinates look only spatially correct (not the " - "dynamics). so its use is the responsibility of the user. Corner radars are expected to be " - "supported in a new firmware version, but this is not yet confirmed."); + "You are attempting to configure the device as a corner radar, which is not supported so " + "far."); } auto result = hw_interface_->set_sensor_mounting( From 99ccb0f84ff7af32a4a7eef7edf84e3f533a68a4 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Fri, 17 Jan 2025 18:47:47 +0900 Subject: [PATCH 6/6] chore: refactored Signed-off-by: Kenzo Lobos-Tsunekawa --- .../include/nebula_common/continental/continental_ars548.hpp | 5 +++++ .../decoders/continental_ars548_decoder.cpp | 4 +--- .../src/continental/continental_ars548_decoder_wrapper.cpp | 4 +--- .../continental/continental_ars548_hw_interface_wrapper.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nebula_common/include/nebula_common/continental/continental_ars548.hpp b/nebula_common/include/nebula_common/continental/continental_ars548.hpp index 6d861384d..bc4aca2d3 100644 --- a/nebula_common/include/nebula_common/continental/continental_ars548.hpp +++ b/nebula_common/include/nebula_common/continental/continental_ars548.hpp @@ -32,6 +32,11 @@ namespace drivers namespace continental_ars548 { +inline bool is_corner_radar(float yaw) +{ + return std::abs(yaw) > deg2rad(5.0) && std::abs(yaw) < deg2rad(90.0); +} + /// @brief struct for ARS548 sensor configuration struct ContinentalARS548SensorConfiguration : EthernetSensorConfigurationBase { diff --git a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp index f33a94829..83fa7265a 100644 --- a/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp +++ b/nebula_decoders/src/nebula_decoders_continental/decoders/continental_ars548_decoder.cpp @@ -249,9 +249,7 @@ bool ContinentalARS548Decoder::parse_objects_list_packet( // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars were not supported. When a new firmware addresses this, // the driver will be updated. - if ( - std::abs(radar_status_.yaw) > 5.0 * M_PI / 180.0 && - std::abs(radar_status_.yaw) < 90.0 * M_PI / 180.0) { + if (nebula::drivers::continental_ars548::is_corner_radar(radar_status_.yaw)) { return true; } diff --git a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp index da389d3d7..a02d58cce 100644 --- a/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_decoder_wrapper.cpp @@ -208,9 +208,7 @@ void ContinentalARS548DecoderWrapper::sensor_status_callback( // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars were not supported. When a new firmware addresses this, // the driver will be updated. - if ( - std::abs(sensor_status.yaw) > 5.0 * M_PI / 180.0 && - std::abs(sensor_status.yaw) < 90.0 * M_PI / 180.0) { + if (nebula::drivers::continental_ars548::is_corner_radar(sensor_status.yaw)) { rclcpp::Clock clock{RCL_ROS_TIME}; RCLCPP_WARN_THROTTLE( logger_, clock, 5000, diff --git a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp index dae6cf062..79e293347 100644 --- a/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp +++ b/nebula_ros/src/continental/continental_ars548_hw_interface_wrapper.cpp @@ -219,7 +219,7 @@ void ContinentalARS548HwInterfaceWrapper::set_sensor_mounting_request_callback( // NOTE(knzo25): In the radar firmware used when developing this driver, // corner radars were not supported. When a new firmware addresses this, // the driver will be updated. - if (std::abs(yaw) > 5.0 * M_PI / 180.0 && std::abs(yaw) < 90.0 * M_PI / 180.0) { + if (nebula::drivers::continental_ars548::is_corner_radar(yaw)) { RCLCPP_WARN( logger_, "You are attempting to configure the device as a corner radar, which is not supported so "