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

a grammar error while installing "vision_opencv"

asked 2013-11-11 22:31:54 -0600

doudoushuixiu gravatar image

i use catkin & wstool to install the package: vision_opencv.

but there is some errors while i use catkin_make command.i haven't changed anything in the vision_opencv file downloaded form github. this is the output in the Terminal.

/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp: In function ‘boost::python::api::object cvtColor2Wrap(boost::python::api::object, const string&, const string&)’:
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:329:12: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:331:13: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:333:13: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:335:13: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:337:13: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:339:13: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
/home/shuixiu/catkin_ws/src/vision_opencv/cv_bridge/src/module.cpp:341:13: error: invalid conversion from ‘long int*’ to ‘npy_intp* {aka int*}’ [-fpermissive]
make[2]: *** [vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge_boost.dir/module.cpp.o] Error 1
make[1]: *** [vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge_boost.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-11-17 05:08:51 -0600

ccostes gravatar image

I came across this error as well when trying to compile the vision_opencv package. The fix is on line 325 where it defines the 'dims' variable as a lont int.

long int dims[] = {mat.rows, mat.cols, mat.channels()};

Change that to an int so it reads

int dims[] = {mat.rows, mat.cols, mat.channels()};

and it should compile without issue.

edit flag offensive delete link more

Comments

1

Please report that kind of bug upstream if that happens. That is now fixed in vision_opencv 1.10.13. (Numpy 1.x has a different API between Ubuntu releases apparently)

Vincent Rabaud gravatar image Vincent Rabaud  ( 2013-11-22 20:26:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-11-11 22:31:54 -0600

Seen: 428 times

Last updated: Nov 17 '13