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
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



![Pocket Secretary [Maker Update] | Maker.io
This week on Maker Update: an e-ink computer to track your projects, a notifier for your online shops, a spooky lantern, and maybe the best WLED controller for hub75 matrices.
+Show Notes [Maker Update Ep.497]+
=Project of the Week=
Distraction Free Computer by Mirza Makes 0:31
https://www.youtube.com/watch?v=vM1vg2iJJ2k
M5Stack CardKB Keyboard on DigiKey:
https://www.digikey.com/short/zjp1z2v9
=More Projects=
Shop Sales Notifier by Becky Stern 2:39
https://www.youtube.com/watch?v=zmKez6NFyxI
Haunted Flashlight by Van Oak Props 3:45
https://www.youtube.com/watch?v=7dQmF4rsFUI
Transforming Cyberpunk Desk Lamp by Nilmo Studio 4:39
https://www.youtube.com/watch?v=GWqu2OgPFRA
=Tips & Tools=
Plug & Play Hub75 ESP32 Controller by Apollo Automation and Chris Maher 5:15
https://www.youtube.com/watch?v=uY13C-jwXFk
DigiComp1 by Chris Staecker 6:04
https://www.youtube.com/watch?v y8bGBE71yw
https://www.thingiverse.com/thing:1477209#google_vignette
3d Printed Motor Speed Regulator by Greg Zumwalt 6:53
https://www.youtube.com/watch?v=kd9CZbz04NU
=DigiKey Spotlight=
Arduino at Open Sauce 2026 by Zack Hipps 7:27
https://www.youtube.com/watch?v=8f_xdNoAcWw
#makerupdate
Maker Update is a weekly video series covering news, projects, tips, and events that interest the maker and DIY community.
Find more online:
Blog: http://makerprojectlab.com
Instagram: https://www.instagram.com/makerprojectlab/ Pocket Secretary [Maker Update] | Maker.io](https://i.ytimg.com/vi/IZg3i-qUwcg/mqdefault.jpg)





![Whistle While Your Robots Work [Maker Update] | Maker.io
Whistle While Your Robots Work [Maker Update] | Maker.io Whistle While Your Robots Work [Maker Update] | Maker.io](https://i.ytimg.com/vi/JnaY5_4zJA0/mqdefault.jpg)
