ros::init not working
Hi everyone!
I am having a bit of a problem with my code. I want to write a simple node but I am getting the error "undefined reference to ros::init(....)"
My code looks somethins like this:
class Bridge
{
private:
ros::NodeHandle nh_;
};
int main(int argc, char** argv) {
ros::init(argc, argv, "bridge");
Bridge bridge;
};
Any idea why is this happening?
Thanks in advance
Please update your question with more information, i.e. show the contents of your CMakeLists.txt file etc. Also what ROS version are you using?
Please reply it as an answer,thank you~