ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Also make sure your

nh.advertiseService<my_package::my_service::Request, my_package::my_service::Response>("service_name", 
        [&](my_package::my_service::Request &req, my_package::my_service::Response &res) -> bool
        {...});

and

nh.serviceClient<my_package::my_service>("service_name");

is consistent.

The error can happen when the service type advertised and the service type of the client to is different.