Ubuntu16.04安装ROS2
来源:互联网 发布:剑灵灵女捏脸数据图表 编辑:程序博客网 时间:2024/05/21 20:28
设置Source
安装秘钥:
sudo apt-get update && sudo apt-get install curlcurl http://repo.ros2.org/repos.key | sudo apt-key add -
添加权限:
sudo sh -c 'echo "deb http://repo.ros2.org/ubuntu/main xenial main" > /etc/apt/sources.list.d/ros2-latest.list'
安装ROS2包:
这个安装不包括和ROS1的链接包以及Turtlebot2功能包(因为需要提前安装ROS1 Kinetichttp://wiki.ros.org/Installation/Ubuntu?distro=kinetic版本)如果已经安装Kinectic版本这么安装也可以,最后再安装这两个功能包
sudo apt update sudo apt install `apt list ros-ardent-* 2> /dev/null | grep "/" | awk -F/ '{print $1}' | grep -v -e ros-ardent-ros1-bridge -e ros-ardent-turtlebot2- | tr "\n" " "`
环境设置:
source /opt/ros/ardent/setup.bash
如果已经安装了Python可以直接用:
source /opt/ros/ardent/share/ros2cli/environment/ros2-argcomplete.bash
安装后,如果需要链接ROS1可以安装ros1bridgehttps://github.com/ros2/ros1_bridge/blob/master/README.md#build-the-bridge-from-source功能包,需要用到Turtlebot2安装turtlebot2的功能包:
sudo apt-get updatesudo apt-get install ros-ardent-ros1-bridge#链接ROS1的bridge功能包sudo apt-get install ros-ardent-turtlebot2-*#turtlebot2相关功能包
注意:
如果你将source /opt/ros/ardent/setup.bash或source /opt/ros/ardent/share/ros2cli/environment/ros2-argcomplete.bash也放入.bashrc文件中,将会和ROS1冲突,如果运行ROS1需要手动运行source /opt/ros/kinetic/setup.bash命令。
当安装结束后,可以应用
#打开一个新的终端. ~/ros2_ws/install/local_setup.bashros2 run demo_nodes_cpp talker#打开一个新的终端. ~/ros2_ws/install/local_setup.bashros2 run demo_nodes_py listener
测试是否安装成功。
测试是否与ROS1链接成功可以使用https://github.com/ros2/ros1_bridge/blob/master/README.md#example-1-run-the-bridge-and-the-example-talker-and-listener进行测试。
由于能力问题,本人使用的Building from source方式没有安装成功。所以只提供这一种安装成功的方法。如果大家有兴趣可以链接[4]中使用Building from source方法安装。
参考网站:
[1]https://github.com/ros2/ros2/wiki/Linux-Install-Debians#setup-sources
[2]https://github.com/ros2/ros1_bridge/blob/master/README.md#build-the-bridge-from-source
[3]http://www.guyuehome.com/823
[4]https://github.com/ros2/ros2/wiki/Installation
- Ubuntu16.04安装ROS2
- Windows10下ROS2安装体验
- Ubuntu ROS2.0安装使用教程
- Ubuntu16.04安装chrome
- Ubuntu16.04安装Atom
- ubuntu16.04安装KDE
- ubuntu16.04安装Oracle_linux_x64_11gR2
- ubuntu16.04 安装 eclipse
- Ubuntu16.04kylin 安装
- Ubuntu16.04安装JDK7
- Ubuntu16.04安装phpmyadmin
- ubuntu16.04安装atom
- ubuntu16.04安装oracle11g
- Ubuntu16.04桌面版安装
- ubuntu16.04安装caffe
- Ubuntu16.04安装Samba
- ubuntu16.04安装Ulipad
- ubuntu16.04安装chrome
- 一起Talk Android吧(第五十二回:Android中的Fragment交互续)
- 【java】--后台实现打印
- JavaScript 谷歌地图demo
- HDU1548A strange lift(BFS)
- C语言实现简易三子棋小游戏
- Ubuntu16.04安装ROS2
- NOIP2017普及组T1成绩
- 我的书单
- 关于指针的小知识
- 隐式Intent
- 基于51单片机的计算器(代码篇)
- 实用全面的 C++ 学习资源
- Java 设计模式小解
- 中国剩余定理