天天看點

1. A "Getting Started" Guide for ROS and TurtleBot

About what ? 

test hardware and ROS / set up network / creat a map

This guide assumes that you have already installed the ROS, and set up the hardware. There are also several steps that we should do before writing your own scripts.

1. Testing ROS,TurtleBot and Kinect.

1.1 Testing ROS

command: roscore    correct result: started core service. [/rosout]

1.2 Testing TurtleBot

Close any open terminals, then open a new terminal window and run:

command: roslaunch turtlebot_bringup minimal.launch

correct result:TurtleBot will chime, letting you know that it’s booting up. 

teleoperate the turtlebot: roslaunch turtlebot_teleop keyboard_teleop.launch

(then press the keyboard to move)

1.3 Testing kinect 

command: echo $TURTLEBOT_3D_SENSOR      #Output: kinect

(set the default value of the sensor: echo "export TURTLEBOT_3D_SENSOR=kinect" >> .bashrc)

TURTLEBOT:

roslaunch turtlebot_bringup minimal.launch

roslaunch openni_launch openni_launch.launch

result : get a collection of lines that start with process[camera...

WORKSTATION:

see a live video stream from Kinect: rosrun image_viewimage_view image:=/camera/rgb/image_color

see a grayscale video stream:rosrun image_view image_view image:=/camera/depth/image)

TURTLEBOT:

(close openni and leave minimal.launch)

roslaunch turtlebot_bringup 3dsensor.launch

WORKSTATION:

roslaunch turtlebot_rviz_launchers view_robot.launch

2. Set up network(synchronize clocks)

TURTLEBOT:

check if turtlebot has SSH service: sudo service ssh status

install the SSH server: sudo apt-get install openssh-server

sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT

sudo ufw allow ssh

sudo /etc/init.d/ssh restart

find turtlebot's IP: ifconfig

result: wlan0/inet addr

WORKSTATION:

SSH into turtlebot: ssh turtlebot@[ip_of_turtlebot]

3. Creat a map

TURTLEBOT:

roslaunch turtlebot_bringup minimal.launch

roslaunch turtlebot_navigation gmapping_demo.launch

WORKSTATION:

roslaunch turtlebot_rviz_launchers view_navigation.launch

roslaunch turtlebot_teleop keyboard_teleop.launch

(but the joystick may be more convenient)

TURTLEBOT:

rosrun map_server map_saver -f /tmp/my_map

(TIP: /tmp/ directory is sutomatically cleaned, be careful)

(all stuffs are from link : http://learn.turtlebot.com/)