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

Always [bt_engine-1] [ERROR] [1670381930.543971309] [bt_node]: Action server not available after waiting #5

Open
lunanueva opened this issue Dec 7, 2022 · 1 comment

Comments

@lunanueva
Copy link

What action server is waiting ??

I have fibonacci_service.cpp in plugin/action

#include "std_srvs/srv/trigger.hpp"
#include "behaviortree_cpp_v3/bt_factory.h"
#include "behavior_tree/BtService.hpp"

using namespace BT;
using FibonacciService = std_srvs::srv::Trigger;

class Fibonacci : public BtService
{
public:
Fibonacci(const std::string & name, const BT::NodeConfiguration & config)
: BtService(name, config) {}

FibonacciService::Request::SharedPtr populate_request() override
{
FibonacciService::Request::SharedPtr request;
return request;
}

BT::NodeStatus handle_response(FibonacciService::Response::SharedPtr response) override
{
RCLCPP_INFO(_node->get_logger(), "Service call complete: ", response->message);
return BT::NodeStatus::SUCCESS;
}
};

BT_REGISTER_NODES(factory) {
factory.registerNodeType("FibonacciService");
}

@shonigmann
Copy link

shonigmann commented Jan 26, 2023

I know this is a bit of an old issue now, but I was just playing around with this and found that (at least in Humble) the test server I was using (action_tutorials_cpp fibonacci_action_server) defines a server with action type action_tutorials_interfaces::action::Fibonacci while the demo action client defined in this repo is looking for example_interfaces::action::Fibonacci. The contents of the action definition are identical, but presumably the type mismatch is enough to prevent the client from "finding" a valid server.

Editing Fibonacci.cpp and the CMakeLists.txt to replace example_interfaces with action_tutorials_interfaces resolved the issue, but you could also do the inverse and edit your server.

EDIT: the included fibonacci_action_server.py node should work without modification; I somehow missed that on first glance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants