Writing a Simple Image Publisher (C++) tutorial Segmentation Fault
I am running ROS Kinetic full desktop install on Raspberrypi 3b running Debian Jessie. These are fresh installs with nothing else added. I followed the Simple Image Publisher/Subscriber tutorials and can successful compile. When I run my_publisher (c++) I get a Segmentation Fault. If I start up python on the command and do "import cv2" I get a Segmentation Fault. I suspect the two are related. I have all the dependencies, cv_bridge, vision_opencv. I also see cv2.so in /opt/ros/kinetic/lib/python2.7/dist-packages.
I am unclear if I need to install opencv on my own or if it is part of the ROS install. But if it isn't part of the install, why do I have a cv2.so in my ros directory? I have done a complete sd card reformat and fresh install of Jessie and then the ROS desktop install multiple times and I keep getting the same result. I have tried catkin packages and ros-packages. Can anyone give me some pointers?
Any time you run into
SEGFAULT
s, run the binary (preferably a version with debug symbols) ingdb
and after getting theSEGFAULT
, getgdb
to print a backtrace for you (bt
).Please add one of the tutorial C++ node you mentioned.