Skip to content
Snippets Groups Projects
Unverified Commit 41d97c5d authored by Daisuke Sato's avatar Daisuke Sato Committed by GitHub
Browse files

a bugfix of clear costmap service action (#1764)


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: default avatarDaisuke Sato <daisukes@cmu.edu>
parent de0ed9aa
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,9 @@ public:
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",
......@@ -91,7 +94,6 @@ public:
// 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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment