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

Improved tf_prefix based on namespace #1059

Closed
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
10 changes: 9 additions & 1 deletion diff_drive_controller/src/diff_drive_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,15 @@ controller_interface::CallbackReturn DiffDriveController::on_configure(
}
else
{
tf_prefix = tf_prefix + "/";
// Make sure prefix does not start with '/' and always ends with '/'
if (tf_prefix.front() == '/')
{
tf_prefix.erase(0,1);
}
if (tf_prefix.back() != '/')
{
tf_prefix = tf_prefix + "/";
}
}
}

Expand Down
Loading