Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Introduction to ROS Part 5 - Services, Requests, and Responses with Python

Digi-Key via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to implement ROS 2 services using Python in this hands-on tutorial that explores the request/response communication model essential for robotic applications. Discover the fundamental differences between topics and services in ROS 2, understanding when to use synchronous service calls versus asynchronous topic broadcasting for different robotic tasks. Build a complete service server node using the rclpy library that listens for integer addition requests and responds with calculated results, implementing proper callback handling and debugging through logging. Create a service client node that generates random integers and communicates with the server using asynchronous programming techniques including call_async(), add_done_callback(), and Future objects for efficient response handling. Master the AddTwoInts example interface from example_interfaces to understand how ROS 2 services use well-defined request and response formats for reliable communication between nodes. Practice using Docker containers and ROS 2 CLI tools to build, run, and test your service implementations in a controlled development environment. Explore command-line tools and the rqt GUI for service introspection, testing, and debugging to ensure your robotic communication systems work correctly. Gain practical experience with synchronous communication patterns that are ideal for sending commands, retrieving one-time information, and coordinating actions between different components of your robotic system.

Syllabus

0:00 Intro
0:58 ROS Service Fundamentals
2:06 Writing a Service in Python
8:49 Testing the Service
12:30 Writing a Client in Python
18:55 Testing the Client
19:59 Conclusion

Taught by

Digi-Key

Reviews

Start your review of Introduction to ROS Part 5 - Services, Requests, and Responses with Python

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.