Automation-Research-Team / aist_phoxi_camera

ROS driver for Photoneo PhoXi 3D cameras
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

'invalid pointer' error on launch. #1

Open mvandermerwe opened 5 months ago

mvandermerwe commented 5 months ago

I'm attempting to run the wrapper using a MotionCam-3D (FW 1.13.0) using PhoXiControl 1.12.3. On launching roslaunch aist_phoxi_camera run.launch I get the following error:

type is aist_phoxi_camera/aist_phoxi_camera
[ INFO] [1715922872.621560597]: Initializing nodelet with 32 worker threads.
[ INFO] [1715922872.622773835]: aist_phoxi_camera::CameraNodelet::onInit()
free(): invalid pointer

This seems similar to issues found with the official wrapper (e.g., here and here), so not sure if its a wrapper issue or unrelated.

t-ueshiba commented 5 months ago

Thank you for your reporting the problem. As the document had been quite out-dated, I have updated it to reflect the latest information. Please pull again and refer to it.

I have confirmed that the wrapper works well in our environment under the similar conditions as yours;

Please note that the wrapper requires modified version of original ddynamic_reconfigure.

If the problem still remains unresolved even after rebuilding the package, could you please give me information about the shared libraries linked to the wrapper, which can be known by;

$ cd (your-catkin-workspace)/devel/.private/aist_phoxi_camera/lib
$ ldd libaist_phoxi_camera.so
t-ueshiba commented 5 months ago

I have found that exactly the same error happened if the wrapper is executed in a docker container. If your workspace is constructed in a docker container, please try to run the wrapper under the native Ubuntu environment.

dangthanhan507 commented 4 months ago

Hello @t-ueshiba ! I am having the same issue. I can provide the *.so output.

    linux-vdso.so.1 (0x00007ffc36576000)
    libimage_transport.so => /opt/ros/noetic/lib/libimage_transport.so (0x00007f1e88709000)
    libddynamic_reconfigure.so => /home/andang/catkin_ws/devel/lib/libddynamic_reconfigure.so (0x00007f1e885c5000)
    libtf2_ros.so => /opt/ros/noetic/lib/libtf2_ros.so (0x00007f1e8850d000)
    libnodeletlib.so => /opt/ros/noetic/lib/libnodeletlib.so (0x00007f1e88495000)
    libclass_loader.so => /opt/ros/noetic/lib/libclass_loader.so (0x00007f1e88468000)
    libroscpp.so => /opt/ros/noetic/lib/libroscpp.so (0x00007f1e882b6000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e88251000)
    librosconsole.so => /opt/ros/noetic/lib/librosconsole.so (0x00007f1e881ee000)
    libroscpp_serialization.so => /opt/ros/noetic/lib/libroscpp_serialization.so (0x00007f1e881e9000)
    librostime.so => /opt/ros/noetic/lib/librostime.so (0x00007f1e881bc000)
    libconsole_bridge.so.0.4 => /lib/x86_64-linux-gnu/libconsole_bridge.so.0.4 (0x00007f1e881b6000)
    libPhoXi_API_gcc9.3.0_Release.so.1.12.3 => /opt/Photoneo/PhoXiControl-1.12.3/API/lib/libPhoXi_API_gcc9.3.0_Release.so.1.12.3 (0x00007f1e87d1e000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1e87b3c000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1e879ed000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1e879d2000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e877e0000)
    libmessage_filters.so => /opt/ros/noetic/lib/libmessage_filters.so (0x00007f1e877d8000)
    libroslib.so => /opt/ros/noetic/lib/libroslib.so (0x00007f1e877bb000)
    libboost_filesystem.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 (0x00007f1e8779d000)
    libtinyxml2.so.6 => /lib/x86_64-linux-gnu/libtinyxml2.so.6 (0x00007f1e87786000)
    libyaml-cpp.so.0.6 => /lib/x86_64-linux-gnu/libyaml-cpp.so.0.6 (0x00007f1e8772b000)
    libactionlib.so => /opt/ros/noetic/lib/libactionlib.so (0x00007f1e8770a000)
    libtf2.so => /opt/ros/noetic/lib/libtf2.so (0x00007f1e876cb000)
    libboost_thread.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 (0x00007f1e8769f000)
    libbondcpp.so => /opt/ros/noetic/lib/libbondcpp.so (0x00007f1e8766a000)
    libPocoFoundation.so.62 => /lib/x86_64-linux-gnu/libPocoFoundation.so.62 (0x00007f1e874b2000)
    libxmlrpcpp.so => /opt/ros/noetic/lib/libxmlrpcpp.so (0x00007f1e8748e000)
    libcpp_common.so => /opt/ros/noetic/lib/libcpp_common.so (0x00007f1e8747e000)
    libboost_chrono.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0 (0x00007f1e87470000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1e88835000)
    librosconsole_log4cxx.so => /opt/ros/noetic/lib/librosconsole_log4cxx.so (0x00007f1e87450000)
    librosconsole_backend_interface.so => /opt/ros/noetic/lib/librosconsole_backend_interface.so (0x00007f1e8744b000)
    liblog4cxx.so.10 => /lib/x86_64-linux-gnu/liblog4cxx.so.10 (0x00007f1e8726d000)
    libboost_regex.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 (0x00007f1e8716d000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1e87161000)
    librospack.so => /opt/ros/noetic/lib/librospack.so (0x00007f1e87112000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f1e87109000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1e87103000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1e8708e000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1e87072000)
    libapr-1.so.0 => /lib/x86_64-linux-gnu/libapr-1.so.0 (0x00007f1e87039000)
    libaprutil-1.so.0 => /lib/x86_64-linux-gnu/libaprutil-1.so.0 (0x00007f1e8700b000)
    libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007f1e86d0c000)
    libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f1e86b24000)
    libboost_program_options.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_program_options.so.1.71.0 (0x00007f1e86a95000)
    libpython3.8.so.1.0 => /lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007f1e8653f000)
    libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f1e86504000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f1e864d6000)
    libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f1e84a13000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f1e84a0e000)

Additionally, I tried building an example from https://github.com/photoneo-3d/photoneo-cpp-examples/tree/v1.12/PhoXiAPI/RotatedCalibration/RotatedCalibrationExample.cpp using normal cmake which worked really well.

However, once I changed the CMake for that particular example to support ROS and added

#include "ros/ros.h"

I started getting the free() invalid pointer error.

It suggests that ROS and PhoXi are not mixing well. Let me know your thoughts.

Thank you for your time!