Sakshay Mahna Profile picture
Everything about Robotics!

Jan 10, 2022, 6 tweets

Other than topics, ROS (Robot Operating System) uses two more modes of communication between the independent nodes of the ROS Graph are Services and Actions. Let’s discuss more about them in this thread. 🧵

#ROS #Robotics @rosorg @OpenRoboticsOrg

Services implement a synchronous Remote Procedure Call to exchange data. The server (which provides the service) specifies a callback function to deal with the service request, and advertises the service. The client (which calls the service) then accesses the service.

Service calls are well suited for procedures that are done occasionally and take a bounded amount of time to complete. For instance, in the Gazebo simulator, robot models are spawned by calling a spawn service.

If the corresponding computation takes a long time, or the time is highly variable, another communication mechanism Actions are used. Actions implement an asynchronous communication mechanism.

Action uses a goal to initialize a behavior, then sends a result when the behavior is complete. Action also uses feedback to provide updates on the behavior’s progress and also allows to cancel the goals. Actions are a high level communication protocol implemented using topics.

For navigation example, goal is given to robot. Along the way, robot provides periodic updates (estimated time of arrival, waypoint reached). Finally, robot returns result message, if the robot was able to make it to the goal. And also, the given goal can be canceled at any time.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling