Skip to content

Some new gridmap layers#4

Closed
estherag wants to merge 1 commit intoEasyNavigation:rollingfrom
estherag:rolling
Closed

Some new gridmap layers#4
estherag wants to merge 1 commit intoEasyNavigation:rollingfrom
estherag:rolling

Conversation

@estherag
Copy link
Contributor

Hi,

We’ve added some layers to extract traversability information:

First, we created a smooth elevation layer. The images below show the output of the smooth elevation followed by the original elevation:

Screenshot from 2025-07-15 15-52-18 Screenshot from 2025-07-15 15-52-04
  1. Then, based on the smoothed elevation, we added a slope layer with values ranging between 0 and 1.57 radians:
Screenshot from 2025-07-15 16-08-12
  1. Finally, we discretize the slope into three values to represent traversability. For this, we use a sigmoid function that transitions from near 1 to near 0 as the slope increases past 0.7:
value = 1.0f / (1.0f + std::exp(10.0f * (slope - 0.7f)));

The output is then scaled to a range from 0 to 3, and truncated to an integer between 0 and 2. In practice:

  • When the slope is roughly between 0.63 and 0.77, traversability is 1.
  • For slope values below ~0.63, traversability is 2.
  • For slope values above ~0.77, traversability is 0.
Screenshot from 2025-07-15 16-07-58

What do you think, especially regarding the traversability function? We could also consider a simpler exponential-based approach like:

value = 3.0f - ((slope - 0.63f) / 0.14f) * 3.0f

to avoid scaling the sigmoid output. However, we believe the sigmoid provides a more powerful and smooth transition.

@estherag estherag requested review from fmrico, juanscelyg and kiko2r July 15, 2025 14:09
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 2.41935% with 121 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...av_gridmap_maps_builder/GridmapMapsBuilderNode.cpp 2.41% 117 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@estherag
Copy link
Contributor Author

Based on our discussion today, we will maintain the base grid map with the elevation layer separately from the application-specific implementation, which will include additional layers as needed. I'll close this PR, thanks!

@estherag estherag closed this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants