Skip to content

Commit

Permalink
add verification to point_project_to_unrectified_image_ when loading
Browse files Browse the repository at this point in the history
Co-authored-by: badai nguyen  <94814556+badai-nguyen@users.noreply.github.com>
  • Loading branch information
a-maumau and badai-nguyen authored Dec 23, 2024
1 parent ea2c123 commit 118ca9b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ FusionNode<TargetMsg3D, ObjType, Msg2D>::FusionNode(
camera_projectors_.resize(rois_number_);
point_project_to_unrectified_image_ =
declare_parameter<std::vector<bool>>("point_project_to_unrectified_image");

if (rois_number_ > point_project_to_unrectified_image_.size()) {
throw std::runtime_error("The number of point_project_to_unrectified_image_ does not match the number of rois topics.");
}
approx_camera_projection_ = declare_parameter<std::vector<bool>>("approximate_camera_projection");
if (rois_number_ != approx_camera_projection_.size()) {
const std::size_t current_size = approx_camera_projection_.size();
Expand Down

0 comments on commit 118ca9b

Please sign in to comment.