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  <[email protected]>
Signed-off-by: a-maumau <[email protected]>
  • Loading branch information
a-maumau and badai-nguyen committed Dec 23, 2024
1 parent 94a0d78 commit c3317ac
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ 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 c3317ac

Please sign in to comment.