Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 84

writing a custom message and using it in a different package

$
0
0
first of all, I have gone through these links, so it is not a repeat question: - http://wiki.ros.org/ROS/Tutorials/DefiningCustomMessages - http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv#Creating_a_msg - http://answers.ros.org/question/31779/how-to-use-a-message-that-i-made/ - http://answers.ros.org/question/62092/catkin_make-started-failing-to-generate-h-from-msg/ - http://answers.ros.org/question/52744/how-to-specify-dependencies-with-foo_msgs-catkin-packages/ - http://answers.ros.org/question/62707/jenkins-fails-to-build-with-no-such-file-or-directory/ 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/CreatingMsgAndSrv#Creating_a_msg 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.

Viewing all articles
Browse latest Browse all 84

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>