Skip to content

Commit

Permalink
waypoint_follower node has _rclcpp_node as well as base node (ros-nav…
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski authored and ruffsl committed Jul 2, 2021
1 parent fca97b5 commit 2405913
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nav2_waypoint_follower/src/waypoint_follower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <string>
#include <utility>

// TODO(stevemacenski): Add capability for reading in yaml file and executing

namespace nav2_waypoint_follower
{

Expand All @@ -47,9 +45,13 @@ WaypointFollower::on_configure(const rclcpp_lifecycle::State & /*state*/)
stop_on_failure_ = get_parameter("stop_on_failure").as_bool();
loop_rate_ = get_parameter("loop_rate").as_int();

// use suffix '_rclcpp_node' to keep parameter file consistency #1773
std::vector<std::string> new_args = rclcpp::NodeOptions().arguments();
new_args.push_back("--ros-args");
new_args.push_back("-r");
new_args.push_back(std::string("__node:=") + this->get_name() + "_rclcpp_node");
new_args.push_back("--");
client_node_ = std::make_shared<rclcpp::Node>(
std::string(get_name()) + std::string("_rclcpp_node"));
"_", "", rclcpp::NodeOptions().arguments(new_args));

nav_to_pose_client_ = rclcpp_action::create_client<ClientT>(
client_node_, "navigate_to_pose");
Expand Down

0 comments on commit 2405913

Please sign in to comment.