Robotics StackExchange | Archived questions

Restart nodes and services

Hi, I'm learning ROS and trying to create a program that manages the whole application by monitoring the nodes, services, check if everything is working, if not restart the one that failed. But I'm a little bit confuse about nodes and services. So if a node fails, does it mean the service associate with that service also fail? If I restart the node, does the service also restart? Is the same if the service fails?

Asked by madlink306 on 2019-08-09 03:59:26 UTC

Comments

Answers

In ROS, services are 'only' means of communication. Not to be confused with a cloud-service or something. When node A, calls a service of node B, whatever runs in the service is executed by node B and the result is passed back to A. https://wiki.ros.org/rospy/Overview/Services#Providing_services

Asked by ct2034 on 2019-08-09 10:52:51 UTC

Comments

Thank you for your answer. So, that means if I restart the node, the service associate with it will be restart as well?

Asked by madlink306 on 2019-08-11 21:37:46 UTC

To stay in the example above: If there is a service called by node A is running in B and then B is restarted, the service is just interrupted and A has to call it again.

Asked by ct2034 on 2019-08-12 04:27:40 UTC