Skip to content

Localization Instructions

Nick Walker edited this page Oct 11, 2017 · 1 revision

Here's how you can use the map of our wing of the building to get localization estimates of the robot's location. The maps are located at: http://farnsworth.csres.utexas.edu/maps/ You need both the pgm file (an image you can view) and the yaml file (tells format / scale / etc of the image). The 3ne-real maps are the ones of our wing. I've already downloaded and installed the maps for our wing in the segbot navigation package under /maps. If you do a rosws update in the rosbuild_ws folder, it should download the maps I uploaded there.

Then you need to run two nodes. One is a map server, which provides the map for other services (localization, maybe you) to use. And a second that runs localization, using the laser scan data with the map to give you an estimate of the robot's location. The map server node is called: map_server. Here's the documentation: http://www.ros.org/wiki/map_server?distro=groovy To run it with our map, you can run: rosrun map_server map_server ~/ros/rosbuild_ws/segbot_apps/segbot_navigation/maps/3ne-real.yaml

Then to run the localization, you're running amcl (adaptive Monte Carlo Localization). We have a launch file for this inside the segbot_navigation package (roscd segbot_navigation). Here's the documentation for amcl: http://www.ros.org/wiki/amcl You can run it with our launch file using: roslaunch segbot_navigation amcl.launch

There are a bunch of parameters and arguments being sent to this node, some of which you may want to use. You can look inside the amcl launch file for some. I think the biggest one you may to use is what you're setting as the robot's initial pose. By default, it's assumed the robot starts at 0,0 with an orientation of 0. You could change this, for example, doing: roslaunch segbot_navigation amcl.launch initial_pose_x:=3 If you look through the amcl documentation (or look at a list of topics being published with rostopic list), you'll see some useful topics, including the estimated pose of the robot, or the full particle cloud of possible robot locations.

Good luck!

Clone this wiki locally