ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In C++, you'd import the header file for that message like so:
#include "package_name/msg_name.h"
So in your case: #include "test/testmessage.h"
From Writing Publisher C++ code explained:
#include "std_msgs/String.h"
This includes the std_msgs/String message, which resides in the std_msgs package. This is a header generated automatically from the String.msg file in that package.