[ROS in 5 mins] 027 – What is ROS Service

What is ROS Service

Written by Ruben Alves


Hello ROS Developers!

In today’s video, we are going to learn what are ROS Services, how to list them and how to call a ROS Service.

Step1. Create a project in Robot Ignite Academy(RIA)

We have the best online ROS course available in RIA. It helps you learn ROS in the easiest way without setting up ROS environment locally. The only thing you need is a browser! Create an account here and start to browse the trial course for free now! We’ll use the ROS Basics in 5 Days course unit 5 as an example today.

Step2. ROS service

Compare to the topic, the ROS service is a more syncronize why to communicate between nodes. You’ll also get feedback after a service is done.  You can see all the service available with

rosservice list

and check any of them with

rosservice info /SERVICE

To call a service, use

rosservice call /SERVICE "SERVICE MSG"

For example, to call the /gazebo/delete_model service, we have to pass the model name you want to delete like the following.

rosservice call /gazebo/delete_model "model_name: 'cafe_table'"

Want to learn more?

If you are new to ROS, I highly recommend you to take any of the following courses on Robot Ignite Academy:

ROS Basics In 5 Days (Python) 
ROS Basics In 5 Days (C++) 

We love feedback, so, whether you like the video or not, please share your thoughts in the comments section below.


Edit by: Tony Huang

Check Out These Related Posts


Pin It on Pinterest

Share This