I've created a custom message package following this tutorial for ROS2:


Despite much playing around I'm unable to get the .idl files to create the .hpp message header files I need for the CPP code. Compiler just complains with cannot find XXX.hpp etc

Is there another tutorial? I'm keeping the message and node packages separate




1 Answer 1


You tag your question with ros-humble, yet the link points to the tutorial for Crystal, which is a much older ROS version.

Here is the tutorial for Humble: https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.html

I suggest you follow that tutorial step by step and if it still does not work, that you clarify which steps worked and from what step exactly it fails, as that tutorial is known to work.

  • $\begingroup$ Found the issue. RobotCommand.msg is actually creating a file called robot_command.hpp....I was trying to #include and indeed find variations of RobotCommand.hpp. Didn't think about looking for the underscore. No idea why it's doing that. That being said found the message file I needed and happily compiling now $\endgroup$
    – MarkyMark
    Commented May 15 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.