天天看点

Turtlebot—kobuki安装启动流程

具体参考:http://wiki.ros.org/Robots/TurtleBot

1. 安装:

sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-viz ros-indigo-turtlebot-simulator ros-indigo-kobuki-ftdi> . /opt/ros/indigo/setup.bash

source /opt/ros/indigo/setup.bash

rosrun kobuki_ftdi create_udev_rules

环境配置: echo “source /opt/ros/hydro/setup.bash” >> ~/.bashrc

注:wstool provides commands to manage several local SCM repositories (supports git, mercurial, subversion, bazaar) based on a single workspace definition file (.rosinstall). wstool replaces the rosws tool for catkin workspaces. wstool is not a rewrite. It is intended to reuse most of the roswstool code and thus alsoproduce .rosinstall files that are compatible with those used by rosws.

网络时间同步

Network Time Protocol

Install Chrony

sudo apt-get install chrony

manually sync NTP

sudo ntpdate ntp.ubuntu.com

网络配置:(无工作站就可不用设)

创建工作空间

mkdir ~/turtlebot

cd ~/turtlebot

wstool init src https://raw.github.com/turtlebot/turtlebot/indigo/turtlebot.rosinstall -j8

source /opt/ros/indigo/setup.bash

rosdep install –from-paths src -i -y

catkin_make

安装kobuki

kobuki :

source ~/turtlebot/devel/setup.bash

rosrun kobuki_ftdi create_udev_rules

配置环境变量

echo “source /opt/ros/indigo/setup.bash” >> ~/.bashrc

echo “source ~/turtlebot/devel/setup.bash” >> ~/.bashrc

kinect加入环境变量

export TURTLEBOT_3D_SENSOR=kinect

echo “export TURTLEBOT_3D_SENSOR=kinect” >> >~/turtlebot/devel/setup.bash

source一下

source ~/turtlebot/devel/setup.bash

  1. bringup(启动)

    source /opt/ros/indigo/setup.bash

    注:每次(下载或更新或启动launch文件)时都要对文件进行source

    ~ source/opt/ros/indigo/setup.bashcatkinws(你的workspace)  source turtlebot/devel/setup.bash

roslaunch turtlebot_bringup minimal.launch(启动turtlebot) Create dashboard(打开kobuki状态面板) 新打开一个terminal > rqt -s kobuki_dashboard 或者输入

roslaunch turtlebot_dashboard turtlebot_dashboard.launch
  1. 维护与保养 (dashboard)

    Power Management

4.3D Visualisation(显示)

roslaunch turtlebot_bringup minimal.launch(前面已开)

source 一下 > source turtlebot/devel/setup.bash

roslaunch turtlebot_bringup 3dsensor.launch(打开3dsensor)

开Rviz

roslaunch turtlebot_rviz_launchers view_robot.launch

选中: DepthCloud Registered DepthCloud Image PointCloud Registered PointCloud

  1. 键盘控制

    roslaunch turtlebot_teleop keyboard_teleop.launch

6 交互式标记控制 Interactive Markers Teleop

安装:

sudo apt-get install ros-hydro-turtlebot-interactive-markers

服务:turtlebot_marker_server:

roslaunch turtlebot_interactive_markers interactive_markers.launch

启动rviz:之前要source一下devel/setup.bash,然后再开rviz

roslaunch turtlebot_rviz_launchers view_robot.launch

控制方法:

勾中”Interactive Makers” ,选中面板工具顶部 “Interact”

7.校正(calibrate):( http://wiki.ros.org/turtlebot_calibration/Tutorials/Calibrate%20Odometry%20and%20Gyro )

roslaunch turtlebot_calibration calibrate.launch

(First position TurtleBot at the center of a long straight wall (at least 2 meters long)rosrun rqt_reconfigure rqt_reconfigure , facing towards the wall, at about 30 cm away from the wall. )

set the parameters :

rosrun rqt_reconfigure rqt_reconfigure

8导航

使用gmapping建图:SLAM Map Building with TurtleBot

8.1导航功能介绍 Setup the Navigation Stack for TurtleBot

网址:http://wiki.ros.org/turtlebot_navigation/Tutorials/Setup%20the%20Navigation%20Stack%20for%20TurtleBot

Key files: turtlebot_navigation package

Move base:Planner

Change speed limits

Goal tolerance

Cost computing biases

Amcl (localization)

Gmapping (map building)

8.2 Launch the gmapping app

Bring up the robot

roslaunch turtlebot_bringup minimal.launch(前面已开)

Run the gmapping demo app

roslaunch turtlebot_navigation gmapping_demo.launch

Launch rviz:

# Groovy or later

roslaunch turtlebot_rviz_launchers view_navigation.launch

Drive the robot and Save the map

rosrun map_server map_saver -f /tmp/my_map

9 自动导航 (http://wiki.ros.org/turtlebot_navigation)

Autonomous Navigation of a Known Map with TurtleBot

This tutorial describes how to use the TurtleBot with a previously known map.

启动;

(1) > roslaunch turtlebot_bringup minimal.launch

运行导航DEMO并加载地图

(2)> roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml

RVIZ显示

# Groovy or later

(3)> roslaunch turtlebot_rviz_launchers view_navigation.launch –screen

9.1导航操作:

1. 定位turtlebot(初始化): 2D Pose Estimate

2. 远程操作:可以与导航同时进行。远程控制优先级高于导航。

3. 发送目标:2D Nav Goal

注:如果要在导航目标到达前让他停止,发送短一点到目标。

10 跟随 (http://wiki.ros.org/turtlebot_follower)

寻找窗口前方的目标,寻找质心并保持相应距离跟随。

10.1 跟随参数到更改

# groovy or later

rosrun rqt_reconfigure rqt_reconfigure

Select camera/follower on the reconfigure gui

Play with the parameters using the sliders; you will see the TurtleBot’s following behavior change as you move the sliders.

11 全景演示 The TurtleBot Panorama Demo

(http://wiki.ros.org/turtlebot_panorama)

Turtlebot-Android Pairing

(http://wiki.ros.org/turtlebot_android/Tutorials/hydro/Turtlebot-Android%20Pairing)

turtlebot_android(http://wiki.ros.org/turtlebot_android)