ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS2 Custom Message (MSG)

asked 2020-05-08 18:32:14 -0600

fiji3119 gravatar image

To test a custom message in say my_test_package, do I need to create a separate package for this - for example, my_test_package_msg? Can I add msg folder at same level as src folder in my_test_package? If so, how I do modify CMakeLists.txt to include the header file created by custom message?

Thanks, kumar

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-08 19:26:29 -0600

do I need to create a separate package for this - for example, my_test_package_msg

No, but I highly recommend it. There's some CMake stuff you need to do to properly link it inside the same package that you probably don't want to deal with.

Can I add msg folder at same level as src folder in my_test_package

You may, in fact, you must :-)

how I do modify CMakeLists.txt to include the header file created by custom message

You may want to review https://index.ros.org/doc/ros2/Tutori... that'll get you squared away.

edit flag offensive delete link more

Comments

The link in the answer is broken. I found this page useful: https://index.ros.org/doc/ros2/Tutorials/Custom-ROS2-Interfaces/. Hope it helps!

Andy Blight gravatar image Andy Blight  ( 2020-05-18 08:58:55 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-05-08 18:32:14 -0600

Seen: 651 times

Last updated: May 11 '20