ROS2 ubuntu20.04安装

11760阅读 0评论2020-06-16 iibull
分类:其他平台




点击(此处)折叠或打开

  1. 说明: 网络最好有VPN, 否则有些指令执行不成功, 如果没有VPN, 那么多执行几次, 总会OK

  2. sudo apt update && sudo apt install curl gnupg2 lsb-release
  3. curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

  4. sudo sh -c 'echo "deb `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'

  5. sudo apt update
  6. sudo apt install -y python3-rosdep
  7. sudo rosdep init
  8. rosdep update

  9. sudo mkdir -p /ROS2/{tools,foxy,big}; sudo chown iibull:iibull /ROS2 -R

  10. 下载 Binary ROS2: https://github.com/ros2/ros2/releases
  11. cd /ROS2/tools; wget -c https://github.com/ros2/ros2/releases/download/release-foxy-20200605/ros2-foxy-20200605-linux-focal-amd64.tar.bz2;
  12. tar xf ros2-foxy-20200605-linux-focal-amd64.tar.bz2 ../foxy/;

  13. cd ..
  14. rosdep install --from-paths foxy/share --ignore-src --rosdistro foxy -y --skip-keys "console_bridge fastcdr fastrtps osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers"

  15. sudo apt install -y libpython3-dev
  16. sudo apt install python3-argcomplete
  17. sudo apt install ros-foxy-rmw-connext-cpp ros-foxy-rmw-connext-shared-cpp
  18. 验证安装
  19. source /ROS2/foxy/setup.bash
  20. ros2 run demo_nodes_cpp talker
  21. ros2 run demo_nodes_py listener

上一篇:ROS2 Foxy on WIndows
下一篇:ROS2 - tutorials