Skip to content

Commit

Permalink
TfPublisher: tf frame name can't start with '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAbdi committed Feb 9, 2021
1 parent 52f8441 commit 987bd78
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,9 @@ void TfPublisher::publishPlanningSceneFrames()

void TfPublisher::initialize()
{
rclcpp::Node::SharedPtr n(new rclcpp::Node("TFPublisher"));

std::string prefix = n->get_namespace();
prefix += "/";
n->get_parameter_or("planning_scene_frame_publishing_rate", rate_, 10);
n->get_parameter_or("planning_scene_tf_prefix", prefix_, prefix);
std::string prefix = context_->node_->get_name();
context_->node_->get_parameter_or("planning_scene_frame_publishing_rate", rate_, 10);
context_->node_->get_parameter_or("planning_scene_tf_prefix", prefix_, prefix);
keep_running_ = true;

RCLCPP_INFO(LOGGER, "Initializing MoveGroupTfPublisher with a frame publishing rate of %d", rate_);
Expand Down

0 comments on commit 987bd78

Please sign in to comment.