2d Navigation on an Erratic
Description: This tutorial describes how to run a 2d-navigation stack on erratic robots with different laser configurations.Tutorial Level: INTERMEDIATE
Contents
Running with a Hokuyo-equipped Erratic robot
Assumptions:
- you're sitting in a SVN working copy of ros-pkg
- you're using an occupancy grid map /tmp/willow-full.png, at 0.1 m/pixel
- the robot is roughly at pose (22,11,90)
First, you must build these nodes:
- erratic_player
- hokuyo_node
- amcl_player
- wavefront_player
- nav_view
- teleop_base_keyboard
Look here for help on building them.
Run the following commands on the computer connected to the robot, each in a separate shell:
$ roscore $ drivers/robot/erratic_player/erratic_player $ drivers/laser/hokuyo_node/hokuyo_node $ nav/amcl_player/amcl_player /tmp/willow-full.png 0.1 22 11 90 $ nav/wavefront_player/wavefront_player /tmp/willow-full.png 0.1 $ nav/nav_view/nav_view /tmp/willow-full.png 0.1 odom:=localizedpose $ nav/teleop_base_keyboard/teleop_base_keyboard
Now you've got everything up, including a GUI (nav_view) and a console-based teleoperator (teleop_base_keyboard).
Note how the particle cloud in nav_view is somewhat broad. Given a little sensor input, it will quickly converge to a tight pose estimate for the robot. To do this, drive the robot around a little using teleop_base_keyboard.
To set a goal, middle-click on a position in the map inside nav_view. The planned path will be displayed as a dashed line, and laser-scans will be reprojected into the map.
Running on a Sick-equipped Erratic robot
Assumptions:
- you're sitting in a SVN working copy of ros-pkg
- your erratic has a sick laser scanner mounted 3cm in front of the wheels
First, you must build 2dnav_erratic which will build these nodes:
- erratic_player
- sicktoolbox_wrapper
- amcl_player
- wavefront_player
- highlevel_controllers
- map_server
Run the following commands on the computer connected to the robot, each in a separate shell:
$ roscd 2dnav_erratic ; roslaunch erratic_hardware.xml $ roscd 2dnav_erratic ; roslaunch 2dnav_erratic_move_base.xml
On a computer with a display, run the following commands, setting the proper host:
export ROS_MASTER_URI="http://era0.willowgarage.com:11311/" rosrun nav_view nav_view
Next, set the pose to the proper location on the map. Give the robot a goal right in front of it to allow localization to converge.
Drive the robot around using nav_view to specify goals.
Running the GUI offboard
If your link to the robot is slow, you may want to run nav_view offboard. This is quite easy. Assuming bash, and that your robot's computer is called erb0, run the following commands on an offboard computer:
$ export ROS_MASTER_URI=erb0:11311 $ rosrun nav_view nav_view






