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

Custom model slam mapping issues

asked 2021-04-01 19:17:26 -0600

sisko gravatar image

I've had problems creating a well formed map of a city simulation for weeks. Initially, I was using gmapping and I later switched to hector mapping. In both cases the resulting maps were misaligned as shown in the images below:

GMapping:

image description

Hector Mapping:

image description

The highlighted areas of both maps indicate areas that are misaligned during the mapping process.

Because both cases result in similar issues, I was wondering if the problem might be with my xacro file ?

Is this something that can be resolved with costmap configuration files ( which I currently don't have ) OR is a basic but well formed URDF sufficient to correctly map an environment ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-04-02 09:42:14 -0600

tryan gravatar image

Your environment appears to be composed of long, straight corridors, which are difficult for SLAM. Your maps look fairly rectilinear (I assume that's reflective of the environment), so your problem may be that the map "slips" when your robot loses sight of reliable features. Can your lidars always see things other than the parallel walls beside it? Odometry helps, but I assume you're already using that. Some things to try:

  1. Extend the range of your lidars to always be able to see the end of a corridor in any direction.
  2. Add small objects along the sides to provide extra features in your lidar data for SLAM to reference.
edit flag offensive delete link more

Comments

Thanks @tryan.

I did not realise slam does not work well in an environment of long straight corridors. Infact, I had assumed the opposite. Those lines are actually the kerbs of sidewalks of a simulated city as detected by the laser(s) or lidar on my robot model. As the environment is a city, the lidar does detect buildings and other infrastructure. So, I wonder, is it possible to combine multiple sensor data to create better slam data ? My thinking is perhaps combining odometry, laser and lidar would provide better data for slam.

sisko gravatar image sisko  ( 2021-04-03 10:43:25 -0600 )edit

Yes, the main problem with such an environment arises when using only a short-range lidar. In a hallway, the scans from the lidar at different points will look very similar (two parallel walls), making it appear as though the robot has not moved.

As you suggest, if you are able to collect more data from the environment (longer range, more sensors, etc.), the SLAM algorithm will be better able to determine how far the robot has moved. In general, the more data, the better. You do have to make sure it's quality data, though. If your odometry is way off for example, it could hurt more than help.

Another option is to make the scans look different by adding objects to the environment, so the SLAM algorithm has more discernible features to use.

tryan gravatar image tryan  ( 2021-04-03 12:05:21 -0600 )edit

I'm going to try finding and adding some kind of unique patterns to the kerbs. I'm thinking qr codes to be read by camera on my model. BUT, how can I integrate such camera data, or lidar etc, into the SLAM algorithm ? This is the part I can't figure out yet. Gmapping needs a minimum of laser data. How can I introduce extra data from other sensors ?

sisko gravatar image sisko  ( 2021-04-03 16:51:16 -0600 )edit

Before adding more complicated sensors, I recommend you confirm what the problem is. If you increase the range of your current lidar(s) or add some small objects along the road and the mapping works, then you'll know that you need more feature-rich data to be successful. If it doesn't help, then you may still have a different problem with your current setup.

I'm not sure about using landmarks in gmapping; I've only used it with odometry and a lidar. A different package may be easier to integrate, but that's beyond the scope of this question.

tryan gravatar image tryan  ( 2021-04-04 17:25:06 -0600 )edit

Hi @tryan. Thank you for your input. I followed your advice and placed objects all over the streets of the virtual city world and I found using Hector mapping the robot model did not loose orientation so much. I managed to complete a far better map than all my previous attempts. It still lost orientation at some point but I had saved the map when it was almost complete. I then manually editted the saved map to remove the the objects etc. However when I did the same with gmapping, the map was far inferior.

sisko gravatar image sisko  ( 2021-04-08 17:19:05 -0600 )edit

It's good to hear there was improvement! Would you mind adding a picture of your newer map for reference?

tryan gravatar image tryan  ( 2021-04-08 19:55:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-04-01 19:17:26 -0600

Seen: 537 times

Last updated: Apr 02 '21