ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Triclops library for Bumblebee 2: runtime error on Ubuntu 16.04

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

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 If I remove that shared library, everything works just fine. I make use of FlyCapture SDK and Triclops 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())

And this is my CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)

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

find_package(catkin REQUIRED 



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/ 
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-28 12:01:19 -0600

mjcarroll gravatar image

It's been quite a while since I've worked with triclops, but I seem to recall that it has internal static linkage to a different version of Boost from what ROS and Ubuntu 16.04 uses. You should be able to use the nm command to see if there are conflicting symbols linked in the library.

If that is the case, this ends up being a situation where you are going to have a very difficult time making the library and ROS coexist. You could potentially separate it into two executables, one responsible for communicating with the triclops library, and a second for sending it over ROS, and then using shared memory or named pipes to do the communication between the executables.

Alternatively, you may be able to get a version from PointGrey that doesn't have the static linking, but that's probably a longer shot.

edit flag offensive delete link more


Wow, it's seen so hard for me to make such incredible adaptation. Anyway, I manage to get it working by running the executable on a computer embedded with Intel Core i3-3220. I think the problem can be resolved on Pentium if we make some flexible tuning, taking ISA-specific dissimilarities (optimization flags, etc) into account, in CMakeLists.txt but I haven't tried it yet. Thanks for your contribution!

megoxza gravatar image megoxza  ( 2019-09-04 03:18:36 -0600 )edit

Question Tools



Asked: 2019-08-13 02:21:29 -0600

Seen: 160 times

Last updated: Aug 28 '19