Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

The scaling_free and scaling_occupied values are here specified to affect how the occupancy probability updates. But its not clear how they affect occupancy probability.

I found this part of the code:

https://github.com/ethz-asl/wavemap/blob/eb8c1f7/library/cpp/include/wavemap/core/integrator/measurement_model/impl/continuous_beam_inl.h#L148-L156

But I am having trouble interpreting it.

Could you elaborate on how scaling_free and scaling_occuped affects the occupancy probability?

I guess this is explained in the article, but it would be useful with some more information in the docs. Such as if smaller or larger values means that measurement will have more effect over the occupancy probability.

You must be logged in to vote

Replies: 1 comment · 3 replies

Comment options

Hi @sverrevr,

It's hard to give a precise answer without extensively referring to the paper and other literature. But it'd be nice to add a high-level, self-contained explanation to the docs, so I'll give it a try :) The measurement model considers several types of uncertainty. The first is Gaussian measurement noise on the measured depth and the beam's estimated direction. The standard deviation of these Gaussians is configured through angle_sigma and range_sigma. You can think of the measurement update for each beam as a cone, which gets softer and wider as the sigmas are increased. There are also many sources of non-Gaussian noise, such as sensing errors and imperfect modeling assumptions (static environment, no consideration of beams bouncing on mirrors or puddles,...). To consider these sources, each occupancy update is scaled such that it cannot directly set cells in the map to be free (or occupied) with 100% confidence. Furthermore, we also limit the total confidence that the map can converge to after multiple observations by thresholding it to stay between min_log_odds (default -2) and max_log_odds (default 4). This is particularly important to reduce the amount of time it takes for objects to fade in and out of the map when they move. Another practical motivation to keep the occupancy probabilities from getting too close to 0 or 1 is that converting these values to/from log odds is numerically unstable.

You can control the relative strength of occupied and free updates with scaling_free and scaling_occupied. These should be set between 0 and 1, but it's best to avoid values close to 1 for numerical stability. The motivation to scale free and occupied updates separately is that cells containing thin objects are more frequently observed as being free than occupied (due to their geometry + sensor noise). However, we usually want to prioritize being conservative for safety reasons. Assigning roughly twice as much weight to occupied updates often works well in practice.

If you're familiar with Octomap, wavemap’s min_log_odds and max_log_odds are analogous to Octomap’s l_min and l_max. Similarly, scaling_free and scaling_occupied serve a similar purpose to Octomap’s l_free and l_occ, although wavemap uses them to rescale a continuous measurement while Octomap directly uses them as discrete updates.

The code you linked implements equation 9 in the wavemap paper with the addition of scale factors. It's one of the most frequently executed parts of the system, so we extensively profiled and optimized it - making it a bit harder to read.

You must be logged in to vote
3 replies
@sverrevr
Comment options

Thanks for the very good reply!
So scaling factor of 1 means that at the measurement (if there is no range and angle uncertainty) then the probability will be 100% that its occupied. And for scaling free, scaling factor 1 means that it will be 0% occupied afterwards (or is it opposite?).
A scaling factor of 0 means that it wont be updated. (ignoring computational feasibility)

@victorreijgwart
Comment options

Setting scaling_occupied to 1.0 results in the occupancy probability instantly reaching 100% behind the measurement. Exactly at the surface, the occupancy model we use pushes the occupancy probability to 0.5 (i.e. it's unbiased and doesn't inflate obstacles). The scaling_free param controls the update along the beam, between the sensor and the measured point (so in front of the surface).

@victorreijgwart
Comment options

And like you said, a scaling factor of 0 disables the respective update :) Doing so is numerically stable since the applied update is then p=0.5 (i.e. it sums in 0.0 in log odds).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.