赞
踩
参考链接:
https://blog.csdn.net/zyh821351004/article/details/135523056
https://gist.github.com/Meltwin/fe2c15a5d7e6a8795911907f627255e0
瞎折腾才到这一步的,网络环境自己搞定
deb http://packages.ros.org/ros/ubuntu focal main
sudo apt-get install python3-rosdep python3-rosinstall-generator python3-vcstools python3-vcstool build-essential
- # os-specific listings first
- yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
-
- # generic
- #yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
- yaml https://gist.githubusercontent.com/Meltwin/0317ae7481c94da7fd66c3eea8d40740/raw/04f6404249b0430523671410891815e63eadb2fe/base.yaml
- yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
- yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
- gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
-
- # newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
- mkdir ./noetic_ws
- cd ./noetic_ws
- rosinstall_generator desktop --rosdistro noetic --deps --tar > noetic-desktop.rosinstall
- mkdir ./src
- vcs import --input noetic-desktop.rosinstall ./src
- rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y
./src/catkin/bin/catkin_make_isolated -DCMAKE_BUILD_TYPE=Release
1、可能会遇到的错误与 rosconsole 和 log4cxx 相关:
打开src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp并将其内容替换为https://raw.githubusercontent.com/ros/rosconsole/9f930c007dd40aa7ede771b8859b529e024d7bfb/src/rosconsole/impl/rosconsole_log4cxx.cpp
2、可能遇到的错误是 C++ 编译版本。当包想要使用 C++11 编译并使用 C++17 中的对象时,就会出现问题,从下方链接下载脚本后执行 python3 change_cpp.py即可(在noetic_ws目录下)
3、期间编译中断基本都是缺少库的问题,按需下载即可,可以提前下载一些,分享一下我遇到的:
- #参考链接里面的安装
- sudo apt install libopencv-dev
- sudo apt install libassimp-dev python3-pyassimp
- sudo apt install libogre-1.12-dev
- sudo apt install libogre1.12.10
- sudo apt install libqt5widgets5 qtcreator qtbase5-dev qt5-qmake cmake
- sudo apt install sip-dev python3-sip-dev python3-pyqt5.sip
- sudo apt install python3-pyqt5.sip python3-pyqt5 pyqt5-dev
- #我遇到的
- sudo apt-get install libtinyxml-dev
- sudo apt-get install liborocos-kdl-dev
- sudo apt-get install liburdfdom-headers-dev
- sudo apt-get install liburdfdom-dev
- sudo apt-get install libyaml-cpp-dev
- sudo apt-get install libturbojpeg-dev
- sudo apt-get install libogg-dev
- sudo apt-get install libtheora-dev
- sudo apt-get install libpoco-dev
- sudo apt-get install libtinyxml2-dev
- sudo apt-get install liblog4cxx-dev
- sudo apt-get install libbz2-dev
- sudo apt-get install libgpgme-dev
编译完成提示:<== Finished processing package [188 of 188]: 'xacro',我这里显示188是因为加入了一些额外需要编译的ros包,至此,source一下,即可使用了,有什么问题可以留言
补充:rqt_bag 命令不可用,可参考下面链接修改src/rqt_bag/src/rqt_bag/timeline_frame.py,重新编译即可使用https://github.com/ros-visualization/rqt_bag/pull/109/commits/6ba817ed1c09c01ea25f4ce6131f5b88c8b9ace3
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。