Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentator improvement #10

Open
jara001 opened this issue Nov 23, 2021 · 3 comments
Open

Segmentator improvement #10

jara001 opened this issue Nov 23, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@jara001
Copy link
Owner

jara001 commented Nov 23, 2021

Flood fill segmentator improved a lot over the euclidean one. However, I would like to test and introduce a segmentator that ensures, that the segment spans on both sides of the track. Yes, this can be a little bit tricky at certain places (e.g., Torino S-turn), but it should improve the overall result.

When talking about Torino, this is kinda fine:

    "segmentator": "flood_fill",
    "selector": "curvature",
    "selector_args": {
        "plot": false,
        "peaks_height": 0.2,
        "peaks_merge": 0,
        "peaks_filling": 8,
        "interpolation_factor": 9.08
    },

matcurgui-3-1-matryoshka

However, in other cases, such as:

    "segmentator": "flood_fill",
    "selector": "curvature",
    "selector_args": {
        "plot": false,
        "peaks_height": 0.17,
        "peaks_merge": 44,
        "peaks_filling": 100,
        "interpolation_factor": 0.85,
        "split_peaks": false,
        "downsample_factor": 11
    },

matcurguiD214-07-1-matryoshka

The segments inside the S-turn are done so badly, that we cannot have a point near the inner parts of both turns.

@jara001 jara001 added the enhancement New feature or request label Nov 23, 2021
@jara001
Copy link
Owner Author

jara001 commented Nov 23, 2021

Maybe it would be enough to improve the flood fill with:

  • Detect both walls,
  • find closest point of both walls,
  • create a "ensured path" between the segment center and both walls,
  • proceed with flooding, but allow only the associated segment to populate the "ensured path".

@jara001
Copy link
Owner Author

jara001 commented Dec 1, 2021

Current progress (as of f9d842d):

  • Walls are identified,
  • closest points are identified as well,
  • ensured path is created (with set distance using reserve_distance in d9f8c11),
  • it is filled during flooding.

However!

  • It is super slow (partially solved by a set list of segments with reservation using reserve_selected in e232d93),
  • it does not work every time, as reserved path of one segment may block the other.

To be done:

@jara001
Copy link
Owner Author

jara001 commented Dec 7, 2021

Current progress (as of b4abc08):

  • Curvature2 selector is implemented.

To be done:

  • Estimate reserve_selected automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant