writing a custom message and using it in a different package
first of all, I have gone through these links, so it is not a repeat question:
- http://wiki.ros.org/ROS/Tutorials/Def...
- http://wiki.ros.org/ROS/Tutorials/Cre...
- http://answers.ros.org/question/31779...
- http://answers.ros.org/question/62092...
- http://answers.ros.org/question/52744...
- http://answers.ros.org/question/62707...
and i tried all of these solutions, but they did not help me.
The question is..
I have created a msg folder in package 'A'. wrote hello.msg in that 'msg' folder. I followed this tutorial: http://wiki.ros.org/ROS/Tutorials/Cre... and catkin_make worked fine here.
I now created a new package 'B' , has a node 'helpme.cpp' and in that I have written #include "A/hello.h"
and I defined
A::hello left,right;
left.myheight = image.rows;
left.mywidth = image.cols;
.....in the callback function
and when I do catkin_make
, it says..
/home/krish/architecture_ws/src/rectifier/src/camera_timestamp_node.cpp:276:6: error: ‘const ImageConstPtr’ has no member named ‘mywidth’
/home/krish/architecture_ws/src/rectifier/src/camera_timestamp_node.cpp:277:6: error: ‘const ImageConstPtr’ has no member named ‘myheight’
pls tell me what changes should I make in CMakeLists.txt
and package.xml
in the packages A and B.
Could you please reformat this, I just over read your message definition. The readability is quite horrible. Like use the code (0101010) Button for your message definition.
I've fixed your formatting a bit, because as @cyborg-x1 writes, it was unintelligible before. Please take care of formatting your question properly in the future: it increases your chances of getting answers.
ok, gvdhoorn and cybord-x1, I will take care of formatting from next time