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

Revision history [back]

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/Tutorials/Rosidl-Tutorial/ that'll get you squared away.