Robotics StackExchange | Archived questions

Error running catkin_make with DJI_SDK_READ_CAM package

Hello everyone,

I'm trying to acquire the video capturing from zenmuse X3 in the DJI Matrice 100 drone through the Manifold embedded computer. DJI has a couple of demo packages and one of them does the video capturing through ROS. I've followed all the steps here https://developer.dji.com/onboard-sdk/documentation/github-platform-docs/ROS_Example/ros_video_decoding_package.html, but when I do catkin_make this is what happens:

ubuntu@tegra-ubuntu:~/catkinws$ catkinmake --pkg djisdkreadcam Base path: /home/ubuntu/catkinws Source space: /home/ubuntu/catkinws/src Build space: /home/ubuntu/catkinws/build Devel space: /home/ubuntu/catkinws/devel Install space: /home/ubuntu/catkinws/install

Running command: "make cmakecheckbuildsystem" in "/home/ubuntu/catkinws/build"

Running command: "make -j2 -l2" in "/home/ubuntu/catkinws/build/djisdkreadcam"

Building CXX object djisdkreadcam/CMakeFiles/djisdkreadcam.dir/src/nvcam.cpp.o /home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp: In function 'int main(int, char**)': /home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp:230:118: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] caminfo.K = {388.40923066779754, 0.0, 318.06257844065226, 0.0, 518.1538449374815, 241.17339016626644, 0.0, 0.0, 1.0};

/home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp:230:13: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] caminfo.K = {388.40923066779754, 0.0, 318.06257844065226, 0.0, 518.1538449374815, 241.17339016626644, 0.0, 0.0, 1.0};

/home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp:231:59: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] caminfo.R = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0};

/home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp:231:13: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] caminfo.R = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0};

/home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp:232:131: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] caminfo.P = {373.5429992675781, 0.0, 317.51131336952494, 0.0, 0.0, 504.4360656738281, 240.6131009245937, 0.0, 0.0, 0.0, 1.0, 0.0};

/home/ubuntu/catkinws/src/djisdkreadcam/src/nvcam.cpp:232:13: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] caminfo.P = {373.5429992675781, 0.0, 317.51131336952494, 0.0, 0.0, 504.4360656738281, 240.6131009245937, 0.0, 0.0, 0.0, 1.0, 0.0};

/home/ubuntu/catkinws/src/djisdkreadcam/src/nv_cam.cpp:272:14: error: no match for 'operator=' (operand types are 'cv::Mat' and 'IplImage* {aka _IplImage*}') cvi.image = pImg;

/home/ubuntu/catkinws/src/djisdkreadcam/src/nv_cam.cpp:272:14: note: candidates are:

In file included from /usr/local/include/opencv2/core/mat.hpp:3440:0,

             from /usr/local/include/opencv2/core.hpp:59,
             from /usr/local/include/opencv2/core/core.hpp:48,
             from /opt/ros/indigo/include/cv_bridge/cv_bridge.h:43,
             from /home/ubuntu/catkin_ws/src/dji_sdk_read_cam/src/nv_cam.cpp:3:

/usr/local/include/opencv2/core/mat.inl.hpp:575:6: note: cv::Mat& cv::Mat::operator=(const cv::Mat&) Mat& Mat::operator = (const Mat& m)

/usr/local/include/opencv2/core/mat.inl.hpp:575:6: note: no known conversion for argument 1 from 'IplImage* {aka _IplImage*}' to 'const cv::Mat&' /usr/local/include/opencv2/core/mat.inl.hpp:3055:6: note: cv::Mat& cv::Mat::operator=(const cv::MatExpr&) Mat& Mat::operator = (const MatExpr& e)

/usr/local/include/opencv2/core/mat.inl.hpp:3055:6: note: no known conversion for argument 1 from 'IplImage* {aka _IplImage*}' to 'const cv::MatExpr&'

In file included from /usr/local/include/opencv2/core.hpp:59:0,

             from /usr/local/include/opencv2/core/core.hpp:48,
             from /opt/ros/indigo/include/cv_bridge/cv_bridge.h:43,
             from /home/ubuntu/catkin_ws/src/dji_sdk_read_cam/src/nv_cam.cpp:3:

/usr/local/include/opencv2/core/mat.hpp:1113:10: note: cv::Mat& cv::Mat::operator=(const Scalar&) Mat& operator = (const Scalar& s);

/usr/local/include/opencv2/core/mat.hpp:1113:10: note: no known conversion for argument 1 from 'IplImage* {aka IplImage*}' to 'const Scalar& {aka const cv::Scalar&}'

make[2]: *** [djisdkreadcam/CMakeFiles/djisdkreadcam.dir/src/nv_cam.cpp.o] Error 1

make[1]: *** [djisdkreadcam/CMakeFiles/djisdkreadcam.dir/all] Error 2

make: *** [all] Error 2

Invoking "make -j2 -l2" failed

So I've checked all the dependencies of this package and I got this:

root@tegra-ubuntu:~/catkin_ws# rosdep check dji_sdk_read_cam
All system dependencies have been satisified
ERROR[dji_sdk_read_cam]: Cannot locate rosdep definition for [opencv2]
    rosdep key : opencv2
    OS name    : ubuntu
    OS version : trusty
    Data: <no data>
root@tegra-ubuntu:~/catkin_ws# 

Since opencv2 dependency is commented in CMakeLists.txt, it isn't used in this package, but I think there is something conflicting with cvbridge and imagetransport dependencies. Please could some one help me:

Best regards.

Asked by Italo on 2016-08-01 09:49:29 UTC

Comments

Answers