mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 03:37:58 +00:00
aruco_map: fix publishing detected markers count
This commit is contained in:
@@ -181,7 +181,16 @@ public:
|
||||
|
||||
if (put_markers_count_to_covariance_) {
|
||||
// HACK: pass markers count using covariance field
|
||||
pose_.pose.covariance[0] = markers->markers.size();
|
||||
int valid_markers = 0;
|
||||
for (auto const &marker : markers->markers) {
|
||||
for (auto const &board_marker : board_->ids) {
|
||||
if (board_marker == marker.id) {
|
||||
valid_markers++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pose_.pose.covariance[0] = valid_markers;
|
||||
}
|
||||
|
||||
if (known_vertical_.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user