0
$\begingroup$

Rosanswers logo

I'm running AMCL navigation on a map I created with the "Autonomous Navigation of a Known Map with Turtlebot" tutorial. As you can see below, when I open RViz with "roslaunch turtlebot_rviz_launchers view_navigation.launch", the robot (the little black dot) is not centered in the middle of the map, and I think it has to do with the map's origin, set in the .yaml file.

image description

image description

I can reconfigure the origin of the .yaml file to fix the robot's position on the RViz visualization of the map (see the correction in the 3rd picture), but the origin of my Global_costmap hasn't been updated, which means the laserscans aren't aligned with the rest of the map.

image description

Any ideas of what I'm doing wrong?


Originally posted by ElizabethA on ROS Answers with karma: 120 on 2017-06-21

Post score: 0


Original comments

Comment by ElizabethA on 2017-06-21:
I realized the global_costmap is somehow getting its Position (x, y) and Orientation set somehow...I just can't figure out what's setting it to my map's original origin and why it's not getting the update when I change the map's origin.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I think you should be able to edit the param\Kinect_costmap_params.yaml file under turtlebot_navigation package, and add origin_x and origin_y values, and then pass that file in when I call AMCL.

Example: Kinect_costmap_params.yaml origin_x: 15.0 origin_y: 6.5

AMCL would be started with this: roslaunch turtlebot_gazebo amcl_demo.launch map_file:= custom_param_file:=

Unfortunately, that didn't work for me - I'm thinking I just didn't find the correct config file.

***Additionally, there's a known issue that you can't set the ORIENTATION of a costmap, which is what I need: https://github.com/ros-planning/navigation/issues/166

I think I'm going to recreate a map, but start my map-making in the middle of the "room" this time, so that hopefully, it will consider that (0,0).


Originally posted by ElizabethA with karma: 120 on 2017-06-21

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

Did you already use the "2D Pose Estimate" button in rviz to call the amcl global_localization service?


Originally posted by Humpelstilzchen with karma: 1504 on 2017-06-21

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.