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

[Transformer]: fixed UTMtoLL to fill out the correct frame #56

Merged
merged 1 commit into from
Nov 10, 2024
Merged
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
8 changes: 4 additions & 4 deletions src/transformer/transformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ namespace mrs_lib
return utm;
}

geometry_msgs::PointStamped Transformer::LLtoUTM(const geometry_msgs::PointStamped& what, [[maybe_unused]] const std::string& prefix)
geometry_msgs::PointStamped Transformer::LLtoUTM(const geometry_msgs::PointStamped& what, const std::string& prefix)
{
geometry_msgs::PointStamped ret;
ret.header.frame_id = prefix + "utm_origin";
Expand Down Expand Up @@ -534,14 +534,14 @@ namespace mrs_lib
return latlon;
}

std::optional<geometry_msgs::PointStamped> Transformer::UTMtoLL(const geometry_msgs::PointStamped& what, [[maybe_unused]] const std::string& prefix)
std::optional<geometry_msgs::PointStamped> Transformer::UTMtoLL(const geometry_msgs::PointStamped& what, const std::string& prefix)
{
const auto opt = UTMtoLL(what.point, prefix);
if (!opt.has_value())
return std::nullopt;

geometry_msgs::PointStamped ret;
ret.header.frame_id = prefix + "utm_origin";
ret.header.frame_id = prefix + LATLON_ORIGIN;
ret.header.stamp = what.header.stamp;
ret.point = opt.value();
return ret;
Expand All @@ -566,7 +566,7 @@ namespace mrs_lib
return std::nullopt;

geometry_msgs::PoseStamped ret;
ret.header.frame_id = prefix + "utm_origin";
ret.header.frame_id = prefix + LATLON_ORIGIN;
ret.header.stamp = what.header.stamp;
ret.pose = opt.value();
return ret;
Expand Down
Loading