Can a node be a Publisher/Subscriber and a Service/Client at the same time

asked 2020-04-05 01:30:45 -0500

forbiddenfruit gravatar image

updated 2020-04-05 10:58:35 -0500

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!

edit retag flag offensive close merge delete