You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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");
}
The text was updated successfully, but these errors were encountered: