Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(landmark_manager): add get_landmarrks func #6063

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class LandmarkManager
const autoware_auto_mapping_msgs::msg::HADMapBin::ConstSharedPtr & msg,
const std::string & target_subtype);

[[nodiscard]] std::vector<landmark_manager::Landmark> get_landmarks() const;

[[nodiscard]] visualization_msgs::msg::MarkerArray get_landmarks_as_marker_array_msg() const;

[[nodiscard]] geometry_msgs::msg::Pose calculate_new_self_pose(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@
}
}

std::vector<landmark_manager::Landmark> LandmarkManager::get_landmarks() const

Check warning on line 86 in localization/landmark_based_localizer/landmark_manager/src/landmark_manager.cpp

View check run for this annotation

Codecov / codecov/patch

localization/landmark_based_localizer/landmark_manager/src/landmark_manager.cpp#L86

Added line #L86 was not covered by tests
{
std::vector<landmark_manager::Landmark> landmarks;

landmark_manager::Landmark landmark;
for (const auto & [landmark_id_str, landmark_poses] : landmarks_map_) {
for (const auto & pose : landmark_poses) {
landmark.id = landmark_id_str;
landmark.pose = pose;

Check warning on line 94 in localization/landmark_based_localizer/landmark_manager/src/landmark_manager.cpp

View check run for this annotation

Codecov / codecov/patch

localization/landmark_based_localizer/landmark_manager/src/landmark_manager.cpp#L94

Added line #L94 was not covered by tests
landmarks.push_back(landmark);
}
}

return landmarks;
}

Check warning on line 100 in localization/landmark_based_localizer/landmark_manager/src/landmark_manager.cpp

View check run for this annotation

Codecov / codecov/patch

localization/landmark_based_localizer/landmark_manager/src/landmark_manager.cpp#L99-L100

Added lines #L99 - L100 were not covered by tests

visualization_msgs::msg::MarkerArray LandmarkManager::get_landmarks_as_marker_array_msg() const
{
int32_t id = 0;
Expand Down
Loading