# AMCL in the bottom right corner...forever

I have setup the amcl as described by the tutorial. I setup all the costmap.yaml files.
When I start everything up (I am using a segway rmp). I will get my static map and then get the laser in the bottom right hand corner.
So I use the set position in rviz. And nothing happens. So far in the last two days I have gotten the robot to converge correctly twice. But when I restart it will now work.

So I have three questions: 1) In the tutorial the global costmap parameters has static_map =true, but in the local costmap parameters the static_map = false. Shouldn't these be the same?

2) I noticed the in the tutorial they used "nav_view" however when I try to grab it from the svn link it fails. How do I get nav_view.

3) Is there anything else you can do to get amcl to work. I have tried this to no avail:

        <param name="~/initial_pose_x" type="double" value="223.25" />
<param name="~/initial_pose_y" type="double" value="118.26"/>
<param name="~/initial_pose_a" type="double" value="-0.133" />


Cheers, BM

edit retag close merge delete

Sort by » oldest newest most voted

The parameters you posted should set the initial pose of the robot in the "map" frame. When you set the pose from rviz, AMCL does support messages in any frame. However, setting the robot's pose in a frame other than "map" probably isn't what you want to do and may have unintended consequences. To guarantee you're setting the initial pose in the "map" frame, make sure that you have your "Fixed Frame" and "Target Frame" set to "map" in rviz. Another thing to check is that your laser is publishing data and that AMCL is subscribed correctly to it. Given you're using the example parameters for AMCL, I'd expect setting the initial pose to work barring some problem with your network or your laser configuration.

more

AWESOME! I kept thinking to myself "There has to be a way to get the 0,0,0 to be the map coordinate"
( 2011-10-05 03:31:41 -0500 )edit
Anyway thanks a lot, it works. I must admit I am bitter that it was an rviz parameter that was failing not amcl...I spent hours going through those files, but at least it works. Thanks again!
( 2011-10-05 03:32:33 -0500 )edit

good suggestions but I am running everything on my icore 7 laptop, which is controlling the robot directly. Can I still get network problems if I am doing everything local host?

##EDIT##

So those three parameters I was setting, those actually set the real position on the robot right? It said something about an "initial pose mean" which didn't make any sense to me. Do those parameters actually set the initial position?

Oh and what frame should the initial positions be in? I am basically returning coordinates in relation to 0,0,1 which is /odom. Should this be in /map topic and how do I get rviz to send coordinates in /map coordinate frame? Right now when I get Pose or get goal it sends it to me in the coordinate frame of /odom.

Thanks, BM

more

You should get to see your robot in the initial position that you have set in /map frame.

( 2014-01-06 16:56:46 -0500 )edit

I've found that when setting the initial pose doesn't work, it's generally a communication problem. Assuming you're running amcl on your robot, and rviz on a remote computer, ssh into the robot's computer, and do a rostopic echo on the initialpose topic, and see if the message shows up when you set initialpose in rviz. If it doesn't, start doing some network troubleshooting (I'd start by making sure your ROS_IP and ROS_HOSTNAME environment variables are set correctly).

more

I have attached my yaml and launch files. I have another launch file where I launch the laser and robot drivers. Can someone look at these files and tell me if I am doing something wrong. The only thing I don't know is if I am setting up the robot correctly.

I run ABBRA_STACK.launch first then I run AMCL.launch.

Please help, I have tried all different variations of parameters, no static map, all static map. etc.

Okay the files are here: http://www.towleindustry.com/MyAMCL_SETUP.tar.gz

more