Open minghongss opened 2 years ago
mkdir -p catkin_ws_cv_bridge/src cd catkin_ws_cv_bridge/src git clone https://github.com/ros-perception/vision_opencv.git cd catkin_ws_cv_bridge catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so catkin config --install catkin_make
cd catkin_ws_pytorch_yolov5 catkin_make Why don't I use your way catkin build? reason:
I remember I had tried the newest version of cv_bridge and it didn't support python3.6. So I find if I checkout to version 1.13 it works. So try the previous version. And did you source the cv_bridge envoriment?
cd catkin_ws_cv_bridge
# using --extend to avoid replace previous source
source install/setup.bash --extend
To be honest, I recommend you use Ubuntu20 with ROS Noetic to avoid building cv_bridge.
mkdir -p catkin_ws_cv_bridge/src cd catkin_ws_cv_bridge/src git clone https://github.com/ros-perception/vision_opencv.git cd vision_opencv
git checkout 1.13.0 cd .. catkin init
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
catkin config --install catkin build
I have some problem in catkin build
[build] Found '4' packages in 0.0 seconds.
Warning: generated devel space setup files have been deleted.
Starting >>> catkin_tools_prebuild
Warnings << catkin_tools_prebuild:cmake /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/logs/catkin_tools_prebuild/build.cmake.000.log CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
cd /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/build/catkin_tools_prebuild; catkin build --get-env catkin_tools_prebuild | catkin env -si /usr/local/bin/cmake /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/build/catkin_tools_prebuild --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/devel/.private/catkin_tools_prebuild -DCMAKE_INSTALL_PREFIX=/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/install -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so; cd -
............................................................................................................................................
Finished <<< catkin_tools_prebuild [ 1.7 seconds ]
Starting >>> cv_bridge
Starting >>> image_geometry
Errors << image_geometry:cmake /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/logs/image_geometry/build.cmake.000.log
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find CUDA: Found unsuitable version "10.2", but required is exact version "9.0" (found /usr/local/cuda-10.2) Call Stack (most recent call first): /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.20/Modules/FindCUDA.cmake:1264 (find_package_handle_standard_args) /usr/local/share/OpenCV/OpenCVConfig.cmake:45 (find_package) /usr/local/share/OpenCV/OpenCVConfig.cmake:241 (find_host_package) CMakeLists.txt:5 (find_package)
cd /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/build/image_geometry; catkin build --get-env image_geometry | catkin env -si /usr/local/bin/cmake /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/image_geometry --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/devel/.private/image_geometry -DCMAKE_INSTALL_PREFIX=/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/install -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so; cd -
............................................................................................................................................
Failed << image_geometry:cmake [ Exited with code 1 ]
Failed <<< image_geometry [ 0.9 seconds ]
Abandoned <<< opencv_tests [ Unrelated job failed ]
Warnings << cv_bridge:cmake /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/logs/cv_bridge/build.cmake.000.log
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
cd /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/build/cv_bridge; catkin build --get-env cv_bridge | catkin env -si /usr/local/bin/cmake /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/devel/.private/cv_bridge -DCMAKE_INSTALL_PREFIX=/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/install -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so; cd - ............................................................................................................................................
Warnings << cv_bridge:make /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/logs/cv_bridge/build.make.000.log
In file included from /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge/src/module.cpp:35:0:
/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge/src/module.hpp: In function ‘int do_numpy_import()’:
/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge/src/module.hpp:39:5: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
import_array( );
^~~~
In file included from /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge/src/module_opencv3.cpp:3:0:
/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge/src/module.hpp: In function ‘int do_numpy_import()’:
/home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/src/vision_opencv/cv_bridge/src/module.hpp:39:5: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
import_array( );
^~~~
cd /home/hongss/Desktop/deep_learning/catkin_ws_cv_bridge/build/cv_bridge; catkin build --get-env cv_bridge | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
............................................................................................................................................
Finished <<< cv_bridge [ 9.5 seconds ]
[build] Summary: 2 of 4 packages succeeded.
[build] Ignored: 1 packages were skipped or are blacklisted.
[build] Warnings: 2 packages succeeded with warnings.
[build] Abandoned: 1 packages were abandoned.
[build] Failed: 1 packages failed.
[build] Runtime: 11.5 seconds total.
I have switched CUDA version. But still report the same errors
Sorry that I don't have much experience with these version incompatibilities problem. But I think you can use cv_bridge of CPU verision. In this repo, cv_bridge only be used in the conversion from imgmsg to opencv img: self.cv_image = self.bridge.imgmsg_to_cv2(data, "rgb8")
It won't cost too much time. And just installed the gpu version of Pytorch is fast enough.