Rosanswers logo

Hi all. If this question has been asked somewhere else, please direct me instead of repeating =).

Essentially I'm tasked with making a p3-at base navigate a course such that it can't go over "white lines" marked on the ground or run into random barrels placed throughout the course.

The base has a sick lms100 laser scanner which gmapping will be running on to localize and it will also be fed into the navigation stack to add the barrels onto the costmap.

We're working on a camera that will ultimately output the "white lines" as laser scanner data. This, however, won't have much of a range, and I think this can be specified in the laser msg.

The problem I envisage occurring is that the LMS100 is going to clear a lot of what the camera is going to pick up.

I was thinking a way to counteract this would be to run cost_map2d individually for both scanners then essentially superimposed these two maps and this will be the one that gets inflated and used to navigate by move_base.

Have other users ever encountered similar situations and went about it this way or another?

Essentially, it's two scanning sources that aren't detecting the same thing (i.e. barrels @ a certain height for the lms100 and lines on the ground for the camera).

Will superimposing the costmaps take too much time?

Maybe the navigation stack already incorporates this by tying the sensor source to each pixel of an obstacle, but I doubt it.

If I went with my plan, I could then seed each map with its own initial map, and it shouldn't overwrite it because of the individual sensor ranges?

If any guidance can be given I would be greatly appreciative.

Originally posted by Garrick on ROS Answers with karma: 96 on 2014-08-16

Post score: 1


2 Answers 2


Rosanswers logo

Navigation in ros hydro+ already does this for you using layers, where you can configure separate 'obstacle layers' for each sensor so that they won't clear each others obstacles.



Originally posted by paulbovbel with karma: 4518 on 2014-08-16

This answer was NOT ACCEPTED on the original site

Post score: 2

Original comments

Comment by Garrick on 2014-08-17:
Thanks for the response Paul.

Just one more quick question...

The individual layers for each sensor should be able to initialize/seed from a saved map?

i.e. I'll save the static maps for each layer eventually, then initialize next time i run. Is there any functionality for this?

Thanks, Garrick.

Comment by paulbovbel on 2014-08-17:
The static map is a separate layer, as discussed in the second link.

Due to localization issues, you'll find that persisting the obstacle layers won't be very effective, they are really only good for local navigation (i.e. obstacle avoidance).


Rosanswers logo

Hey guys. Just a few more questions about the static layer of the navigation stack.

I had the Nav stack going with two laser scanners. One of them was running gmapping and it was this frame that I used for the navigation stack (both global and local costmaps (even though normally it's odom for local)).

In the local and global costmap params I set the static map parameter to false... So does this mean the navigation stack is creating its own static map from both of the laser scanners? If this is so, can I eventually load this static layer at the start of a new run? What's to stop the longer range laser scanner from overwriting the white lines that are only detected when the camera gets relatively close to them?...

When considering this, it seems like I have to set the static map parameter to true, then get the map generated by gmapping, then copy it and add on the detected lines and this will be that map that the navigation stack will subscribe to to generate the static map layer.

Further, since I'm mainly dealing with obstacles that are static, and I only really need a static map layer, can I disable the obstacle layers?

Also, maybe it's possible to create 2*static map layers, one for the laser scanner data and one for the camera? (this might be what the Nav stack does anyway, when you specify 2 sensors)

If you can have two static map layers, one for each sensor and you load a map at the start of a run, will the navigation stack update, the static map if something has slightly changed? Say if a barrel has moved a meter from where it originally was.

Any comments would be greatly appreciated.

I'm just trying to figure out the best way of going about this problem using ROS's navigation stack.

Originally posted by Garrick with karma: 96 on 2014-08-19

This answer was NOT ACCEPTED on the original site

Post score: 2

Original comments

Comment by paulbovbel on 2014-08-20:
Please ask as a separate question

Comment by Garrick on 2014-08-24:
hi Paul. thanks for all your help.

I've made a separate question here if you're interested and have any input.


Comment by paulbovbel on 2014-08-25:
okay, you might want to delete this answer as well, to limit confusion/clutter


Your Answer

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