Turbot3-omni入门教程-PC安装
说明
- 介绍如何在PC上安装相关系统和软件。
- 测试的系统版本是Ubuntu 16.04.1, ROS版本是Kinetic Kame
安装Ubuntu
在远程PC(台式机或笔记本电脑)中安装
系统版本Ubuntu 16.04.1:
脚本安装ROS-kinetic:
$ wget https://raw.githubusercontent.com/oroca/oroca-ros-pkg/kinetic/ros_install.sh && chmod 755 ./ros_install.sh && bash ./ros_install.sh catkin_ws kinetic
- 如果不能顺利安装,可以参考源码安装方式
源码安装ROS-kinetic:
- 安装源
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- 或来自中国的源:
$ sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
- 增加key
$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
- 更新
$ sudo apt-get update
- 安装,这里介绍Desktop-Full安装: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
$ sudo apt-get install ros-kinetic-desktop-full
- 解决依赖
$ sudo rosdep init
$ rosdep update
- 环境设置
$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
7.安装rosinstall,便利的工具
$ sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
安装TurtleBot3及依赖包:
- 安装turtlebot3依赖包:
$ sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markers
- 安装turtlebot3源码
$ mkdir -p ~/catkin_ws/src/ && cd ~/catkin_ws/src/
$ git -b kinetic-devel clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git -b kinetic-devel clone https://github.com/ROBOTIS-GIT/turtlebot3.git
$ cd ~/catkin_ws && catkin_make
- 添加模型声明
$ echo "export TURTLEBOT3_MODEL=burger" >> ~/.bashrc
- 环境设置
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
- 如果catkin_make完成没有任何错误,使用TurtleBot3的准备将完成。
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号