Livox-SDK / livox_ros_driver

Livox device driver under ros, support Lidar Mid-40, Mid-70, Tele-15, Horizon, Avia.
Other
365 stars 203 forks source link

ubuntu18.04 编译livox_ros_driver报错 #68

Open helloworld202 opened 3 years ago

helloworld202 commented 3 years ago

图片

Livox-SDK commented 3 years ago

(1)Remove the builder folder in livox_ros_driver directory rm -rf build (2)rebuild catkin_make

kxch928925819 commented 3 years ago

[ 76%] Built target livox_ros_driver_generate_messages [ 80%] Building CXX object livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/timesync/timesync.cpp.o [ 84%] Building CXX object livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/timesync/user_uart/user_uart.cpp.o [ 88%] Building CXX object livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/common/comm/comm_protocol.cpp.o [ 92%] Building CXX object livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/common/comm/sdk_protocol.cpp.o [ 96%] Building CXX object livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/common/comm/gps_protocol.cpp.o [100%] Linking CXX executable /home/dji/ws_livox/devel/lib/livox_ros_driver/livox_ros_driver_node CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In function livox_ros::Lddc::CreateBagFile(std::string const&)': lddc.cpp:(.text+0x41b): undefined reference torosbag::Bag::open(std::string const&, unsigned int)' lddc.cpp:(.text+0x4ec): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In functionlivox_ros::Lddc::PrepareExit()': lddc.cpp:(.text+0x677): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' lddc.cpp:(.text+0x6f0): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In function livox_ros::Lddc::GetCurrentPublisher(unsigned char)': lddc.cpp:(.text+0x13ca): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' lddc.cpp:(.text+0x1459): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o:lddc.cpp:(.text+0x1539): more undefined references toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' follow CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In function `livox_ros::Lddc::PublishPointcloud2(livox_ros::LidarDataQueue, unsigned int, unsigned char)': lddc.cpp:(.text+0x2016): undefined reference to ros::Publisher::getTopic() const' lddc.cpp:(.text+0x239c): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In function `livox_ros::Lddc::PublishPointcloudData(livox_ros::LidarDataQueue, unsigned int, unsigned char)': lddc.cpp:(.text+0x270e): undefined reference to ros::Publisher::getTopic() const' lddc.cpp:(.text+0x2ad7): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In function `livox_ros::Lddc::PublishCustomPointcloud(livox_ros::LidarDataQueue, unsigned int, unsigned char)': lddc.cpp:(.text+0x2fcb): undefined reference to ros::Publisher::getTopic() const' lddc.cpp:(.text+0x312a): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In function `livox_ros::Lddc::PublishImuData(livox_ros::LidarDataQueue, unsigned int, unsigned char)': lddc.cpp:(.text+0x3574): undefined reference to ros::Publisher::getTopic() const' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In functionvoid rosbag::Bag::writeMessageDataRecord<sensormsgs::PointCloud2<std::allocator > >(unsigned int, ros::Time const&, sensormsgs::PointCloud2<std::allocator > const&)': lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs12PointCloud2ISaIvEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs12PointCloud2ISaIvEEEEEvjRKN3ros4TimeERKT]+0x104): undefined reference to rosbag::Bag::toHeaderString(ros::Time const*) const' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs12PointCloud2_ISaIvEEEEEvjRKN3ros4TimeERKT_[_ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs12PointCloud2_ISaIvEEEEEvjRKN3ros4TimeERKT_]+0x246): undefined reference torosbag::Bag::writeHeader(std::map<std::string, std::string, std::less, std::allocator<std::pair<std::string const, std::string> > > const&)' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs12PointCloud2ISaIvEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs12PointCloud2ISaIvEEEEEvjRKN3ros4TimeERKT]+0x280): undefined reference to rosbag::Bag::appendHeaderToBuffer(rosbag::Buffer&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In functionvoid rosbag::Bag::writeMessageDataRecord<pcl::PointCloud >(unsigned int, ros::Time const&, pcl::PointCloud const&)': lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN3pcl10PointCloudINS29PointXYZIEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN3pcl10PointCloudINS29PointXYZIEEEEEvjRKN3ros4TimeERKT]+0x104): undefined reference to rosbag::Bag::toHeaderString(ros::Time const*) const' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN3pcl10PointCloudINS2_9PointXYZIEEEEEvjRKN3ros4TimeERKT_[_ZN6rosbag3Bag22writeMessageDataRecordIN3pcl10PointCloudINS2_9PointXYZIEEEEEvjRKN3ros4TimeERKT_]+0x2a1): undefined reference torosbag::Bag::writeHeader(std::map<std::string, std::string, std::less, std::allocator<std::pair<std::string const, std::string> > > const&)' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN3pcl10PointCloudINS29PointXYZIEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN3pcl10PointCloudINS29PointXYZIEEEEEvjRKN3ros4TimeERKT]+0x2d9): undefined reference to rosbag::Bag::appendHeaderToBuffer(rosbag::Buffer&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In functionvoid rosbag::Bag::writeMessageDataRecord<livox_rosdriver::CustomMsg<std::allocator > >(unsigned int, ros::Time const&, livox_rosdriver::CustomMsg<std::allocator > const&)': lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN16livox_ros_driver10CustomMsgISaIvEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN16livox_ros_driver10CustomMsgISaIvEEEEEvjRKN3ros4TimeERKT]+0x104): undefined reference to rosbag::Bag::toHeaderString(ros::Time const*) const' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN16livox_ros_driver10CustomMsg_ISaIvEEEEEvjRKN3ros4TimeERKT_[_ZN6rosbag3Bag22writeMessageDataRecordIN16livox_ros_driver10CustomMsg_ISaIvEEEEEvjRKN3ros4TimeERKT_]+0x243): undefined reference torosbag::Bag::writeHeader(std::map<std::string, std::string, std::less, std::allocator<std::pair<std::string const, std::string> > > const&)' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN16livox_ros_driver10CustomMsgISaIvEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN16livox_ros_driver10CustomMsgISaIvEEEEEvjRKN3ros4TimeERKT]+0x27d): undefined reference to rosbag::Bag::appendHeaderToBuffer(rosbag::Buffer&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/lddc.cpp.o: In functionvoid rosbag::Bag::writeMessageDataRecord<sensormsgs::Imu<std::allocator > >(unsigned int, ros::Time const&, sensormsgs::Imu<std::allocator > const&)': lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs4ImuISaIvEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs4ImuISaIvEEEEEvjRKN3ros4TimeERKT]+0x104): undefined reference to rosbag::Bag::toHeaderString(ros::Time const*) const' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs4Imu_ISaIvEEEEEvjRKN3ros4TimeERKT_[_ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs4Imu_ISaIvEEEEEvjRKN3ros4TimeERKT_]+0x21b): undefined reference torosbag::Bag::writeHeader(std::map<std::string, std::string, std::less, std::allocator<std::pair<std::string const, std::string> > > const&)' lddc.cpp:(.text._ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs4ImuISaIvEEEEEvjRKN3ros4TimeERKT[_ZN6rosbag3Bag22writeMessageDataRecordIN11sensor_msgs4ImuISaIvEEEEEvjRKN3ros4TimeERKT]+0x253): undefined reference to rosbag::Bag::appendHeaderToBuffer(rosbag::Buffer&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/livox_ros_driver.cpp.o: In functionmain': livox_ros_driver.cpp:(.text.startup+0x40): undefined reference to ros::console::set_logger_level(std::string const&, ros::console::levels::Level)' livox_ros_driver.cpp:(.text.startup+0x8c): undefined reference toros::init(int&, char, std::string const&, unsigned int)' livox_ros_driver.cpp:(.text.startup+0xf8): 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&)' livox_ros_driver.cpp:(.text.startup+0x208): undefined reference toros::NodeHandle::getParam(std::string const&, int&) const' livox_ros_driver.cpp:(.text.startup+0x246): undefined reference to ros::NodeHandle::getParam(std::string const&, int&) const' livox_ros_driver.cpp:(.text.startup+0x287): undefined reference toros::NodeHandle::getParam(std::string const&, int&) const' livox_ros_driver.cpp:(.text.startup+0x2c8): undefined reference to ros::NodeHandle::getParam(std::string const&, double&) const' livox_ros_driver.cpp:(.text.startup+0x309): undefined reference toros::NodeHandle::getParam(std::string const&, int&) const' livox_ros_driver.cpp:(.text.startup+0x345): undefined reference to ros::NodeHandle::getParam(std::string const&, std::string&) const' livox_ros_driver.cpp:(.text.startup+0x383): undefined reference toros::NodeHandle::getParam(std::string const&, bool&) const' livox_ros_driver.cpp:(.text.startup+0x3c1): undefined reference to ros::NodeHandle::getParam(std::string const&, bool&) const' livox_ros_driver.cpp:(.text.startup+0x4c9): undefined reference toros::NodeHandle::getParam(std::string const&, std::string&) const' livox_ros_driver.cpp:(.text.startup+0x558): undefined reference to ros::NodeHandle::getParam(std::string const&, std::string&) const' livox_ros_driver.cpp:(.text.startup+0x73e): undefined reference toros::NodeHandle::getParam(std::string const&, std::string&) const' livox_ros_driver.cpp:(.text.startup+0x929): undefined reference to ros::NodeHandle::getParam(std::string const&, std::string&) const' livox_ros_driver.cpp:(.text.startup+0x9b8): undefined reference toros::NodeHandle::getParam(std::string const&, std::string&) const' livox_ros_driver.cpp:(.text.startup+0xdb5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' livox_ros_driver.cpp:(.text.startup+0xe9c): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' livox_ros_driver.cpp:(.text.startup+0xf9c): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' livox_ros_driver.cpp:(.text.startup+0x10d5): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' livox_ros_driver.cpp:(.text.startup+0x1178): undefined reference toros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/livox_ros_driver_node.dir/livox_ros_driver/livox_ros_driver.cpp.o:livox_ros_driver.cpp:(.text.startup+0x126b): more undefined references to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' follow collect2: error: ld returned 1 exit status livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/build.make:1074: recipe for target '/home/dji/ws_livox/devel/lib/livox_ros_driver/livox_ros_driver_node' failed make[2]: ** [/home/dji/ws_livox/devel/lib/livox_ros_driver/livox_ros_driver_node] Error 1 CMakeFiles/Makefile2:1012: recipe for target 'livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/all' failed make[1]: [livox_ros_driver/CMakeFiles/livox_ros_driver_node.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j8 -l8" failed

Same to me! PCL 1.91 down to PCL1.80 ,LIVOX-SDK 2.3 down to LIVOX-SDK 2.20