OpenCV incompatibility with SDK 2.10

Hello everyone

I’m working in a research project using one Astra Embedded S, I’ll be happy if I can receive some help about some compatibility issues we are having with the Astra SDK.

We are currently using the Astra Embedded S for body tracking purposes. Our system is a ROS based robot. The problem has come when we tried to migrate from Ubuntu 16.04 with ROS Kinetic and OpenCV 2 to Ubuntu 18.04 with ROS Melodic and OpenCV 3.2.We are using the latest version of the astra SDK the 2.10 version and the C++ API.

The issue is an apparent incompatibility between the Astra SDK and OpenCV 3.2, but we are not sure. The samples that come with the Astra SDK works fine all of them. The problem arises when we try to use together OpenCV 3.2 and the Astra SDK 2.10 in the same ROS Node / Class. We’ve found that the fact of only adding the OpenCV libraries to the #include produces an error at execution time. We didn’t have this problem before, using OpenCV 2 with Ubuntu 16.04. We are using CMake to compile our projects with C++14 standard.

If we add to one project (without instantiating anything from OpenCV in the source code)

#include <opencv2/opencv.h>

And the corresponding CMake flags to our CMakeLists.txt to properly compile it

find_package(OpenCV 3.2 REQUIRED)

And

target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${ASTRA_LIBRARIES} ${OpenCV_LIBS})
target_include_directories(${PROJECT_NAME}_node PUBLIC ${catkin_INCLUDE_DIRS} ${ASTRA_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})

The compiler build and link the application without any problem. The problem appears in execution time, the application crashes because an exception arises from the function astra::initialize(). This is the error we got:

OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in getMat_, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/matrix.cpp, line 1289
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/matrix.cpp:1289: error: (-213) Unknown/unsupported array type in function getMat_

Is it possible that we are not properly building our nodes, or maybe it’s a known issue? If you need more detailed information we can provide it as soon as you want .We’d appreciate any help from you, thank you very much.

matrix.cpp:1289: error: (-213) Unknown/unsupported array type in function getMat_

Where are you using this function in your code and how are you using it? maybe thats the issue? thats what i can tell from the error.
I work with Windows.

Hi emaccheese,

The problem is that this error arises withouth using any opencv function, only including the opencv generic header. And this happen only when I build the node with the Astra libs and the opencv libs.

Hi my friend,

This problem is cause by different opencv versions. Actually in the SDK opencv was used. You can check it in:

SDK_PATH/lib/Plugins/obt/3rdparty/lib/

in 2.0.19 SDK, opencv 2.4.8 is used. I just installed opencv 2.4.8 then I can substitute SFML with opencv in the samples. It works in both Linux and Windows.

Hope this can helps you.

Best Regard

Guo

1 Like