Can a node be a Publisher/Subscriber and a Service/Client at the same time
Hi Folks, Just starting out with ROS2 and I am trying to figure out if one node can be publisher/subscriber AS WELL as a service/client. If so how, and could you possibly present an example!
The biggest problem I think I am facing is spinning the node. The examples I have worked through for service/client only spin once, check if the future is completed and exit out of the situation. They check for the future variable AFTER. When I try to make it just spin (instead of spin once) the future variable never updates, leaving a client that never got a response back to their response. Any help would be great!
You can spawn another node within your node, create a new thread for it to do an asynchronous service call and then shut it down again.