Closed kinni318 closed 3 months ago
Thanks for your feedback! sick_scan_xd uses std::thread, therefore target sick_generic_caller needs to be linked to pthread. Depending on system settings, the linker flag is implicitly supplemented or or must be set explicitly.
Please use the latest update (version 3.2.2) in branch https://github.com/SICKAG/sick_scan_xd/tree/feature/bloom_humble and rebuild.
T
Thanks for following up. The build error is different, it looks like the compiler either does not fully support C++ 14, or that an additional #include <array>
is required in PoseWithCovariance.h
. Which linux, compiler and compiler version do you use? Can you add #include <array>
in file /home/sick/sick_bloomH2/sick_scan_xd/roswrap/src/rossimu/kinetic/include/geometry_msgs/PoseWithCovariance.h
for a quick test and retry?
Many thanks for your help. it worked. perfectlly done without error by editing the file before building the lib. ->OS info: Linux raspberrypi 6.1.0-rpi8-rpi-v8 / GNU 12.2.0
Thanks for following up! We will add the missing include in the next release.
A customer who have to use the sick_scan_xd driver on a raspberry PI OS. When they tried to compile the library they got a strange error:
[ 96%] Building CXX object CMakeFiles/sick_scan_xd_lib.dir/roswrap/src/rossimu/k inetic/src/rate.cpp.o [ 97%] Building CXX object CMakeFiles/sick_scan_xd_lib.dir/roswrap/src/rossimu/k inetic/src/rossimu.cpp.o [ 98%] Building CXX object CMakeFiles/sick_scan_xd_lib.dir/roswrap/src/tools/sic k_scan/pointcloud_utils.cpp.o [ 99%] Linking CXX shared library libsick_scan_xd_shared_lib.so [ 99%] Built target sick_scan_xd_shared_lib [ 99%] Linking CXX static library libsick_scan_xd_lib.a [ 99%] Built target sick_scan_xd_lib Scanning dependencies of target sick_generic_caller [ 99%] Building CXX object CMakeFiles/sick_generic_caller.dir/driver/src/sick_ge neric_caller.cpp.o [100%] Linking CXX executable sick_generic_caller /usr/bin/ld: libsick_scan_xd_lib.a(udp_receiver.cpp.o): in function
sick_scanse gment_xd::UdpReceiver::Start()': /usr/include/c++/8/bits/unique_ptr.h:81: undefined reference to
pthread_create' /usr/bin/ld: libsick_scan_xd_lib.a(msgpack_converter.cpp.o): in functionsick_s cansegment_xd::MsgPackConverter::Start()': /usr/include/c++/8/bits/unique_ptr.h:81: undefined reference to
pthread_create' /usr/bin/ld: libsick_scan_xd_lib.a(msgpack_exporter.cpp.o): in functionsick_sc ansegment_xd::MsgPackExporter::Start()': /usr/include/c++/8/bits/unique_ptr.h:81: undefined reference to
pthread_create' /usr/bin/ld: libsick_scan_xd_lib.a(sick_generic_laser.cpp.o): in functionstart GenericLaser(int, char**, std::__cxx11::basic_string<char, std::char_traits<char >, std::allocator<char> >, roswrap::NodeHandle*, int*)': /usr/include/c++/8/ext/new_allocator.h:86: undefined reference to
pthread_creat e' /usr/bin/ld: libsick_scan_xd_lib.a(tcp.cpp.o): in functionTcp::open(std::__cxx 11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short, bool)': /usr/include/c++/8/bits/basic_string.h:1932: undefined reference to
pthread_cre ate' /usr/bin/ld: libsick_scan_xd_lib.a(scansegment_threads.cpp.o):/usr/include/c++/8 /bits/unique_ptr.h:81: more undefined references to `pthread_create' follow collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/sick_generic_caller.dir/build.make:85: sick_generic_cal ler] Error 1 make[1]: [CMakeFiles/Makefile2:136: CMakeFiles/sick_generic_caller.dir/all] Error 2 make: *** [Makefile:130: all] Error 2They followed the build description-[Build on Linux generic without ROS] and used options -DLDMRS=0 -DRASPBERRY=1 to skip LDMRS sensors... [cmake -DROS_VERSION=0 -DLDMRS=0 -DRASPBERRY=1 -G "Unix Makefiles" ../sick_scan_xd]
(https://github.com/SICKAG/sick_scan_xd/blob/develop/INSTALL-GENERIC.md#build-on-linux-generic-without-ros)
Thier environment and specifications: Raspberry Pi 4 Model B OS: Raspberry PI OS whiout ROS LiDAR: SICK multiScan
I would appreciate it if you could tell me how to solve it.