Last active
July 10, 2022 17:44
-
-
Save jwpleow/13622252aedb58afd6b7ce39e23d2310 to your computer and use it in GitHub Desktop.
Try installing ROS noetic from source, using vcpkg's opencv, pcl, boost, etc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo pip3 install --upgrade setuptools | |
| sudo pip3 install -U rosdep rosinstall_generator vcstool | |
| # BEFORE INSTALLING VCPKG PCL | |
| # https://github.com/microsoft/vcpkg/pull/18855#issuecomment-961480058 | |
| # maybe | |
| # sudo apt-get install python3-rosdep python3-rosinstall-generator python3-vcstool build-essential | |
| mkdir ~/ros_catkin_ws | |
| cd ~/ros_catkin_ws | |
| rosinstall_generator ros_core tf2_ros tf2_geometry_msgs pcl_ros cv_bridge eigen_conversions tf_conversions image_transport camera_info_manager message_filters grid_map_core grid_map_ros --rosdistro noetic --deps --tar > noetic-custom_ros.rosinstall | |
| mkdir src | |
| vcs import --input noetic-custom_ros.rosinstall ./src | |
| # DONT Install system dependencies (as you pull boost, opencv etc) | |
| # rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y | |
| # Install dependencies | |
| vcpkg install console-bridge bzip2 | |
| sudo apt install libpoco-dev libtinyxml2-dev liblog4cxx-dev liblz4-dev libgpgme-dev libgmock-dev liborocos-kdl-dev libyaml-cpp-dev | |
| ## setting the toolchain to vcpkg seems to break catkin finding dependencies | |
| export CMAKE_PREFIX_PATH=/home/joel/vcpkg/installed/x64-linux/share:$CMAKE_PREFIX_PATH | |
| export LD_LIBRARY_PATH=/home/joel/vcpkg/installed/x64-linux/lib:$LD_LIBRARY_PATH | |
| export BOOST_ROOT=/home/joel/vcpkg/installed/x64-linux/ | |
| export BOOST_INCLUDEDIR=/home/joel/vcpkg/installed/x64-linux/include | |
| export BOOST_LIBRARYDIR=/home/joel/vcpkg/installed/x64-linux/lib | |
| # not sure if you need this (nope you dont) | |
| export TinyXML2_LIBRARY=/usr/lib/x86_64-linux-gnu/libtinyxml.a | |
| export TinyXML2_INCLUDE_DIR=/usr/include/ | |
| # go to src/ros_comm, in rosbag_storage/ and rosbag/'s CMakeLists.txt , before bzip | |
| set(BZIP2_LIBRARIES /home/joel/vcpkg/installed/x64-linux/lib/libbz2.a) | |
| set(BZIP2_INCLUDE_DIR /home/joel/vcpkg/installed/x64-linux/include) | |
| # go to src/vision_opencv/cv_bridge/CMakeLists.txt | |
| # remove the 37 in find_package(Boost REQUIRED python37) and set your own vcpkg's lib version (eg mine is python310) | |
| # Same in src/image_common/camera_calibration_parsers | |
| ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DSETUPTOOLS_DEB_LAYOUT=OFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment