久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Ubuntu 22.04源碼編譯安裝ROS Noetic_源碼編譯ros

 netouch 2023-08-19 發(fā)布于北京

ROS1對Ubuntu的支持只到20.04,,如果要在22.04上安裝ROS1只能從源碼編譯安裝,。

1. 添加源

由于ROS1官網(wǎng)不支持,,因此只能添加ROS2的源

  1. $ sudo apt update && sudo apt install curl
  2. $ sudo curl -sSL https://raw./ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
  3. $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages./ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
  4. $ sudo apt update

2. 安裝編譯依賴項

  1. $ sudo apt-get install python3-rosdep python3-rosinstall-generator python3-vcstools python3-vcstool build-essential
  2. $ sudo pip3 install -U rosdep rosinstall_generator vcstool
  3. $ sudo pip3 install --upgrade setuptools

3. rosdep安裝依賴,,這一步不用折騰國內(nèi)怎么訪問GitHub的問題了,,因為ROS1官網(wǎng)不支持Ubuntu22.04,,所以每個依賴項的手動安裝,。

4. 新建catkin workspace

  1. $ mkdir ~/ros_catkin_ws
  2. $ cd ~/ros_catkin_ws

5. 拉取ROS Noetic源碼

  1. $ rosinstall_generator desktop --rosdistro noetic --deps --tar > noetic-desktop.rosinstall
  2. $ mkdir ./src
  3. $ vcs import --input noetic-desktop.rosinstall ./src

`vcs import` 這一步因為墻的原因大概率會失?。╰erminal中打印EEEE,,成功會打印....), 直接替換noetic-desktop.rosinstall中所有的github.com為kgithub.com,,然后再次執(zhí)行

$ vcs import --input noetic-desktop.rosinstall ./src

6. 手動安裝ROS Noetic依賴項

$ sudo apt install libboost-all-dev uuid-dev python3-nose google-mock libgtest-dev libbz2-dev libgpgme-dev libssl-dev python3-coverage libboost-program-options-dev python3-psutil python3-opengl python3-pygraphviz python3-pydot qt5-qmake sbcl libapr1-dev libaprutil1-dev libboost-regex-dev liblog4cxx-dev python3-matplotlib libpyside2-dev libshiboken2-dev pyqt5-dev python3-pyqt5 python3-pyqt5.qtsvg python3-pyside2.qtsvg python3-sip-dev shiboken2 lm-sensors graphviz python3-paramiko python3-pycryptodome python3-gnupg python3-defusedxml python3-pyqt5.qtopengl libcurl4-openssl-dev libpoco-dev libogre-1.9-dev libassimp-dev libogre-1.9.0v5 libyaml-cpp-dev libgl1-mesa-dev libglu1-mesa-dev libqt5opengl5 libqt5opengl5-dev libopencv-dev python3-opencv python3-pykdl tango-icon-theme liborocos-kdl-dev libtinyxml-dev libtinyxml2-dev liburdfdom-headers-dev python3-numpy python3-empy libboost-filesystem-dev libboost-thread-dev python3-pygraphviz python3-pygraphviz python3-mock libboost-date-time-dev libboost-system-dev liburdfdom-dev libboost-chrono-dev libboost-dev libqt5core5a libqt5gui5 libqt5widgets5 qtbase5-dev  libconsole-bridge-dev liblz4-dev python3-pyqt5.qtwebkit exfatprogs

 7. 編譯

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

可能仍會有以下問題

  • rosconsole
  1. Errors << rosconsole:make /home/youliang/ros_ws/build/catkin_ws/logs/rosconsole/build.make.002.log
  2. /home/youliang/ros_ws/build/catkin_ws/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp: In function 'void ros::console::impl::initialize()’:
  3. /home/youliang/ros_ws/build/catkin_ws/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:169:23: error: cannot convert 'ros::console::impl::ROSConsoleStdioAppender*’ to 'log4cxx::AppenderPtr’ {aka 'std::shared_ptr<log4cxx::Appender>’}
  4. 169 | logger->addAppender(new ROSConsoleStdioAppender);
  5. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. | |
  7. | ros::console::impl::ROSConsoleStdioAppender*
  8. In file included from /usr/include/log4cxx/spi/loggingevent.h:28,
  9. from /usr/include/log4cxx/layout.h:29,
  10. from /usr/include/log4cxx/appenderskeleton.h:28,
  11. from /home/youliang/ros_ws/build/catkin_ws/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:42:
  12. /usr/include/log4cxx/logger.h:144:60: note: initializing argument 1 of 'virtual void log4cxx::Logger::addAppender(log4cxx::AppenderPtr)’
  13. 144 | virtual void addAppender(const AppenderPtr newAppender);
  14. | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
  15. /home/youliang/ros_ws/build/catkin_ws/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp: In function 'void* ros::console::impl::getHandle(const string&)’:
  16. /home/youliang/ros_ws/build/catkin_ws/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:203:36: error: cannot convert 'log4cxx::LoggerPtr’ {aka 'std::shared_ptr<log4cxx::Logger>’} to 'void*’ in return
  17. 203 | return log4cxx::Logger::getLogger(name);
  18. | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
  19. | |

 從GitHub - lucasw/rosconsole拉取rosconsole的源碼,,切到concise_output_roso分支,覆蓋到

~/ros_catkin_ws/src下,。

  • shared_mutex的問題
  1. make[2]: *** [CMakeFiles/tf.dir/build.make:118: CMakeFiles/tf.dir/src/transform_listener.cpp.o] Error 1
  2. In file included from /usr/include/log4cxx/log4cxx.h:45,
  3. from /usr/include/log4cxx/logstring.h:28,
  4. from /usr/include/log4cxx/level.h:22,
  5. from /opt/ros/noetic/include/ros/console.h:46,
  6. from /opt/ros/noetic/include/ros/ros.h:40,
  7. from /tmp/makepkg/ros-noetic-tf/src/geometry-1.13.2/tf/src/transform_broadcaster.cpp:34:
  8. /usr/include/log4cxx/boost-std-configuration.h:10:18: error: 'shared_mutex’ in namespace 'std’ does not name a type
  9. 10 | typedef std::shared_mutex shared_mutex;
  10. | ^~~~~~~~~~~~
  11. /usr/include/log4cxx/boost-std-configuration.h:10:13: note: 'std::shared_mutex’ is only available from C++17 onwards
  12. 10 | typedef std::shared_mutex shared_mutex;
  13. | ^~~
  14. /usr/include/log4cxx/boost-std-configuration.h:12:30: error: 'shared_lock’ in namespace 'std’ does not name a template type
  15. 12 | using shared_lock = std::shared_lock<T>;
  16. | ^~~~~~~~~~~
  17. /usr/include/log4cxx/boost-std-configuration.h:12:25: note: 'std::shared_lock’ is only available from C++14 onwards
  18. 12 | using shared_lock = std::shared_lock<T>;
  19. | ^~~
  20. In file included from /opt/ros/noetic/include/ros/console.h:46,
  21. from /opt/ros/noetic/include/ros/ros.h:40,
  22. from /tmp/makepkg/ros-noetic-tf/src/geometry-1.13.2/tf/src/transform_broadcaster.cpp:34:
  23. /usr/include/log4cxx/level.h:283:29: error: 'mutex’ in namespace 'std’ does not name a type
  24. 283 | static std::mutex initMutex;
  25. | ^~~~~
  26. /usr/include/log4cxx/level.h:25:1: note: 'std::mutex’ is defined in header '<mutex>’; did you forget to '#include <mutex>’?
  27. 24 | #include <log4cxx/helpers/object.h>
  28. +++ |+#include <mutex>
  29. 25 |

解決方案:

修改/usr/include/log4cxx/boost-std-configuration.h中的

  1. #define STD_SHARED_MUTEX_FOUND 1
  2. #define Boost_SHARED_MUTEX_FOUND 0

 為

  1. #define STD_SHARED_MUTEX_FOUND 0
  2. #define Boost_SHARED_MUTEX_FOUND 1

再有其他問題自行Google解決,。

 7. 最后source環(huán)境變量愉快使用ROS Noetic吧~

$ source ~/ros_catkin_ws/install_isolated/setup.bash

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,,謹防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多