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

How to include the customly made msg header in cpp code?

asked 2013-07-13 15:53:35 -0600

Bholms gravatar image

I followed the following tutorial to create my own custom msg.


I have a package named test1. I created a msg in this package. After I build the package, the msg header file is located at


I wish to include this in my source code, which is located at test1/src folder. I couldn't use the include

#include "msg_gen/cpp/include/test1/Num.h"


#include <test1/Num.h>

Could anyone give me a valid header that can include this header file?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-13 21:30:43 -0600

noonv gravatar image
#include "test1/Num.h"
edit flag offensive delete link more

answered 2013-07-13 20:47:12 -0600

include <test1 num.h="">

This is the right way of doing it.

edit flag offensive delete link more

Question Tools


Asked: 2013-07-13 15:53:35 -0600

Seen: 1,113 times

Last updated: Jul 13 '13