Skip to content

Commit

Permalink
fixed harcoding seen vector
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrhm committed Nov 26, 2024
1 parent fd1be80 commit fbab60e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions perception/object_detector/object_detector.processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ namespace mrover {

auto ObjectDetectorBase::updateHitsObject(sensor_msgs::msg::PointCloud2::UniquePtr const& msg, std::span<Detection const> detections, cv::Size const& imageSize) -> void {
// Set of flags indicating if the given object has been seen
// TODO(quintin): Do not hard code exactly two classes
std::bitset<2> seenObjects{0b00};
std::vector<bool> seenObjects(mModel.classes.size(), false);
for (auto const& [classId, className, confidence, box]: detections) {
// Resize from blob space to image space
cv::Point2f centerInBlob = cv::Point2f{box.tl()} + cv::Point2f{box.size()} / 2;
Expand Down

0 comments on commit fbab60e

Please sign in to comment.