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

Revision history [back]

You can't if you intend to use a ROS service. This is how services are designed.

You can create your own service type, if you want, only containing booleans.

my_pkg/MyBoolSrv:

bool input
---
bool output

But you'll still have the respective function signature as

bool Command::arming_service(my_pkg::MyBoolSrv::Request request, my_pkg::MyBoolSrv::Response response) {
   // whatever with request.input and response.output
   return false;
}

If this doesn't answer your question, please provide more details on your use case and what you actually want to do.