天天看點

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)