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

Extracting exact cell occupancy alongside cell state result. #722

Open
Paskul opened this issue Jul 29, 2024 · 3 comments
Open

Extracting exact cell occupancy alongside cell state result. #722

Paskul opened this issue Jul 29, 2024 · 3 comments

Comments

@Paskul
Copy link

Paskul commented Jul 29, 2024

Feature description

I'm looking to extract the exact probability for occupancy of cells within the generating occupancy grid. I see slam_toolbox works in 3 states of occupied, free, and unknown, but I'm wondering if there is a way to extract something like hitRatio in updateCell() of Karto.h, as I believe this might be the exact value I am looking for. An example of a final product could include a state where a cell has an 80% likelihood that an obstacle exists in its current conditions (likely calculated from cellPassCnt and cellHitCnt), to be extracted as a message, and when the map updates, this value or likelihood would change, say to 70%. Working with messages in ROS2 is new to me and in the scale of this repo I'm unsure where I would implement this myself.

Implementation considerations

It might cause more harm than good to entirely replace cell state values: occupied, free, and unknown - but instead a new variable/message could be used to extract this cell probability information without replacing the entire state estimation already built. I saw a previous PR where covariance was added as a message in this topic leading to this pr, though I am still confused as to how I could implement this for my own needs.

@SteveMacenski
Copy link
Owner

SteveMacenski commented Jul 29, 2024

We do not currently expose this information in any externally consumable output. That would need to have changes to the software so that this information can be extracted and published when generating the occupancy grid in the update map thread.

I saw a previous PR where covariance was added as a message in #427 leading to #508, though I am still confused as to how I could implement this for my own needs.

I don't think either of those help you in what you're looking for. That's w.r.t. pose, not the occ grid

@Paskul
Copy link
Author

Paskul commented Jul 29, 2024

Thanks, I see. In making the code changes then, I see the OccupancyGrid with CellUpdater and I feel as if I can make immediate changes to expose hitRatio to the OccupancyGrid class, but what suggestions might you have to put this through to a message/topic? Where/how is the occupancy grid extracted to msgs in this repo?

@SteveMacenski
Copy link
Owner

I don't know how you'd like to consume that hit vs miss data, but something along the lines of the structure of the occupancy grid is probably good

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

No branches or pull requests

2 participants