Skip to content

Commit

Permalink
a bugfix of clear costmap service action (ros-navigation#1764)
Browse files Browse the repository at this point in the history
The following is an example of the error.
[ERROR] [1590171638.335693813] [bt_navigator]: Action server failed while executing action callback: "failed to send request: ros_request argument is null, at /opt/ros/src/ros2/rcl/rcl/src/rcl/client.c:278"a bugfix of clear costmap service action

Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
  • Loading branch information
daisukes authored May 27, 2020
1 parent de0ed9a commit 41d97c5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class BtServiceNode : public BT::SyncActionNode
getInput("service_name", service_name_);
service_client_ = node_->create_client<ServiceT>(service_name_);

// Make a request for the service without parameter
request_ = std::make_shared<typename ServiceT::Request>();

// Make sure the server is actually there before continuing
RCLCPP_INFO(
node_->get_logger(), "Waiting for \"%s\" service",
Expand Down Expand Up @@ -91,7 +94,6 @@ class BtServiceNode : public BT::SyncActionNode
// Fill in service request with information if necessary
virtual void on_tick()
{
request_ = std::make_shared<typename ServiceT::Request>();
}

// Check the future and decide the status of Behaviortree
Expand Down

0 comments on commit 41d97c5

Please sign in to comment.