Can't build TOF cam ros2_publisher via colcon?

Hi,

Purchased an ArduCam TOF camera about a week ago, installed the SDK and drivers on my Nano. The inbuilt jetson_preview is working great!

jet_prev

Unfortunately, I really need to get the PointCloud2 display working in ROS 2, and I’m failing to compile that properly on my machine.

Here’s that error output when I try to build it with colcon:

Starting >>> arducam
--- stderr: arducam
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: warning: libArduCamLib.so.2, needed by /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so, not found (try using -rpath or -rpath-link)
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: warning: libarducam_config_parser.so, needed by /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so, not found (try using -rpath or -rpath-link)
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_readUserData'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_readImage'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error&&)@GLIBCXX_3.4.26'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_beginCaptureImage'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_wait_until_steady(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >)@GLIBCXX_3.4.29'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error&&)@GLIBCXX_3.4.26'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()@CXXABI_1.3.13'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_open'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_setboardConfig'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_del'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_close'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_endCaptureImage'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_captureImage'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `ArduCam_writeSensorReg'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libArducamDepthCamera.so: undefined reference to `arducam_parse_config'
/home/elizabeth/miniforge3/envs/ros_env/bin/ld: /home/elizabeth/miniforge3/envs/ros_env/lib/librclcpp.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status
make[2]: *** [tof_pointcloud] Error 1
make[1]: *** [CMakeFiles/tof_pointcloud.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< arducam [1.29s, exited with code 2]

Summary: 0 packages finished [1.75s]
  1 package failed: arducam
  1 package had stderr output: arducam  

I’ve tried updating the GCC and reinstalling the SDK thinking that it might impact the GLIBCXX errors, but no cigar.

Maybe the compiler is looking for the SDK in a different place than it actually is? Not sure how to verify this or what next steps to take. Alternatively, maybe it’s not compiling for the right architecture?

Any help is sincerely appreciated!! Thank you so much!

Hi,
Hhhh, tbo, we have been trying to reproduce your problem since last week. Unfortunately, there is always some other stuff that keeps interrupting this process… Hope I was Naruto and did well in Kagebunsin.

Thanks very much for your response! Sincerely appreciate that this is being investigated-- it’s a huge help. Good luck with becoming hokage!