Skip to content

Commit

Permalink
fix(hesai): return error properly when cut angle is set out-of-range
Browse files Browse the repository at this point in the history
  • Loading branch information
mojomex committed Sep 17, 2024
1 parent b9bd9d8 commit 2e42bd0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nebula_ros/src/hesai/hesai_ros_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ Status HesaiRosWrapper::ValidateAndSetConfig(
if (!drivers::angle_is_between<double>(
new_config->cloud_min_angle, new_config->cloud_max_angle, new_config->cut_angle)) {
RCLCPP_ERROR(get_logger(), "Cannot cut scan outside of the FoV.");
return Status::SENSOR_CONFIG_ERROR;
}

bool fov_is_360 = new_config->cloud_min_angle == 0 && new_config->cloud_max_angle == 360;
Expand Down

0 comments on commit 2e42bd0

Please sign in to comment.