Import message from a different directory into a cpp script [closed]
In my workspace inside the test folder I have a msg folder that contains a message testmessage.msg.
Now I'm trying to subscribe to the topic in a cpp script in a different folder, for example test2 , only when I do the include it says it can't find it.
In python I import like this and it works:
from test.msg import testmessage
How can I import in cpp?
I have this error when importing in cpp script:
Charge.msg is in the r2d2 folder which is in my carkin_ws so in CMakelist I put it: