Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to use ROS to send a message on a c++ file?

Hi all, I have successfully rosmaked the Correpsondence Grouping Tutorial(a tutorial in PCL), and now I want to send a message to a topic if I recognized the target in correspondence grouping. However, the correspondence grouping tutorial doesn't use any thing about ros before, so I wonder to know how to emerge ROS in this tutorial. I tried to add the code like the tutorial: WritingPublisherSubscriber(c++)(http ://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29), and modified my cmakelist, but I always get the error:
CMakeFiles/correspondence_grouping.dir/correspondence_grouping.cpp.o: In function main': correspondence_grouping.cpp:(.text+0xa1f): undefined reference toros::Publisher::~Publisher()' correspondence_grouping.cpp:(.text+0x1de6): undefined reference to ros::console::g_initialized' correspondence_grouping.cpp:(.text+0x1df5): undefined reference toros::console::initialize()'

So, does anyone knows how to solve this?

How to use ROS to send a message on a c++ file?

Hi all, I have successfully rosmaked the Correpsondence Grouping Tutorial(a tutorial in PCL), and now I want to send a message to a topic if I recognized the target in correspondence grouping. However, the correspondence grouping tutorial doesn't use any thing about ros before, so I wonder to know how to emerge ROS in this tutorial. I tried to add the code like the tutorial: WritingPublisherSubscriber(c++)(http ://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29), and modified my cmakelist, but I always get the error:
CMakeFiles/correspondence_grouping.dir/correspondence_grouping.cpp.o: In function main': correspondence_grouping.cpp:(.text+0xa1f): undefined reference toros::Publisher::~Publisher()' correspondence_grouping.cpp:(.text+0x1de6): undefined reference to ros::console::g_initialized' correspondence_grouping.cpp:(.text+0x1df5): undefined reference toros::console::initialize()'

So, does anyone knows how to solve this?

How to use ROS to send a message on a c++ file?

Hi all, I have successfully rosmaked the Correpsondence Grouping Tutorial(a tutorial in PCL), and now I want to send a message to a topic if I recognized the target in correspondence grouping. However, the correspondence grouping tutorial doesn't use any thing about ros before, so I wonder to know how to emerge ROS in this tutorial. I tried to add the code like the tutorial: WritingPublisherSubscriber(c++)(http ://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29), and modified my cmakelist, but I always get the error:
CMakeFiles/correspondence_grouping.dir/correspondence_grouping.cpp.o: In function main': correspondence_grouping.cpp:(.text+0xa1f): undefined reference toros::Publisher::~Publisher()' correspondence_grouping.cpp:(.text+0x1de6): undefined reference to ros::console::g_initialized' correspondence_grouping.cpp:(.text+0x1df5): undefined reference toros::console::initialize()'

So, does anyone knows how to solve this?

How to use ROS to send a message on a c++ file?

Hi all, I have successfully rosmaked the Correpsondence Grouping Tutorial(a tutorial in PCL), and now I want to send a message to a topic if I recognized the target in correspondence grouping. However, the correspondence grouping tutorial doesn't use any thing about ros before, so I wonder to know how to emerge ROS in this tutorial. I tried to add the code like the tutorial: WritingPublisherSubscriber(c++)(http ://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29), and modified my cmakelist, but I always get the error:
CMakeFiles/correspondence_grouping.dir/correspondence_grouping.cpp.o: In function main': correspondence_grouping.cpp:(.text+0xa1f): undefined reference toros::Publisher::~Publisher()' correspondence_grouping.cpp:(.text+0x1de6): undefined reference to ros::console::g_initialized' correspondence_grouping.cpp:(.text+0x1df5): undefined reference toros::console::initialize()'

So, does anyone knows how to solve this?

How to use ROS to send a message on a c++ file?

Hi all, I have successfully rosmaked the Correpsondence Grouping Tutorial(a tutorial in PCL), and now I want to send a message to a topic if I recognized the target in correspondence grouping. However, the correspondence grouping tutorial doesn't use any thing about ros before, so I wonder to know how to emerge ROS in this tutorial. I tried to add the code like the tutorial: WritingPublisherSubscriber(c++)(http ://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29), and modified my cmakelist, but I always get the error:
CMakeFiles/correspondence_grouping.dir/correspondence_grouping.cpp.o: In function main': correspondence_grouping.cpp:(.text+0xa1f): undefined reference toros::Publisher::~Publisher()' correspondence_grouping.cpp:(.text+0x1de6): undefined reference to ros::console::g_initialized' correspondence_grouping.cpp:(.text+0x1df5): undefined reference toros::console::initialize()'

So, does anyone knows how to solve this?

How to use ROS to send a message on a c++ file?

Hi all, I have successfully rosmaked the Correpsondence Grouping Tutorial(a tutorial in PCL), and now I want to send a message to a topic if I recognized the target in correspondence grouping. However, the correspondence grouping tutorial doesn't use any thing about ros before, so I wonder to know how to emerge ROS in this tutorial. I tried to add the code like the tutorial: WritingPublisherSubscriber(c++)(http ://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29), and modified my cmakelist, but I always get the error:
CMakeFiles/correspondence_grouping.dir/correspondence_grouping.cpp.o: In function main': correspondence_grouping.cpp:(.text+0xa1f): undefined reference toros::Publisher::~Publisher()' correspondence_grouping.cpp:(.text+0x1de6): undefined reference to ros::console::g_initialized' correspondence_grouping.cpp:(.text+0x1df5): undefined reference toros::console::initialize()'

So, does anyone knows how to solve this?