Giter Club home page Giter Club logo

jincheng-ai / ros-melodic-python3-opencv4 Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 16.94 MB

a quick version for build ros melodic with ubuntu 18.04, opencv 4 and python 3

CMake 3.42% C++ 63.16% C 0.98% Python 29.50% EmberScript 0.26% Shell 0.22% Makefile 0.15% Batchfile 0.06% Elixir 0.01% Roff 0.01% TeX 0.21% MATLAB 0.01% Awk 0.01% Common Lisp 1.49% HTML 0.23% CSS 0.01% GLSL 0.06% SWIG 0.01% Perl 0.15% NASL 0.09%
ros-melodic ubuntu1804 opencv4 python3 desktop-full

ros-melodic-python3-opencv4's Introduction

ros-melodic-python3-opencv4

this is a desktop-full ros on melodic version compiled with python3 and opencv 4

offical wiki

Installing bootstrap dependencies

sudo apt install python3-rosdep python3-rosdistro python3-rosinstall-generator python3-vcstool python3-rosinstall build-essential

for python_orocos_kdl

sudo apt install python3-sip-dev

install source

create a catkin workspace

mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws

install with rosinstall_generator and vcs

rosinstall_generator desktop_full --rosdistro melodic --deps --tar > melodic-desktop-full.rosinstall
mkdir src
vcs import src < melodic-desktop-full.rosinstall

resolving dependencies

rosdep install --from-paths src --ignore-src --rosdistro melodic -y

some python-ros* packages should be installed such as python-rospkg. I don't konw why and what the impact will be.

building the catkin workspace

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python

Q&A

qt_gui_cpp

sip: Usage: sip [-h] [-V] [-a file] [-b file] [-B tag] [-c dir] [-d file] [-D] [-e] [-f] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-P] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-X id:file] [-y file] [-z file] [@file] [file]

the cmd is

/usr/bin/sip -c /home/shuyuanhao/ros_catkin_ws/build_isolated/qt_gui_cpp/sip/qt_gui_cpp_sip -b /home/shuyuanhao/ros_catkin_ws/build_isolated/qt_gui_cpp/sip/qt_gui_cpp_sip/pyqtscripting.sbf -I /usr/share/sip/PyQt5 -w -n PyQt5.sip -t Qt_5_9_5 -t WS_X11 -x PyQt_WebChannel -x PyQt_Desktop_OpenGL qt_gui_cpp.sip

change sip_flags in ros_catkin_ws/src/python_qt_binding/cmake/sip_configure.py as

sip_flags = sip_flags.replace('-n PyQt5.sip ', '')
print(sip_flags)
cmd += sip_flags.split(' ')
cmd.append(sip_file)
print(cmd)
subprocess.check_call(cmd)

cv_bridge adapt to opencv 4

change CMakeLists.txt, use ubuntu 18.04 defualt opencv 4.1.1

#find_package(OpenCV 3 REQUIRED
#  COMPONENTS
#    opencv_core
#    opencv_imgproc
#    opencv_imgcodecs
#  CONFIG
#)
# set(OpenCV_DIR "/home/shuyuanhao/opencvlib/4.5.2/share/opencv4/")
find_package(OpenCV 4 REQUIRED
  COMPONENTS
    opencv_core
    opencv_imgproc
    opencv_imgcodecs
  CONFIG
)

image_publisher adapt to opencv 4

see offical code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.