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

Adding better initialization of origin (https://github.com/swri-robotics/marti_common/issues/632) #725

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
7 changes: 7 additions & 0 deletions swri_transform_util/src/local_xy_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ namespace swri_transform_util
// compatibility with older bag files.
node_->get_parameter_or("/local_xy_frame", frame, frame_);
}
else
{
if (frame[0] == '/')
{
frame.erase(0, 1);
}
}

frame_ = frame;

Expand Down
6 changes: 6 additions & 0 deletions swri_transform_util/src/utm_transformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ namespace swri_transform_util
local_xy_frame_ = local_xy_frame;
initialized_ = true;
}
else
{
RCLCPP_ERROR(logger_,
"UtmTransformer::Initialize: Frame %s was not found so transformer did not initialize",
local_xy_frame.c_str());
}
}

if (initialized_)
Expand Down