ORB_SLAM
ORB_SLAM copied to clipboard
But the last step has issues,
It's almost done. But the last step has issues now. Can somebody help? I have no ideas about it. Thanks.
[ 84%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/KeyFrameDatabase.cc.o
[ 89%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/Sim3Solver.cc.o
[ 94%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/Initializer.cc.o
[100%] Linking CXX executable ../bin/ORB_SLAM
CMakeFiles/ORB_SLAM.dir/src/main.cc.o: In function main': main.cc:(.text.startup+0xbc8): undefined reference to ros::init(int&, char**, std::string const&, unsigned int)'
main.cc:(.text.startup+0xccb): undefined reference to ros::package::getPath(std::string const&)' main.cc:(.text.startup+0xe5c): undefined reference to ros::package::getPath(std::string const&)'
main.cc:(.text.startup+0x13b4): undefined reference to ros::package::getPath(std::string const&)' main.cc:(.text.startup+0x193b): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ORB_SLAM::Tracking::CreateInitialMap(cv::Mat&, cv::Mat&)': Tracking.cc:(.text+0x21e4): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
Tracking.cc:(.text+0x229f): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ORB_SLAM::Tracking::Run()':
Tracking.cc:(.text+0x2946): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ORB_SLAM::Tracking::GrabImage(boost::shared_ptr<sensor_msgs::Image_<std::allocator > const> const&)':
Tracking.cc:(.text+0x4589): undefined reference to cv_bridge::toCvShare(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)' Tracking.cc:(.text+0x5e11): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)': Tracking.cc:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x604): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/LoopClosing.cc.o: In function ORB_SLAM::LoopClosing::CorrectLoop()': LoopClosing.cc:(.text+0x2a47): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/FramePublisher.cc.o: In function ORB_SLAM::FramePublisher::FramePublisher()': FramePublisher.cc:(.text+0x1c3a): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
CMakeFiles/ORB_SLAM.dir/src/MapPublisher.cc.o: In function ORB_SLAM::MapPublisher::MapPublisher(ORB_SLAM::Map*)': MapPublisher.cc:(.text+0xb7e): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/ORB_SLAM.dir/build.make:1645: recipe for target '../bin/ORB_SLAM' failed
make[2]: *** [../bin/ORB_SLAM] Error 1
CMakeFiles/Makefile2:324: recipe for target 'CMakeFiles/ORB_SLAM.dir/all' failed
make[1]: *** [CMakeFiles/ORB_SLAM.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
cv_bridge::toCvShare(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)' Tracking.cc:(.text+0x5e11): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o: In function ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)': Tracking.cc:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x604): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/LoopClosing.cc.o: In function ORB_SLAM::LoopClosing::CorrectLoop()': LoopClosing.cc:(.text+0x2a47): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/ORB_SLAM.dir/src/FramePublisher.cc.o: In function ORB_SLAM::FramePublisher::FramePublisher()': FramePublisher.cc:(.text+0x1c3a): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
CMakeFiles/ORB_SLAM.dir/src/MapPublisher.cc.o: In function ORB_SLAM::MapPublisher::MapPublisher(ORB_SLAM::Map*)': MapPublisher.cc:(.text+0xb7e): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/ORB_SLAM.dir/build.make:1645: recipe for target '../bin/ORB_SLAM' failed
make[2]: *** [../bin/ORB_SLAM] Error 1
CMakeFiles/Makefile2:324: recipe for target 'CMakeFiles/ORB_SLAM.dir/all' failed
make[1]: *** [CMakeFiles/ORB_SLAM.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2my OS is Ubuntu16.04. Thanks a lot.
Actually I got this too ! The last step for compiling ORB-SLAM on Ubuntu 16.04 installed. Any hints ? cheers !!
CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o:in function ‘ORB_SLAM::Tracking::GrabImage(boost::shared_ptr<sensor_msgs::Image_<std::allocator
hello world, for the building problem I encountered, I got through via: see the attached pictures.
cheers.

@wangzhaoguang Is there anything else you changed? I deleted Opencv2 as well and it still didn't work
No i did not change other parts.
Check your gcc version. I met similar problem in ROS nodes building. Gcc 4.9 has linking problem, but gcc 5.4 works fine.
refer to this, solve it for ROS catkin build on Ubuntu 16.04, thanks.
Where shall we place the