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

[M3RSM] Implementation of basic classes #1

Open
wants to merge 3 commits into
base: foxy-devel
Choose a base branch
from

Conversation

LucasJSch
Copy link

Note

Please ignore the first two commits, they're related purely to structural/compiling purposes. In the future we'll work on doing that in a nice & pretty way.

Changes

The 3rd and last commit addresses the following things:

  • Adds and modifies CMakeLists accordingly
  • Declares headers for MockLookupTable and LookupTableManager and other tentative headers just as a POC. More on these classes below this list.
  • Implements MockLookupTable and LookupTableManager.
  • Adds unit tests for the 2 new classes.

On mocked/uncomplete classes

MockLookupTable is called like that because it won't be the final version of a LookupTable. We'll start by ignoring the integration with slam_toolbox's codebase to avoid coupling problems. So we'll start directly with rasterized maps and rasterized scans, and work with those entities to make the M3RSM workflow work, as stated in Olson's paper.
Once we verify that it works, we'll start integrating our code with slam_toolbox's. I.e. we'll introduce classes such as LocalizedRangeScan as the input for the lookup tables generation and as the input to generate decimated pointclouds.

@LucasJSch LucasJSch marked this pull request as ready for review October 7, 2021 17:28
@LucasJSch
Copy link
Author

LucasJSch commented Oct 7, 2021

Tagging @hidmic for awareness. For some reason I can't add reviewers.

# configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/include/rndf_gazebo_plugin/test_config.h)

# Build gtest
add_library(gtest STATIC gtest/src/gtest-all.cc)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@LucasJSch FYI: you don't need all this, ament_add_gtest will take care of everything if used like it is used here.

}
karto::MockLookupTable lookup_table(data, 1, 2);

EXPECT_TRUE(lookup_table.isMaxResolution());
Copy link
Collaborator

Choose a reason for hiding this comment

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

@LucasJSch what's the purpose of this isMaxResolution method?

Copy link
Author

Choose a reason for hiding this comment

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

This method will be used eventually by the heap entries to determine if to continue the expansion of the search space.

Citing the paper: Each heap entry specifies which point cloud and lookup tables should be used (...). If the associated lookup table isn't the max-resolution one, the entry should expand the search space. If not, it's probably the best pose estimation entry.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. As per f2f chat, this might be redundant with the resolution attribute.

occupied_cells.emplace_back(std::make_pair(2, 0));
occupied_cells.emplace_back(std::make_pair(3, 0));

EXPECT_EQ(table.computeCost(occupied_cells), 11);
Copy link
Collaborator

Choose a reason for hiding this comment

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

@LucasJSch meta: I take that the current implementation of computeCost is a mock, correct?

Copy link
Author

Choose a reason for hiding this comment

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

Exactly. Let's talk about this off-thread.

int kernel_width_;
}; // class MockLookupTable

class LookupTableManager {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@LucasJSch meta: only to not lose track of our discussion today.

Rasterized image pyramids can be cached (or managed) for a single scan matching request, but it is not clear how and if we can cache these pyramids across scan matching requests. We could simply persist the cache but it is unlikely we'll be given the same set of reference scans often enough for the cache to be worth it. We could cache a pyramid per scan and merge them, but the candidate scan pose (and thus the search window pose) changes over time. It is hard to tell whether we can freely apply translations and rotations to decimated rasterized images or not.

How can we maximize cache hits across scan matching runs? I'll sleep on it.

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