Introduction to ROS Part 7: Custom Interfaces | DigiKey @digikey
Introduction to ROS Part 7: Custom Interfaces | DigiKey  @digikey
Uploaded November 2025 | Updated September 2026, 2 weeks ago
In this video, we take your ROS 2 development to the next level by introducing custom interfaces for both messages and services. While ROS 2 includes a wide range of built-in types, real-world robotics applications often need bespoke data formats. Custom interfaces allow you to structure your messages based exactly on your needs, including sensor data, navigation paths, or control parameters.
The written guide for this episode can be found here: digikey.com/en/maker/tutorials/2025/intro-to-ros-part-7-custom-interfaces
The GitHub repository containing the Docker image and example code for this series can be found here: github.com/ShawnHymel/introduction-to-ros
We’ll start by creating a dedicated interface package using ament_cmake, the standard ROS 2 build tool. You’ll learn how to define a .msg file to represent a 3-axis accelerometer reading and a .srv file that allows a client to request a list of random 3D points from a server. We'll walk through how to properly update package.xml and CMakeLists.txt to include the necessary build and runtime dependencies, ensuring your interfaces are available to both Python and C++ nodes.
Once the interfaces are built, we demonstrate how to use them in real ROS 2 nodes. In Python, we create a publisher node that broadcasts fake accelerometer data using the custom message. Then we write a C++ subscriber node that listens to this data and logs the output. This cross-language compatibility highlights how ROS 2’s middleware can unify components written in different languages.
Next, we show how to build a request/response architecture using a custom service. A Python server node accepts a number and returns a list of random geometry points. Meanwhile, a C++ client node periodically sends requests and displays the resulting points. You’ll learn how to use asynchronous callbacks and proper message typing to make this interaction seamless and responsive.
By the end of this tutorial, you’ll know how to create and use custom ROS 2 interfaces to give your robotics software the structure and flexibility it needs. This foundational skill is essential for any serious ROS 2 developer working on scalable or production-grade systems.

Related Links:
digikey.com/en/maker/tutorials/2025/intro-to-ros-part-7-custom-interfaces
eXperiential Robotics Platform (XRP): digikey.com/short/dwf9fh5t
Introduction to Docker: youtube.com/watch?v=1nxGcfIm-TU

Learn More:
Maker.io - digikey.com/en/maker
DigiKey’s Blog – TheCircuit digikey.com/en/blog
Connect with DigiKey on Facebook facebook.com/digikey.electronics
And follow us on X: https://x.com/digikey

Chapters:
0:00 Intro
1:11 Overview of Interfaces
3:00 Creating a Custom Topic Interface
10:06 Using the Custom Topic Interface in Python
14:11 Using the Custom Topic Interface in C++
23:05 Creating a Custom Service Interface
25:22 Using the Custom Service Interface in Python
30:43 Using the Custom Service Interface in C++
39:21 Conclusion
Introduction to ROS Part 7: Custom Interfaces | DigiKeySimulate Your Own Semiconductors #semiconductors #learning #simulation #makerupdateContainerized ROS and Partner Supported Systems #DigiKey #LetsTalkTechnical #onsemiSome Components Use Less Power Than Others - Electronics with Becky Stern | ShortPocket Secretary [Maker Update] | Maker.ioReinforcement Learning for Robotics Part 5: Adding Commands to the Agent | DigiKeyPhotogrammetry-based Camera Tracking is Powerful and Free #3D #Scan #RealityCapture #MakerUpdateLiDAR Meets XRP - #thebytesizedengineer | DigiKeyBuilding the Backbone of Electrification - Sustainable Futures S2E2 | DigiKeyPenny’s Computer Book - Electronics with Becky Stern | DigiKeyWhistle While Your Robots Work [Maker Update] | Maker.ioThe Connected Acre: Smarter, Tougher, More Resilient - Farm Different S4E3 | DigiKey
DigiKey |

Introduction to ROS Part 7: Custom Interfaces | DigiKey

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER