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

What is ROS Service

Written by Ruben Alves

19/08/2018

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

Masterclass 2023 batch2 blog banner

Check Out These Related Posts

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This