Home » Turtlebot2i入门教程 » Turtlebot2i入门教程-安装

Turtlebot2i入门教程-安装

Turtlebot2i入门教程-安装

说明:

  • 介绍Turtlebot2i的系统和软件安装

步骤:

安装GTK:

sudo apt-get install build-essential libgtk-3-dev

安装ROS源:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

sudo apt update && sudo apt upgrade

删除不必要的软件包(可选):

sudo apt remove libreoffice*

安装远程控制相关包:

sudo apt install vino ssh gedit

VINO配置:

$ vino-preferences
  • 选上如下项:
Allow other users to view your desktop
Allow other users to control your desktop
  • 不选如下项:
You must confirm each access to this machine.
Disable require-encryption if your VNC client does not support it.
  • ubuntu设置:
gsettings set org.gnome.Vino require-encryption false
  • Ubuntu Mate设置:Add to startup group on Mate:
System > Control Center > Startup Applications
Click "Add" Button
Name: Remote Desktop
Command Path: /usr/lib/vino/vino-server

安装ROS Kinetic:

sudo apt install git build-essential ros-kinetic-desktop
sudo rosdep init
rosdep update
apt-cache search ros-kinetic (not actual dependency)

RealSense ROS包安装:

wget -O enable_kernel_sources.sh http://bit.ly/en_krnl_src
bash ./enable_kernel_sources.sh
  • 安装传感器包:
sudo apt install ros-kinetic-librealsense ros-kinetic-realsense-camera
  • Kernel 4.10 内核源码安装
sudo apt-get install libglfw3-dev
cd ~
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir build && cd build
cmake ../
make && sudo make install
cd ..
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
./scripts/patch-realsense-ubuntu-xenial.sh

TurtleBot 2i ROS包安装:

  • 安装依赖包:
sudo apt install ros-kinetic-turtlebot* libudev-dev ros-kinetic-find-object-2d ros-kinetic-rtabmap-ros ros-kinetic-moveit ros-kinetic-octomap-ros ros-kinetic-manipulation-msgs ros-kinetic-controller-manager python-wxgtk3.0
  • 安装TurtleBot2i源码
source /opt/ros/kinetic/setup.bash
cd ~
mkdir -p ~/turtlebot2i/src
cd ~/turtlebot2i/src
git clone https://github.com/Interbotix/turtlebot2i.git .
git clone https://github.com/Interbotix/arbotix_ros.git -b turtlebot2i
git clone https://github.com/Interbotix/phantomx_pincher_arm.git
git clone https://github.com/Interbotix/ros_astra_camera -b filterlibrary
git clone https://github.com/Interbotix/ros_astra_launch
cd ~/turtlebot2i
catkin_make

bashrc配置:

  • 添加如下行到~/.bashrc 文件,并替换example.hostname为自己的计算机名
source /opt/ros/kinetic/setup.bash
alias goros='source devel/setup.sh'
export ROS_HOSTNAME=example.hostname
export TURTLEBOT_3D_SENSOR=astra
export TURTLEBOT_3D_SENSOR2=sr300
export TURTLEBOT_BATTERY=None
export TURTLEBOT_STACKS=interbotix
export TURTLEBOT_ARM=pincher

dialout权限设置:

sudo usermod -a -G dialout turtlebot

udev rules设置:

cd ~/turtlebot2i/
goros
rosrun kobuki_ftdi create_udev_rules
rosrun astra_camera create_udev_rules
cd ~/turtlebot2i/src/turtlebot2i_misc
gedit 99-turtlebot2i.rules
  • 重插ArbotiX和Kobuki的usb线,检查相应的端口:
udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1
udevadm info -a -n /dev/ttyUSB1 | grep '{serial}' | head -n1
  • 修改99-turtlebot2i.rules文件对应的6,7行serial numbers串口编号

  • 复制rules文件

sudo cp ./99-turtlebot2i.rules /etc/udev/rules.d/

参考:

  • http://wiki.ros.org/kinetic/Installation/Ubuntu
  • http://ubuntuhandbook.org/index.php/2016/07/remote-access-ubuntu-16-04/

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: turtlebot2i入门教程