Hi,
I have a question regarding a service server I’m implementing for the ‘wall follower’ rosject. In the class server constructor I have declared:
srv_ = create_service<FindWall_srv>(
"FindWall",
std::bind(&FindWall_Server::findwall_callback, this, _1, _2));
and in private:
void findwall_callback(const std::shared_ptr<FindWall_srv::Request> request,
const std::shared_ptr<FindWall_srv::Response> response) {}
The custom interface is:
#request
---
bool wallfound #response
As you can see there is no request so I’ve tried
srv_ = create_service<FindWall_srv>(
"FindWall",
std::bind(&FindWall_Server::findwall_callback, this, _1));
void findwall_callback(const std::shared_ptr<FindWall_srv::Response> response) {}
and this has been spouting a lot of errors. Does this callback always require both request and response when there is no request? I’m assuming there’s another way to code this because there is no request. May I get help?
Many Thanks in advance,
William