ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Use a known map to do navigation

asked 2013-02-01 04:15:41 -0600

CarolineQ gravatar image

updated 2013-02-03 21:30:51 -0600

Hi !

Is it possible to use a known map (saved as pgm and yaml) to do localization and navigation in rviz ?

I am actually using the turtlebot on Gazebo simulator. I created a map using gmapping and the keyboard teleop. And I saved this map using the map_server package. I got two files (one pgm and one yaml). I tried to follow the tutorial about the pr2 (pr2_simulator/Tutorials/UsingCustomMapForSimulation) and adapt it to my case.

When I start rviz I can see my map but the robot is not able to move and the navigation is not working. Furthermore, I can see errors on the fixedFrame /map.

Which parameters should I change ?

Below is my launch script :

<launch>   

<!-- start gazebo with boxes -->   
  <param name="/use_sim_time" value="true" />   
  <node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find turtlebot_gazebo_tutorial)/test.world" respawn="true" output="screen"/>

  <node name="gazebo_gui" pkg="gazebo" type="gui" />

  <include file="$(find turtlebot_gazebo_tutorial)/launch/robot.launch"/>

  <!--- Load map -->   <node name="map_server" pkg="map_server" type="map_server" args="$(find turtlebot_gazebo_tutorial)/map.yaml" respawn="true" />

  <!--- Run AMCL -->   <include file="$(find turtlebot_navigation)/config/amcl_turtlebot.launch" />

  <!--- Run Move Base  -->   <include file="$(find turtlebot_navigation)/config/move_base_turtlebot.launch" />

</launch>

Thanks for help.

Update:

The global error is: "Fixed frame /map doesn't exist."

And in the RobotModel I also have some errors: "No transform from [base_footprint] to [/map] No transform from [base_link] to [/map] No transform from [camera_link] to [/map] ..." for each frame.

edit retag flag offensive close merge delete

Comments

1

Please post all errors exactly as they appear using Copy & Paste, if possible.

dornhege gravatar image dornhege  ( 2013-02-01 05:33:19 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-02-04 03:33:14 -0600

CarolineQ gravatar image

Thanks for help.

I fixed the problem. Amcl was running but not configured correctly, as dornhege said. The parameter for scan_topic wasn't set to the correct topic (it was narrow_scan instead of scan). I changed that and now it works.

Thanks.

edit flag offensive delete link more
1

answered 2013-02-04 00:32:39 -0600

dornhege gravatar image

Judging from the errors, there is no localization. It seems amcl is either not running at all or not configured or initialized correctly. To verify you can rosrun tf view_frames, also check the output of the amcl launch if there are any errors.

edit flag offensive delete link more
1

answered 2013-02-01 04:25:27 -0600

For navigation in rviz there is option top menu "2DNavGoal". Click on that and then draw arrow on ur map to set position of goal. If everything is configured properly then robot should move. For map error, look the tf panel on left of rviz to check tf tree. If map is not defined, then using static_tf_publisher publish a tf between map and world.

edit flag offensive delete link more

Comments

Also make sure localization is initialized with the "2D Pose Estimate" button.

dornhege gravatar image dornhege  ( 2013-02-01 05:32:45 -0600 )edit

Question Tools

Stats

Asked: 2013-02-01 04:15:41 -0600

Seen: 2,930 times

Last updated: Feb 04 '13