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

Error when installing ROS Kinetic on Raspberry Pi 4 Buster

asked 2020-06-04 11:01:56 -0500

cwmacier gravatar image

updated 2020-06-04 14:49:00 -0500

gvdhoorn gravatar image

Hello,

I am trying to follow the instructions when installing ROS onto my Raspberry Pi 4. I have done this before with the Pi3 multiple times and am following the directions verbatim. When I get to building my Catkin Workspace I follow the directions for Buster and when I go to build it I get an error saying

/home/pi/ros_catkin_ws/src/opencv3/modules/python/src2/cv2.cpp: In function ‘bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]’:
/home/pi/ros_catkin_ws/src/opencv3/modules/python/src2/cv2.cpp:885:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     char* str = PyString_AsString(obj);
                                  ^
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8074: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
<== Failed to process package 'opencv3':

If someone could please help me with fixing this issue that would be great.

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-10-30 02:32:20 -0500

Idiot gravatar image

I had the same problem with Buster, but was able to resolve it by changing the line 855 in ros_catkin_ws/src/opencv3/modules/python/src2/cv2.cpp:

char* str = PyString_AsString(obj);

to

const char* str = PyString_AsString(obj);

Found the answer from: StackOverFlow

This was the first thing that came up in google search so decided to add an answer here too.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-04 11:01:56 -0500

Seen: 255 times

Last updated: Jun 04 '20