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

Depth image renderer #89

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
776bfe2
feat: Added depth extraction functionality
Divelix Oct 18, 2024
ce0d9dc
Merge remote-tracking branch 'origin/feature/add_py_typed_marker_file…
victorreijgwart Oct 24, 2024
c352f73
Run pre-commit and address warnings
victorreijgwart Oct 24, 2024
fea5914
Draft support for multi-threading
victorreijgwart Oct 24, 2024
97525ec
Group parallel ray casts into tiles to reduce job dispatch overhead
victorreijgwart Oct 28, 2024
b342a2f
Merge pull request #81 from Divelix/raycast
victorreijgwart Nov 18, 2024
b6a10c9
Cleaner handling of features provided by optional dependencies in CMake
victorreijgwart Dec 5, 2024
385961c
Refactor param loaders and converters for consistency and extensibility
victorreijgwart Dec 5, 2024
d4e8edb
Add optional yaml parsing support
victorreijgwart Dec 5, 2024
ddbab43
Communicate failure using std::optional
victorreijgwart Dec 5, 2024
b2d1f4f
Add tests for param loading from yaml files
victorreijgwart Dec 5, 2024
7e39068
Fix outdated include path
victorreijgwart Dec 5, 2024
1fc20a8
Add an example on how to run the mapping pipeline through the C++ API
victorreijgwart Dec 5, 2024
43d1a50
Update the documentation
victorreijgwart Dec 5, 2024
f3846f9
Address GCC CI warnings
victorreijgwart Dec 5, 2024
9d5df86
Merge branch 'main' into feature/depth_image_renderer
victorreijgwart Dec 5, 2024
8f28aad
Update factories to consistently pass subconfigs to subfactories
victorreijgwart Dec 5, 2024
60983e7
Merge branch 'feature/cpp_api_yaml_support' into feature/depth_image_…
victorreijgwart Dec 5, 2024
21a6143
Move code to C++ library and add support for other projection models
victorreijgwart Dec 5, 2024
730cb28
Remove option to use a non-zero min_range in the ray casting renderer
victorreijgwart Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the documentation
  • Loading branch information
victorreijgwart committed Dec 5, 2024
commit 43d1a5066003bd2637d7e618e6b6434ba0955b2b
15 changes: 15 additions & 0 deletions docs/pages/tutorials/cpp.rst
Original file line number Diff line number Diff line change
@@ -40,6 +40,21 @@ Code examples
*************
In the following sections, you'll find sample code for common tasks. If you'd like to request examples for additional tasks or contribute new examples, please don't hesitate to `contact us <https://github.com/ethz-asl/wavemap/issues>`_.

Mapping
=======
The only requirements to build wavemap maps are that you have a set of

1. depth measurements,
2. sensor pose (estimates) for each measurement.

We usually use depth measurements from depth cameras or 3D LiDARs, but any source would work as long as a corresponding :ref:`projection <configuration_projection_models>` and :ref:`measurement <configuration_measurement_models>` model is available. To help you get started quickly, we provide example configs for various sensor setups :gh_file:`here <interfaces/ros1/wavemap_ros/config>`. An overview of all the available settings is provided on the :doc:`parameters page <../parameters/index>`.

Example pipeline
----------------

.. literalinclude:: ../../../examples/cpp/mapping/example_pipeline.cc
:language: cpp

Serializing maps
================
In this section, we'll demonstrate how to serialize and deserialize maps using wavemap's lightweight and efficient binary format. This format is consistent across wavemap's C++, Python, and ROS interfaces. For instance, you can create maps on a robot with ROS and later load them into a rendering engine plugin that only depends on wavemap's C++ library.
6 changes: 3 additions & 3 deletions examples/cpp/mapping/example_pipeline.cc
Original file line number Diff line number Diff line change
@@ -63,14 +63,14 @@ int main(int, char** argv) {
// NOTE: Alternatively, the rotation can also be loaded from a rotation
// matrix, or T_W_C can be initialized from a transformation matrix.

// Integrate a depth image
// Integrate the measurement
pipeline.runPipeline({"your_camera"}, PosedImage<>{T_W_C, depth_image});

// See if the map was updated
// Measure the map's size
const size_t map_size_KB = map->getMemoryUsage() / 1024;
std::cout << "Created map of size: " << map_size_KB << " KB" << std::endl;

// Save map
// Save the map to disk
std::cout << "Saving it to: " << output_map_path << std::endl;
io::mapToFile(*map, output_map_path);
}