diff --git a/sensing/pointcloud_preprocessor/src/crop_box_filter/crop_box_filter_nodelet.cpp b/sensing/pointcloud_preprocessor/src/crop_box_filter/crop_box_filter_nodelet.cpp index bbab80b855620..d2d431c5cc7a7 100644 --- a/sensing/pointcloud_preprocessor/src/crop_box_filter/crop_box_filter_nodelet.cpp +++ b/sensing/pointcloud_preprocessor/src/crop_box_filter/crop_box_filter_nodelet.cpp @@ -80,6 +80,9 @@ CropBoxFilterComponent::CropBoxFilterComponent(const rclcpp::NodeOptions & optio p.max_y = static_cast(declare_parameter("max_y", 1.0)); p.max_z = static_cast(declare_parameter("max_z", 1.0)); p.negative = static_cast(declare_parameter("negative", false)); + if (tf_input_frame_.empty()) { + throw std::invalid_argument("Crop box requires non-empty input_frame"); + } } // set additional publishers