Skip to content

Commit 12dc7d0

Browse files
committed
fix: update landmark message to new vortex_msgs structure
1 parent 84b7709 commit 12dc7d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

navigation/eskf/src/ros/eskf_ros.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void ESKFNode::landmark_callback(
236236

237237
std::vector<const vortex_msgs::msg::Landmark*> markers;
238238
for (const auto& lm : msg->landmarks) {
239-
if (lm.type == vortex_msgs::msg::Landmark::ARUCO_MARKER) {
239+
if (lm.type.value == vortex_msgs::msg::LandmarkType::ARUCO_MARKER) {
240240
markers.push_back(&lm);
241241
}
242242
}
@@ -245,9 +245,9 @@ void ESKFNode::landmark_callback(
245245

246246
auto it = std::min_element(
247247
markers.begin(), markers.end(),
248-
[](const auto* a, const auto* b) { return a->subtype < b->subtype; });
248+
[](const auto* a, const auto* b) { return a->subtype.value < b->subtype.value; });
249249
const auto* chosen = *it;
250-
uint16_t chosen_id = chosen->subtype;
250+
uint16_t chosen_id = chosen->subtype.value;
251251
spdlog::debug("Received {} markers, chosen id: {}", markers.size(),
252252
chosen_id);
253253

0 commit comments

Comments
 (0)