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

Extending likelihood field to model unexplored spaces #430

Merged
merged 7 commits into from
Oct 5, 2024

Conversation

DPR00
Copy link
Collaborator

@DPR00 DPR00 commented Aug 22, 2024

Proposed changes

The following changes are proposed in order to enhance the Likelihood Field Model based on the suggestions described on #55:

  • First, a new function unknown_obstacle_data() is created to ideally replace the obstacle_data() function in beluga/sensor/data/OccupancyGrid.hpp. This new function will return a srd::tuple<bool, bool> containing the values which are occupied and unknown.
  • Then, this new function will be passed to calculate the distance map using a new function nearest_obstacle_unknown_distance_map. This new function will ideally replace the nearest_obstacle_distance_map function.
  • The value of the distance map for unknown values is assigned with a pre-computed value inside the nearest_obstacle_unknown_distance_map function. Based on this computed value, the likelihood will be $\frac{1}{z_{max}}$.

Some comments:

  • It passed the compilation steps and the beluga example was tested. It would be nice to make some maps testing the draft. How could I perform that?

Type of change

  • 🐛 Bugfix (change which fixes an issue)
  • 🚀 Feature (change which adds functionality)
  • 📚 Documentation (change which fixes or extends documentation)

💥 Breaking change! Explain why a non-backwards compatible change is necessary or remove this line entirely if not applicable.

Checklist

Put an x in the boxes that apply. This is simply a reminder of what we will require before merging your code.

  • Lint and unit tests (if any) pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All commits have been signed for DCO

Additional comments

@DPR00 DPR00 requested a review from hidmic August 22, 2024 23:27
@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch from 7e2e962 to 32867eb Compare August 23, 2024 03:40
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass!

It would be nice to make some maps testing the draft. How could I perform that?

I recommend extending the likelihood field model unit tests for this next.

@DPR00
Copy link
Collaborator Author

DPR00 commented Aug 27, 2024

Hi @hidmic! I'm trying to replicate locally the 'build_and_test.sh' file, since it is failing in the pipeline. I wanted to tested first before updating the draft PR. However, I'm getting the following error (similar to #422, but it actually build when using -colcon build --packages-up-to beluga_example --cmake-args -DBUILD_TESTING=OFF as indicated in Documentation):

-- Configuring incomplete, errors occurred!
---
--- stderr: beluga
CMake Error at test/CMakeLists.txt:30 (find_package):
  By not providing "Findbenchmark.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "benchmark", but CMake did not find one.

  Could not find a package configuration file provided by "benchmark" with
  any of the following names:

    benchmarkConfig.cmake
    benchmark-config.cmake

  Add the installation prefix of "benchmark" to CMAKE_PREFIX_PATH or set
  "benchmark_DIR" to a directory containing one of the above files.  If
  "benchmark" provides a separate development package or SDK, be sure it has
  been installed.
---

This is happening in jazzy distro, but it actually works on humble. I also tried running it from the main branch, but it keeps throwing that error. Should I arise an issue?

@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch 2 times, most recently from fa79f0b to e591f1e Compare August 31, 2024 19:01
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codecov isn't happy because we are lacking tests :)

@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch 2 times, most recently from 9e8b397 to eec92a5 Compare September 7, 2024 02:34
@hidmic
Copy link
Collaborator

hidmic commented Sep 7, 2024

@DPR00 we should update the PR title.

@DPR00 DPR00 changed the title First draft to address #55 Extending likelihood field to model unexplored spaces #55 Sep 9, 2024
@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch from 6804e7f to 0e3fff9 Compare September 11, 2024 03:09
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing @DPR00, great job!

We should add tests now though, for the likelihood model and for the action we just added.

@hidmic hidmic marked this pull request as ready for review September 11, 2024 21:59
@hidmic
Copy link
Collaborator

hidmic commented Sep 11, 2024

This is no draft anymore, it's solid PR material.

@DPR00
Copy link
Collaborator Author

DPR00 commented Sep 11, 2024

Awesome @hidmic, thanks! I will be addressing the comments during the following days and adding tests, as well.
I also want to test it in a simulated world. Any recommendations of a world different than turtlebot_world?

@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch from 1f913d5 to 6612d46 Compare September 22, 2024 04:06
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third pass I think. Really good work @DPR00.

@hidmic
Copy link
Collaborator

hidmic commented Sep 24, 2024

This PR needs a rebase after #433.

@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch 2 times, most recently from aebeaf6 to 2911f92 Compare September 26, 2024 04:55
@DPR00
Copy link
Collaborator Author

DPR00 commented Sep 26, 2024

I did the rebase and reduce all the changes to one commit. The latter was due there were a lot of commits where the changes are no longer valid.

Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few more comments and CI is not happy, but this is a great piece of work @DPR00.

I'm happy with it once the missing bits are addressed and CI goes green (looks like clang-tidy is not happy).

@nahueespinosa nahueespinosa changed the title Extending likelihood field to model unexplored spaces #55 Extending likelihood field to model unexplored spaces Oct 2, 2024
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plain amazing. I'm good with this PR as-is. @nahueespinosa ?

Copy link
Member

@nahueespinosa nahueespinosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! After fixing forwarding references.

@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch from 78f0239 to ceee341 Compare October 4, 2024 21:26
Copy link
Member

@nahueespinosa nahueespinosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Diego Palma added 7 commits October 5, 2024 11:44
Signed-off-by: Diego Palma <dpalma@symbotic.com>
Signed-off-by: Diego Palma <dpalma@symbotic.com>
Signed-off-by: Diego Palma <dpalma@symbotic.com>
Signed-off-by: Diego Palma <dpalma@symbotic.com>
Signed-off-by: Diego Palma <dpalma@symbotic.com>
Signed-off-by: Diego Palma <dpalma@symbotic.com>
Signed-off-by: Diego Palma <dpalma@symbotic.com>
@DPR00 DPR00 force-pushed the davpr/likelihood-limitations branch from 3542c38 to 287453b Compare October 5, 2024 16:45
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DPR00 go go go 🚀

@DPR00
Copy link
Collaborator Author

DPR00 commented Oct 5, 2024

I am not able to merge it because I need to be an authorized user. Could you merge it @hidmic, pls? 🚀

@hidmic hidmic merged commit 64026d9 into main Oct 5, 2024
11 checks passed
@hidmic hidmic deleted the davpr/likelihood-limitations branch October 5, 2024 19:05
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.

4 participants