When I run the stock voxl_mpa_to_ros node on the VOXL2 and subscribe to the topic for stereo_disparity, the stereo interface throws the following error
Stereo interface received non-stereo frame, exiting stereo
I checked out the code and noticed that the problem is here in the stereo_interface.cpp at line 111
if(meta.format != IMAGE_FORMAT_STEREO_RAW8){
printf("Stereo interface received non-stereo frame, exiting stereo\n");
interface->StopPublishing();
interface->StopAdvertising();
}
I added a printf to see what format is being received using a printf statement and it is an integer with value 0 or IMAGE_FORMAT_RAW8
got format 0
So i modified the node to be the following
if(meta.format != IMAGE_FORMAT_STEREO_RAW8){// && meta.format != IMAGE_FORMAT_RAW8){
printf("Stereo interface received non-stereo frame, exiting stereo\n");
printf("got format %d\n", meta.format);
interface->StopPublishing();
interface->StopAdvertising();
}
The node crashes once more and this time, without any error. When running with GDB i see that it crashes at line 152, which is
memcpy(&(imgR.data[0]), &frame[dataSize], dataSize)
Commenting this line allows the node to work, but now i cant access the right stereo images via ROS
I am running system image 1.5.5-M0054-14.1a-perf with voxl-suite: 0.9.5
Seems like there should be a quick fix for this, can someone help me out here ?