ROS2 - Create a Custom Interface (Custom Message)

preview_player
Показать описание
In this tutorial you will learn how to create a ROS2 custom interface (Msg and Srv). You will also build the interfaces and know how to import them in your nodes.

⏱️ Chapters
(00:00) Check existing interfaces before you create a new one
(02:04) Create and configure a new package for your interfaces
(08:56) Create a new Msg interface
(13:17) Build the message
(16:56) How to import the message in your Python code
(20:02) How to import the message in your C++ code
(22:05) Create a new Srv interface

Рекомендации по теме
Комментарии
Автор

Thank you so much, im moving from ros1 to ros2 and i was missing the line to export dependencies for msg creation. the GPTS where no help, you just saved my from another day of pulling my hair out

BadIdea
Автор

Very helpful tutorials, particularly as the build system is one of the most confusing parts of ros initially I’m finding. Sometimes the code is simpler than the build scripts but it’s much clearer now, thanks 🙏

DanShepherd
Автор

Around 7:00 mins, adding always flags an error on the following line? for example in this case test_depend becomes 'invalid, one of the following is expected, member of group or export. Any ideas?

bennorris
Автор

Great tutorial! Can we have the custom msg built-in to our package? or it must be an independent package itself?

hossein_haeri
Автор

I have 1 question around 14:00
where should the package containing the message I want to use (in this case geometry_msgs) be located so that the syntax above works.

I mean, are there cases where we must include the absolute path of the package containing the msg I want to use?

hashemmansi
Автор

I have 1 question around 10:00, is it camelCase or PascalCase ?

FouadRoboticist
Автор

Nice Tutorial.
But i have one error, that my service dose not know my interface... My error message is: Unable to import interface.srv from package package_interface. Caused by: No module named 'package_interface'
Can you help me?

nineax
Автор

How does your squiggly error lines magically disappear here

anonymousnoman