## page was renamed from stage/Tutorials/Making Maps Using Stage's Wander Controller ## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = This tutorial works on ROS Electric but has known issues in ROS Fuerte and ROS Groovy ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Making Maps Using Stage's Wander Controller ## multi-line description to be displayed in search ## description = This tutorial assumes that you have mastered stage simulations and you are well acquainted with the wander controller.This tutorial uses stage's wander controller to obtain a map of the robot's environment in an incremental manner. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= AdvancedCategory ## keywords = Stage, SLAM, map #################################### <> <> == SLAM Using Stage's Wander Controller == SLAM can be realised using wander controller in stage. The robot can move around and avoid obstacles by the virtue of the wander controller, the mapping tools can be used to get 2D map of the environment. It is worth a note that this tutorial works only for one robot, multirobot SLAM is not within the scope of this tutorial. === Codes === Download the codes from [[http://mobotica.googlecode.com/files/stage_controllers.tar.gz]] and extract the stage_controllers file and make sure that it is in the [[http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PACKAGE_PATH | ROS path]]. Build the package; {{{ rosmake stage_controllers }}} === Start the stage simulation === Start an instance of the master and start the stage simulation in a new terminal window {{{ rosrun stage stageros `rospack find stage_controllers`/world/roomba-wander-slam.world }}} '''NOTE''': The world file employs stage controller 'wander' hence the robot will start to move immediately and will be in a wandering mode. For more details on the 'wander' controller, see here - [[http://www.ros.org/wiki/stage/Tutorials/IntroductiontoStageControllers]] === Start gmapping === Start gmapping in a new terminal window {{{ rosrun gmapping slam_gmapping scan:=base_scan }}} === Start map server === Start map server in a new terminal window {{{ rosrun map_server map_saver }}} The map will get saved in the directory from where the command for {{{map_server}}} is issued, as a pgm file. The map may be visible by clicking on it while the simulation is running, run the simulation till a desired level of accuracy has been attained. == Results etc == A sample result; {{http://3.bp.blogspot.com/-wX3fZADcnso/TvGDsE6DcqI/AAAAAAAABzI/ZP7belD2xWw/s1600/SLAM.png|alt text/|width=720}} A shortcoming of this approach is that, the robot being in 'wander' mode prefers open spaces compared to narrow lanes. So, one may have to be patient until the robot covers those congested parts of the environment thus yielding a better map. The {{{rxgraph}}} of this simulation shows the nodes in use; {{http://1.bp.blogspot.com/-D3K0tmRW6ts/Tqz-UgP-jWI/AAAAAAAABtA/HfERsysc0cs/s1600/rxgraph.png|alt text/|width=720}} ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE