Hi!
I'm trying to get my nodes to run on my Debian Jessie. I have developed those with Kubuntu 14.04. Both systems have the same ROS version - Indigo - however some libs are not the same. For example libopencv
on Debian is 2.4.9
but on Ubuntu 14.04 it is 2.4.8
. I have built and installed the Desktop version (rqt, rviz etc. included) on my Debian. It seems that something has gone really wrong. I can't run rviz
due to
*** Error in `rviz': realloc(): invalid pointer: 0x00007f97b2fad860 ***
Aborted
My nodelet throws fatal erros at me:
[FATAL] [1442423922.398321597]: Service call failed!
[camera_nodelet_manager-2] process has died [pid 2652, exit code -11, cmd /opt/ros/indigo/lib/nodelet/nodelet manager __name:=camera_nodelet_manager __log:=/home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera_nodelet_manager-2.log].
log file: /home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera_nodelet_manager-2*.log
[camera/driver-3] process has died [pid 2653, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet load pmd_camboard_nano/driver /camera_nodelet_manager __name:=driver __log:=/home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-driver-3.log].
log file: /home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-driver-3*.log
[camera/rectify_depth-5] process has died [pid 2655, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet load image_proc/rectify /camera_nodelet_manager image_mono:=depth/image camera_info:=depth/camera_info image_rect:=depth/image_rect __name:=rectify_depth __log:=/home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-rectify_depth-5.log].
log file: /home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-rectify_depth-5*.log
[camera/rectify_amplitude-6] process has died [pid 2656, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet load image_proc/rectify /camera_nodelet_manager image_mono:=amplitude/image camera_info:=amplitude/camera_info image_rect:=amplitude/image_rect __name:=rectify_amplitude __log:=/home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-rectify_amplitude-6.log].
log file: /home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-rectify_amplitude-6*.log
[camera/rectify_distance-4] process has died [pid 2654, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet load image_proc/rectify /camera_nodelet_manager image_mono:=distance/image camera_info:=distance/camera_info image_rect:=distance/image_rect __name:=rectify_distance __log:=/home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-rectify_distance-4.log].
log file: /home/rosuser/.ros/log/f7737d60-5c96-11e5-b957-78dd08f4756e/camera-rectify_distance-4*.log
This is followed by an endless restarting and starting of the separate processes involved and throwing the same errors over and over again.
All I have done in addition to my installation is to add to /usr/local my custom build of PCL and OpenCV (same versions as in upstream Debian Jessie but with some features enabled), which my no means interfere with the same libs but installed from upstream and in different locations. I have test with and without my custom installations - the result is the same. The update here refers to the building and installation of a bunch of additional packages (that I require or might require at some point in the future) among which is the image_pipeline set, tf, nodelet set etc. None gave any indication of being broken during the building process and the following installation. Also it seems to be impossible to use custom OpenCV install because no matter what I do (tried checkinstall and tested the installation with multiple different names for this library) rosdep continues don't give a damn and download and install the upstream version anyway.
The only rviz-related issue that I can think of was during the installation. On Debian rosdep
continuously does weird stuff with libogre
. Debian's repos have both version 1.8
and 1.9
. However for some reason rosdep continues to try installing 1.9
even though I have found out that 1.9
is a no go (rosinstall
fails). So I have to reinstall 1.8
every single time I update my ROS space where I keep my sources and builds for my custom installation. Beside that I haven't had any issues during installation.
I have tried several other things in ROS and they seem to run without a problem. I've checked for example the actionlib_tutorials and they run without any issues. All ros*
commands (rosrun, roscore, roslaunch etc.) are there and working.
I have to mention also that both compilation and linking of my nodes works without any errors. I have noticed one thing in particular in the errors I quoted above:
Error string: Could not load library (Poco exception = libopencv_viz.so.2.4: cannot open shared object file: No such file or directory)
The problem is I don't have such shared object on my computer. I've googled a little bit but all I got were 2 search results only one of which was handling this error in particular and it was said that it has something to do with image_geometry referencing an old version of OpenCV where this file was present but that is no longer the case.
The CMakeLists.txt for my project is:
cmake_minimum_required(VERSION 2.8.3)
project(pmd_camboard_nano)
#set(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}") # Congrats! No C++11 :-/ http://stackoverflow.com/questions/32119437/weird-segmentation-fault-after-converting-a-ros-pointcloud2-message-to-pcl-point/32120491#32120491
find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs image_transport nodelet dynamic_reconfigure tf)
generate_dynamic_reconfigure_options(cfg/PMD.cfg)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS roscpp sensor_msgs image_transport nodelet dynamic_reconfigure tf pcl_conversions pcl_msgs pcl_ros
DEPENDS boost_system PCL
)
# Set PMDSDK Requirements
set(PMDSDK_ROOT_DIR ${PROJECT_SOURCE_DIR}/PMDSDK) # Change this if the path is different
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
# Register PMDSDK
find_package(PMDSDK REQUIRED)
# Register Boost
find_package(Boost REQUIRED COMPONENTS system)
# Register PCL
find_package(PCL 1.7 REQUIRED COMPONENTS common io filters kdtree surface)
# Includes, link directories and definitions
# Place PCL includes before those of Catkin to detect the custom PCL install
include_directories(include ${PCL_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${PMDSDK_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
#include_directories(include ${catkin_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} ${PMDSDK_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_definitions(-DPMD_PLUGIN_DIR="${PMDSDK_PLUGIN_DIR}/")
#########
# BUILD #
#########
# make sure configure headers are built before any node using them
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
message(${CATKIN_DEVEL_PREFIX})
add_library(${PROJECT_NAME}_nodelet src/driver_nodelet.cpp src/pmd_camboard_nano.cpp)
target_link_libraries(${PROJECT_NAME}_nodelet ${catkin_LIBRARIES} ${PMDSDK_LIBRARIES})
add_dependencies(${PROJECT_NAME}_nodelet ${PROJECT_NAME}_gencfg)
add_executable(${PROJECT_NAME}_node src/driver_node)
target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${PMDSDK_LIBRARIES})
add_dependencies(${PROJECT_NAME}_node ${PROJECT_NAME}_gencfg)
add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS})
# TODO
# Create a pipeline consisting of nodes for each processing step
# Each node takes a point cloud message, processes it and then publishes the results
# This will allow a very dynamic coupling between the processess working on the data from the PMD device
# and will allow testing various combinations in order to achieve as good results as possible
# The cloud handler receives point clouds either directly from the PMD publishing node (directly controlling
# the PMD device) or from the cloud relay. Once a point cloud message is received, it is further processed
add_executable(${PROJECT_NAME}_cloud_statistical_outlier_removal src/pmd_camboard_nano_cloud_statistical_outlier_removal)
target_link_libraries(${PROJECT_NAME}_cloud_statistical_outlier_removal ${catkin_LIBRARIES} boost_system pthread)
target_link_libraries(${PROJECT_NAME}_cloud_statistical_outlier_removal ${PCL_LIBRARIES}) #<---UNTIL LINKING ORDER IS RESOLVE USE ALL PCL LIBS # pcl_common pcl_io pcl_filters pcl_surface pcl_kdtree)
add_executable(${PROJECT_NAME}_cloud_surface_smoothing_normal_estimation src/pmd_camboard_nano_cloud_surface_smoothing_normal_estimation)
target_link_libraries(${PROJECT_NAME}_cloud_surface_smoothing_normal_estimation ${catkin_LIBRARIES} boost_system pthread)
target_link_libraries(${PROJECT_NAME}_cloud_surface_smoothing_normal_estimation ${PCL_LIBRARIES})
add_executable(${PROJECT_NAME}_cloud_nurbs_mesh_generation src/pmd_camboard_nano_cloud_nurbs_mesh_generation)
target_link_libraries(${PROJECT_NAME}_cloud_nurbs_mesh_generation ${catkin_LIBRARIES} boost_system pthread)
target_link_libraries(${PROJECT_NAME}_cloud_nurbs_mesh_generation ${PCL_LIBRARIES})
Any ideas why it's so broken?
EDIT: I decide to rebuild everything (custom installs stayed this time). ROS automatically detected and used my custom PCL (nice!) during the build process. This also pointed me in the more or less right direction - OpenCV or to be more precise - my custom build. Upon executing rviz now I get a much clearer message:
rviz: error while loading shared libraries: libopencv_viz.so.2.4: cannot open shared object file: No such file or directory
I have looked for this libopencv_viz but managed to find a small set of posts relating to it but in OpenCV 3.0. It is said that this module (which I've enabled when building my OpenCV - it uses VTK) is supposedly backported to the 2.4.9 branch from 3.0.0 but there seems to be some misplaced headers here and there. During the compilation and linking process of my OpenCV VTK didn't cause any problems. However due to the above mentioned hiccup it seems best to leave it out of my final build.
EDIT2: The error seems not to be coming from libopencv_viz but from the overall location of the libs (that is why it's not a good idea to mix things). I cleaned my system from my custom OpenCV, rebuild it without the VTK support, rebuild all that required OpenCV (including RViz) and I this time I got that
rviz: error while loading shared libraries: libopencv_nonfree.so.2.4: cannot open shared object file: No such file or directory
I remembered that I also had to export my path and after doing that (ldconfig -v
) I got the same invalid pointer error as above. It seems that all this might be coming from all the OpenCV-related packages. I guess I have to download those, modify them and then rebuild. Christ, building ROS from source even with little tweaks is such a tedious work...
Originally posted by rbaleksandar on ROS Answers with karma: 299 on 2015-09-16
Post score: 1