Sun 04 Apr 2021 06:16:24 PM CDT 6_ROS_Navigation_II_geditMenu_Mapping_4_4_2021.txt MAPPING --------------------- Start Afresh - New Terminals Have Gazebo running II_1 Gazebo and TurtleBot $ roslaunch turtlebot_gazebo turtlebot_world.launch … process has finished cleanly Check model pose and reset if necessary $ rostopic echo /odom -n1 $ rostopic pub /mobile_base/commands/reset_odometry std_msgs/Empty$ $rostopic echo /odom -n1 (Check for 0,0 and w=1) II_2 Gmapping $ roslaunch turtlebot_gazebo gmapping_demo.launch II_3 View Navigation $ roslaunch turtlebot_rviz_launchers view_navigation.launch Grid, Robot Model, Laser Scan topic name /scan; Bumper hit, Map topic name /map, Global&Local Map, AMCL particles, Full Plan - Page 176 explains terms II_4 Draw Map $ roslaunch turtlebot_teleop keyboard_teleop.launch Start driving the robot using keyboard keys and observe how the map is updated in Rviz Move TB and rotate TB to draw map. Line up RVIZ and Gazebo images. Focus on teleop window and start with l -CW rotation/ Try J – CCW Now move Turtlebot I or , and rotate again - Take 15 or 20 minutes for a decent map II_5 Save the Map $ rosrun map_server map_saver -f /home/harman/Desktop/OurMap2_4_12_2021 (Watch CR in command or use xxxxx \ Enter ) Files are .pgm and .yaml III Navigation III_1 $ roslaunch turtlebot_gazebo turtlebot_world.launch III_2 $ roslaunch turtlebot_gazebo amcl_demo.launch \ map_file:=/home/harman/Desktop/OurMap2_4_12_2021.yaml Page 177 Wait for odom received! III_3 $ roslaunch turtlebot_rviz_launchers view_navigation.launch P177 Align Gaxebo grid with RVIZ Map x-y Move Turtlebot to new position and orientation Text Page 178 2D Pose Estimate in RVIZ Text Page 179-180 Set 2D Nav Goal in RVIZ