Robotics StackExchange | Archived questions

Multiple issues while attempting to create a simple robot for localization in simulation using amcl

Hello,

I am following a basic tutorial and I created my own robot in Gazebo and Rviz, and added laser and camera sensors to it. I then utilized a map from Clearpath to try and localize this robot using AMCL.

There are a few issues I am running across that I am unable to fix as of now.

  1. The robot when I launch in RViz needs to be set to the "odom" fixed frame, however the map requires the "map" to function. If I select "odom" then the actual map in RViz shuffles about a point (jittery motion). If I select "map" then the robot seems to be jittering about. I am not entirely sure how to fix that. This doesn't happen in Gazebo so I am assuming this doesn't contribute to any errors. But any suggestions on what I am missing or understanding incorrectly?

  2. As soon as I run the launch file for the amcl (which loads the map, and starts amcl node, and the move_base node with the config params), I load it up in RViz and then select "2D pose estimate" and point the arrow towards a particular path in the map from the robot. I am attaching an image below. The green circle is where the robot starts and the red arrow underneath is the "2D pose estimate I set". As you can see, as soon as I did that, the costmap depicts it as if the area is blocked off. I select the "2D Nav Goal" and set it as per the Red arrow you can see on the left side. Since as per the costmap the area in front of the robot is blocked, it decides to take the path opposite of it to try to reach the goal. I am trying to understand why this is happening and how to rectify it. Is it any specific parameter somewhere that I need to tweak or I am initializing something incorrectly?

image description

  1. After the robot decided to take the other route (much longer) I get the following result after a while (I am running this off of a virtual machine unfortunately so the robot movement is slow, can't speed that up somehow). I have marked areas similar to the image above to give an idea. The robot is now located here and is still trying to find its way around.

https://imgur.com/a/FhB61

And I get the following errors/warnings -

[ERROR] [1510033498.355228432, 2137.605000000]: None of the points of the global plan were in the local costmap, global plan points too far from robot

[ WARN] [1510033498.369760487, 2137.609000000]: The origin for the sensor at (-0.49, -0.43) is out of map bounds. So, the costmap cannot raytrace for it.

[ WARN] [1510033500.647048940, 2138.619000000]: The origin for the sensor at (-0.49, -0.46) is out of map bounds. So, the costmap cannot raytrace for it.

[ WARN] [1510033507.102539142, 2141.625000000]: The origin for the sensor at (4.69, 0.95) is out of map bounds. So, the costmap cannot raytrace for it.

[ERROR] [1510033526.597402587, 2147.620000000]: None of the 279 first of 279 (279) points of the global plan were in the local costmap and free

[ERROR] [1510033526.597706226, 2147.620000000]: None of the points of the global plan were in the local costmap, global plan points too far from robot

And the actual position of the Robot in Gazebo doesn't match with the one shown in Rviz. The robot is still moving but the position is way off in RViz vs Gazebo.

https://imgur.com/a/X14Q3

I am trying to figure out how to identify the problem here and how to go about fixing and improving it. Would appreciate any help to learn this better. Thank you!

P.S. - There are several issues with this editor when I tried posting. Where can I report those? I couldn't upload all the images in one go. I couldn't add proper tags. I couldn't scroll in the text editor at all. Would like to report those.

Asked by nemesis on 2017-11-07 00:50:35 UTC

Comments

I tried several times but I can't add more images to my post above. Anyone has any suggestions on how to solve this problem/bug? For the time being I added the images on imgur instead and provided the link here. It didn't allow me to add images using imgur link either.

Asked by nemesis on 2017-11-07 00:52:39 UTC

Answers