Triclops library for Bumblebee 2: runtime error on Ubuntu 16.04

asked 2019-08-13 02:21:29 -0500

megoxza gravatar image

I'm trying to run a node which captures stereo images and calculates disparity map from Bumblebee-2-08S2C on Ubuntu 16.04, ROS Kinetic. My code follows the style from there. Everything is compiled fine, but I bump into the runtime error Illegal instruction (core dumped). After eliminating most lines of code, I figure out the issue lies in the libtriclops4.so. If I remove that shared library, everything works just fine. I make use of FlyCapture 2.13.3.31 SDK and Triclops 4.0.3.4 SDK. My mainboard is P5GC-MX/1333, chip Intel Pentium E2160. This is my minimalized code for searching errors:

#include <triclops.h>
#include <fc2triclops.h>

#include <pcl/point_types.h>

#include <ros/ros.h>
#include <pcl_ros/point_cloud.h>
#include <pcl_conversions/pcl_conversions.h>
#include <sensor_msgs/PointCloud2.h>

int main(int argc, char** argv)
{
    ros::init(argc, argv, "generate_pointcloud");
    ros::NodeHandle nh;
    ros::Publisher pub = nh.advertise<sensor_msgs::PointCloud2>("/camera/points2_2", 1);

    ros::Rate loop_rate(10);
    while (ros::ok())
    {
       ROS_INFO("Nothing");
       ros::spinOnce();
       loop_rate.sleep();
    }
}

And this is my CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)
project(pointcloud_generation)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

find_package(catkin REQUIRED 
  COMPONENTS
    roscpp
    sensor_msgs
    pcl_ros
    pcl_conversions
)

catkin_package()

include_directories(${catkin_INCLUDE_DIRS})
include_directories(/usr/include/triclops4)
include_directories(/usr/include/flycapture)

add_executable(generate_pointcloud src/generate_pointcloud.cpp)
target_link_libraries(generate_pointcloud ${catkin_LIBRARIES})
target_link_libraries(generate_pointcloud /usr/lib/x86_64-linux-gnu/libtriclops4.so 
                                          /usr/lib/libflycapture.so
                                          /usr/lib/x86_64-linux-gnu/libflycapture2bridge4.so)
edit retag flag offensive close merge delete