Skip to content

Commit

Permalink
Merge pull request #56 from ctu-mrs/fix-utmtoll
Browse files Browse the repository at this point in the history
[Transformer]: fixed UTMtoLL to fill out the correct frame
  • Loading branch information
klaxalk authored Nov 10, 2024
2 parents cfe7a8a + 6a14a43 commit 423d560
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 423d560

Please sign in to comment.