1、Specs

Maximum translational velocity: 70 cm/s
Maximum rotational velocity: 180 deg/s
Payload: 5 kg (hard floor), 4 kg (carpet)
Cliff: will not drive off a cliff with a depth greater than 5cm
Docking: within a 2mx5m area in front of the docking station
PC Connection: USB or via RX/TX pins on the parallel port
Motor Overload Detection: disables power on detecting high current (>3A)
Odometry: 52 ticks/enc rev, 2578.33 ticks/wheel rev, 11.7 ticks/mm
Gyro: factory calibrated, 3-Axis Digital Gyroscope,STMicroelectronics
Bumpers: left, center, right
Cliff sensors: left, center, right
Wheel drop sensor: left, right
Power connectors: 5V/1A, 12V/1.5A, 12V/5A
Expansion pins: 3.3V/1A, 5V/1A, 4 x analog in, 4 x digital in, 4 x digital out
Audio : several programmable beep sequences
LED: 2 programmable two-coloured LED
Buttons: 3 x touch buttons
Battery: Lithium-Ion, 14.8V, 2200 mAh
Sensor Data Rate: 50Hz
Recharging Adapter:19V DC, 3.16A
Netbook recharging connector:19V/2.1A DC
Docking IR Receiver: left, centre, right
Brushed DC Motor:12V, 5 mN·m,9960 rpm ± 15%,Controlled by PWM

* 3d sensor
These typically have limitations as obstacle avoidance sensor:
Narrow fov (58° x 43° horizontal x vertical)
Death zone on the first 45 cm
Cannot detect glass walls
Cannot detect polished metallic surfaces

00、先检查版本
* check kobuki version:
$ rosrun kobuki_driver version_info

* Hardware Version: 1.0.4
* Firmware Version: 1.1.4
* Software Version: 0.6.5

2、供电

1. 电池
Occasionally the netbook battery monitor will be looking in the wrong place for the netbook battery monitor information.
Usually its a case of having multiple batteries or your kernel is using a different standard to expose battery information.
If it’s not working for you, delve into /proc/acpi/battery (<= kernel 2.6) or /sys/class/power_supply/ (kernels 3.0+) on your netbook and determine what batteries are listed there (usuallyl BAT0 or BAT1). Export the following variables into your workspace setup script. $ echo “export TURTLEBOT_BATTERY=/proc/acpi/battery/BAT1” >> ~/turtlebot/devel/setup.sh
$ source ~/turtlebot/devel/setup.bash

2. 解除待机:

设置robot的笔记本在合上盖子时候不要待机。
Netbook suspended or powered off when lid was closed Go to the dash and type power, and click the power settings icon. Set it to do nothing when the laptop lid is closed, both when running on AC and when on battery.

3.其次使用kobuki 19V 2A电源。

注意不能插到Kobuki插口上如果需要超过2安的电流。

3、Kobuki底盘设置

Howto Identify ttyUSBx Port:
If you have a udev rule installed, it will show up as /dev/kobuki ,
but if not, you can typically find it under one of the ttyUSB ports, e.g. /dev/ttyUSB0.
If not sure, type dmesg into a terminal, unplug and replug the robot and type dmesg again.

Kobuki needs to transfer a udev rule so that it can reliable detect the factory flashed ftdi usb chip. This enables it to be read from /dev/kobuki instead of the unreliable /dev/ttyUSBx devices.

1. If udev works
SO,Connection to the kobuki base is via usb enabled by an ftdi usb-serial converter which is always pre-flashed at the factory with the serial id kobuki.
For convenience, to enable the device to appear on /dev/kobuki, use the following script :
$ rosrun kobuki_ftdi create_udev_rules
This script copies a udev rule to /etc to facilitate bringing
up the kobuki usb connection as /dev/kobuki.
[sudo] password for HOSTNAME:
Restarting udev
udev stop/waiting
udev start/running, process 8804

Above cmd comes from kobuki_ftdi package is enabling Kobuki’s USB connection. This package contains tools for flashing the Kobuki’s FTDI chip (usually done at the factory). The special firmware for the FTDI chip (USB to serial converter) enables it to appear as /dev/kobuki on the user’s PC.

2. Non-ros
As to Non ROS users, you will need to build the package first, in order to get the create_udev_rules script. To do so navigate to the package folder and do:
$ make udev

3、还需要
Typically the /dev/ttyUSBx port requires your user to be in the dialout group. If you are not in this group then your turtlebot bring up will fail with permission denied. Add your user to this group with:
$ sudo adduser username dialout

4、Kinect相机配置

Prio to ROS Indigo, the Turtlebot ROS package provided a default support for Kinect camera. However, for ROS Indigo and later versions, Turtlebot package provides a default support for Asus Xtion Pro Live 3D sensor, and it requires some additional configuration to work with Kinect. The default 3D sensor is now Asus Xtion Pro. Due to EOL of Microsoft Kinect, the default 3D sensor is now configured as Asus Xtion Pro. If you have used a Kinect for your TurtleBot, need Configuration:
$ echo “export TURTLEBOT_3D_SENSOR=kinect” >> ~/turtlebot/devel/setup.sh
这里说的不对, 其实ros的indigo版对于turtlebot2的kinect v1已经包括了freenect的package。

可以测试看Now you can test your camera. Type the following command:
$ roslaunch freenect_launch freenect.launch

1. Two RGBDs
Turtlebot+Indigo Supporting two locations for Asus Xtion Pro:Indigo supports two locations for Asus Xtion Pro(asus_xtion_pro and asus_xtion_pro_offset):
Asus_xtion_pro is a default configuration which locates the sensor at the center.
Asus_xtion_pro_offset is old asus xtion pro location which is slightly located on the right.
It is to keep backward compatibility for previous distributions TurtleBot(hydro, groovy) that asus xtion pro are mounted. These are configurable via TURTLEBOT_3D_SENSOR environment variable.

2. Freenect as Kinect Driver than openni driver
While investigating kinect incompatibility issue for trusty, we found out that openni driver stop supporting Kinect. So we switched to use freenect_camera for Kinect.
If you have a Kinect, Realsense, or Orbbec Astra camera and it has not been configured to work for you by your distributor, For Kinect, you have to firstly install the openNI SDK and Kinect Sensor modul and make sure it can work properly.
(some info http://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/)

3、Install Kinect Driver (TurtleBot only)
检查TurtleBot 的3D 传感器类型:
$ echo $TURTLEBOT_3D_SENSOR
: kinect
如果不是kinect例如 asus_xtion_pro, 需要设置default value of the environment variable in .bashrc and restart your terminal:
$ echo “export TURTLEBOT_3D_SENSOR=kinect” >> .bashrc

安装openni package :
$ sudo apt-get install ros-indigo-openni-camera
Above is ROS driver for OpenNI depth (+ RGB) cameras.

$ sudo apt-get install ros-indigo-openni-launch
Above is Launch files to open an OpenNI device and load all

测试:
$ roslaunch openni_launch openni.launch

1、如果提示No devices connected…. waiting for devices to be connected的话,这是经典问题,这么解决:
below TurtleBot uses a Microsoft Kinect. To use the Kinect you need to install its driver.
$ mkdir ~/kinectdriver
$ cd ~/kinectdriver
$ git clone https://github.com/avin2/SensorKinect
$ cd SensorKinect/Bin/
$ tar xvjf SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2
$ cd Sensor-Bin-Linux-x64-v5.1.2.1/
$ sudo ./install.sh

$ roslaunch openni_launch openni.launch
好了

5、启动底盘和相机

Close the lid of your laptop and place it on the TurtleBot,first connect the Kobuki USB cables to laptop,second connect the Kinect USB cables to laptop, run:
$ roslaunch turtlebot_bringup minimal.launch –screen

The bringup operation that starts all the sensors and actuators of the Turtlebot, namely, the Kobuki base and the 3D sensor.
You should hear a sound when it is turned on.

1. 运行 turtlebot_bringup minimal.launch时如果出错:
[ WARN] [1426225321.364907925]: Kobuki : device does not (yet) available, is the usb connected?.
[ WARN] [1426225321.615097034]: Kobuki : no data stream, is kobuki turned on?
出错的话需要设置串口。
原因可能是:Then do the obvious – make sure kobuki is turned on (leds should be active on the kobuki) and the cable is plugged in. If you are sure about both of these, check to see that your system has had the udev rule applied for /dev/kobuki. Check for this:
$ ls -n /dev | grep kobuki
Connection to the kobuki base is via usb enabled by an ftdi usb-serial converter which is always pre-flashed at the factory with the serial id kobuki. For convenience, to enable the device to appear on /dev/kobuki, use the following script to copy across the udev rule and restart udev (you’ll need your sudo password):
$ rosrun kobuki_ftdi create_udev_rules
这时候查看就可以发现一个/dev/kobuki的软连接到ttyUSB0
$ ls -n /dev | grep kobuki

2. 再测试Kinect的openni
On TurtleBot netbook close all terminals, then open a new window and run:
$ roslaunch turtlebot_bringup minimal.launch

Then open another terminal window and run:
$ roslaunch openni_launch openni.launch
If you get a collection of lines that start with process[camera… everything is perfect . Leave the two terminal windows open

Then open a new one, and run:
$ rosrun image_view image_view image:=/camera/rgb/image_color
You should see a live video stream from the Kinect. Press ‘q’ to quit.

This is not much more exciting than a webcam, so let’s see a visual representation of distance by running:
$ rosrun image_view image_view image:=/camera/depth/image
TIP: If you see only solid gray, check that you are still running openni.launch on TurtleBot.

To Stop Openni (TurtleBot) on TurtleBot,
Press Ctrl-c to stop openni and leave minimal.launch running. and Now run:
$ roslaunch turtlebot_bringup 3dsensor.launch

Then open a new one and run:
$ roslaunch turtlebot_rviz_launchers view_robot.launch
Under “Displays” check “Registered DepthCloud” and “Image”. Hold down the left mouse button to rotate or the middle mouse button to move the camera.

6、传感器测试

1. Testing the bumper sensor
There are three bumper sensors in the Kobuki base: (1) one in the middle-front, (2) one in the left front, (2) one the right front. The bumper sensor helps the Turtlebot detecting collision with obstacles. To test the three bumper sensor, open a new terminal and run:
$ rostopic echo /mobile_base/events/bumper
———
state: 0
bumper: 0
Above means that all bumpers are released (not pressed).
The variable state can take the values 0 (RELEASED) and 1 (PRESSED).
The variable bumper takes the values 0 (LEFT), 1 (CENTER), and 2 (RIGHT).

2. Testing the cliff sensor
Cliff sensors are responsible for detecting cliffs and altitude changes when the robot is moving to prevent crashes when reaching stairs. They are located in the bottom of the Kobuki base. There are three cliff sensors, one in the center, one in the left, and one in right side. To test the three cliff sensors, open a new terminal and run:
$ rostopic echo /mobile_base/events/cliff
———
state: 0
sensor: 0
This means that all cliff sensors detect a normal ground (no cliff).
The variable state can take the values 0 (FLOOR) and 1 (CLIFF).
The variable sensor takes the values 0 (LEFT), 1 (CENTER), and 2 (RIGHT).

3. Odometry and Gyro Calibration
http://wiki.ros.org/turtlebot_calibration/Tutorials/Calibrate%20Odometry%20and%20Gyro

7、注意

1. 精简启动
In most situations the turtlebot runs its software on a computationally challenged notebook or embedded board. This is not enough to run all possible nodes at once and even if it were possible, many of the programs would conflict. The basic principle then is to bootstrap the robot with the ros environment, core components and any software that assists in the launching/tearing down of any task related software that will run on top of the bootstrap level.
Bootstrapping the turtlebot is via minimal.launch. This is also sometimes referred to as bringing up the turtle.

2. Environment Variables
A very few of the core variables listed with –ros-args have been implemented as environment variables so you can modify the turtlebot minimal launch without having to write a new launcher.
These are typically for hardware, map filenames and/or pre-loaded applications.
$ env | grep TURTLEBOT_
TURTLEBOT_STAGE_MAP_FILE=/maps/maze.yaml
TURTLEBOT_3D_SENSOR=asus_xtion_pro
TURTLEBOT_STACKS=hexagons
TURTLEBOT_SIMULATION=false
TURTLEBOT_RAPP_PACKAGE_WHITELIST=[rocon_apps, turtlebot_rapps]
TURTLEBOT_STDR_MAP_FILE=/maps/sparse_obstacles.yaml
TURTLEBOT_SERIAL_PORT=/dev/kobuki
TURTLEBOT_BASE=kobuki
TURTLEBOT_RAPP_PACKAGE_BLACKLIST=[]
TURTLEBOT_TYPE=turtlebot
TURTLEBOT_STAGE_WORLD_FILE=/maps/stage/maze.world
TURTLEBOT_BATTERY=/sys/class/power_supply/BAT0
TURTLEBOT_MAP_FILE=/opt/turtlebot/src/turtlebot_apps/turtlebot_navigation/maps/willow-2010-02-18-0.10.yaml
TURTLEBOT_INTERACTIONS_LIST=[turtlebot_bringup/documentation.interactions, my_rapps_tutorial/my.interactions]
TURTLEBOT_NAME=turtlebot

3. 客制化 Launcher
Finally to make a significant modification to the turtlebot customisation, create a launcher:

Run it:
$ roslaunch my_turtle.launch –screen