-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from ethz-asl/feature/optimize_chunked_integrator
Optimize integrators, Rviz plugin and add usage examples
- Loading branch information
Showing
224 changed files
with
4,284 additions
and
2,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ARG VERSION=latest | ||
|
||
FROM ghcr.io/ethz-asl/wavemap:${VERSION} | ||
|
||
# Install dependencies | ||
# hadolint ignore=DL3008 | ||
RUN apt-get update && apt-get install -yq --no-install-recommends curl sudo && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install CLion in the container | ||
ARG CLION_VERSION=2023.2 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
# hadolint ignore=DL3003 | ||
RUN mkdir -p /opt/clion && \ | ||
curl -L "https://download.jetbrains.com/cpp/CLion-${CLION_VERSION}.tar.gz" \ | ||
| tar -C /opt/clion --strip-components 1 -xzvf - && \ | ||
cd /opt/clion/bin && ./remote-dev-server.sh registerBackendLocationForGateway | ||
|
||
# Create a non-root user | ||
ARG USERNAME=ci | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
RUN groupadd --gid $USER_GID $USERNAME && \ | ||
useradd --uid $USER_UID --gid $USER_GID $USERNAME && \ | ||
chown -R $USERNAME:$USERNAME /home/$USERNAME && \ | ||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \ | ||
chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# Make CLion available to the current user | ||
USER $USERNAME | ||
# hadolint ignore=DL3003 | ||
RUN cd /opt/clion/bin && ./remote-dev-server.sh registerBackendLocationForGateway | ||
|
||
# Prebuild the package | ||
RUN catkin build wavemap_all | ||
|
||
# Make root the default user | ||
# NOTE: This is currently required for CLion's local deployment procedure to work. | ||
# hadolint ignore=DL3002 | ||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"forwardPorts": [], | ||
"workspaceFolder": "/home/ci/catkin_ws/src", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ci/catkin_ws/src,type=bind,consistency=cached", | ||
"runArgs": ["--env-file", "${localWorkspaceFolder}/.devcontainer/clion/ros_env.list"], | ||
"remoteUser": "ci" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This is a workaround for CLion not allowing files to be sourced | ||
# (~/catkin_ws/devel/setup.bash) before launching the remote IDE handler. | ||
ROS_VERSION=1 | ||
ROS_DISTRO=noetic | ||
ROS_PYTHON_VERSION=3 | ||
ROS_ROOT=/opt/ros/noetic/share/ros | ||
ROS_MASTER_URI=http://localhost:11311 | ||
ROS_PACKAGE_PATH=/home/ci/catkin_ws/src/dependencies/catkin_simple:/home/ci/catkin_ws/src/dependencies/eigen_catkin:/home/ci/catkin_ws/src/dependencies/gflags_catkin:/home/ci/catkin_ws/src/dependencies/glog_catkin:/home/ci/catkin_ws/src/dependencies/eigen_checks:/home/ci/catkin_ws/src/dependencies/minkindr/minkindr:/home/ci/catkin_ws/src/wavemap/libraries/wavemap:/home/ci/catkin_ws/src/wavemap/tooling/packages/wavemap_all:/home/ci/catkin_ws/src/wavemap/libraries/wavemap_io:/home/ci/catkin_ws/src/wavemap/ros/wavemap_msgs:/home/ci/catkin_ws/src/wavemap/ros/wavemap_ros_conversions:/home/ci/catkin_ws/src/wavemap/ros/wavemap_ros:/home/ci/catkin_ws/src/wavemap/ros/wavemap_rviz_plugin:/home/ci/catkin_ws/src/wavemap/tooling/packages/wavemap_utils:/opt/ros/noetic/share | ||
CMAKE_PREFIX_PATH=/home/ci/catkin_ws/devel:/opt/ros/noetic | ||
PKG_CONFIG_PATH=/home/ci/catkin_ws/devel/lib/pkgconfig:/opt/ros/noetic/lib/pkgconfig | ||
PYTHONPATH=/home/ci/catkin_ws/devel/lib/python3/dist-packages:/opt/ros/noetic/lib/python3/dist-packages | ||
LD_LIBRARY_PATH=/home/ci/catkin_ws/devel/lib:/opt/ros/noetic/lib | ||
PATH=/home/ci/catkin_ws/devel/bin:/opt/ros/noetic/bin:/usr/lib/ccache:/usr/lib/ccache:/home/ci/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ci/repos/linter/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ARG VERSION=latest | ||
|
||
FROM ghcr.io/ethz-asl/wavemap:${VERSION} | ||
|
||
# Create a non-root user and make it the default user | ||
ARG USERNAME=ci | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
RUN groupadd --gid $USER_GID $USERNAME && \ | ||
useradd --uid $USER_UID --gid $USER_GID $USERNAME && \ | ||
chown -R $USERNAME:$USERNAME /home/$USERNAME && \ | ||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \ | ||
chmod 0440 /etc/sudoers.d/$USERNAME | ||
USER $USERNAME | ||
|
||
# Build the package | ||
RUN catkin build wavemap_all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"forwardPorts": [], | ||
"workspaceFolder": "/home/ci/catkin_ws/src/wavemap", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ci/catkin_ws/src/wavemap,type=bind,consistency=cached", | ||
"containerUser": "ci", | ||
"remoteUser": "ci" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
FAQ | ||
### | ||
|
||
We do not yet have FAQs. | ||
If you have a question that is not yet answered below, feel free to open a `GitHub Issue <https://github.com/ethz-asl/wavemap/issues>`_ or contact us over email. | ||
|
||
If you have a question, please do not hesitate to open a `GitHub Issue <https://github.com/ethz-asl/wavemap/issues>`_. | ||
How do I query if a point in the map is occupied? | ||
================================================= | ||
Please see the :doc:`usage examples <usage_examples>` on :ref:`interpolation <examples-interpolation>` and :ref:`classification <examples-classification>`. | ||
|
||
Does wavemap support (Euclidean) Signed Distance Fields? | ||
======================================================== | ||
Not yet, but we will add this feature in the near future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,68 @@ | ||
Code examples | ||
############# | ||
Usage examples | ||
############## | ||
|
||
Examples of how to use wavemap's API to save, load and query maps are coming soon. We also intend to add examples of how to use wavemap for common tasks including collision checking and path planning. | ||
Serialization | ||
************* | ||
|
||
Files | ||
===== | ||
Saving maps to files: | ||
|
||
.. literalinclude:: ../../examples/src/io/save_map_to_file.cc | ||
:language: c++ | ||
|
||
Loading maps from files: | ||
|
||
.. literalinclude:: ../../examples/src/io/load_map_from_file.cc | ||
:language: c++ | ||
|
||
ROS msgs | ||
======== | ||
Receiving maps over ROS topics: | ||
|
||
.. literalinclude:: ../../examples/src/io/receive_map_over_ros.cc | ||
:language: c++ | ||
|
||
Sending maps over ROS topics: | ||
|
||
.. literalinclude:: ../../examples/src/io/send_map_over_ros.cc | ||
:language: c++ | ||
|
||
Queries | ||
******* | ||
|
||
Fixed resolution | ||
================ | ||
.. literalinclude:: ../../examples/src/queries/fixed_resolution.cc | ||
:language: c++ | ||
|
||
Multi-res averages | ||
================== | ||
.. literalinclude:: ../../examples/src/queries/multi_resolution.cc | ||
:language: c++ | ||
|
||
Accelerators | ||
============ | ||
.. literalinclude:: ../../examples/src/queries/accelerated_queries.cc | ||
:language: c++ | ||
|
||
Interpolation | ||
============= | ||
.. _examples-interpolation: | ||
|
||
Nearest neighbor interpolation: | ||
|
||
.. literalinclude:: ../../examples/src/queries/nearest_neighbor_interpolation.cc | ||
:language: c++ | ||
|
||
Trilinear interpolation: | ||
|
||
.. literalinclude:: ../../examples/src/queries/trilinear_interpolation.cc | ||
:language: c++ | ||
|
||
Classification | ||
============== | ||
.. _examples-classification: | ||
|
||
.. literalinclude:: ../../examples/src/queries/classification.cc | ||
:language: c++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package wavemap_examples | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1.6.0 (2023-10-17) | ||
------------------ | ||
* Add initial usage examples | ||
* Address clang-tidy unused variable warnings | ||
* Contributors: Victor Reijgwart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
project(wavemap_examples) | ||
|
||
find_package(catkin_simple REQUIRED) | ||
catkin_simple(ALL_DEPS_REQUIRED) | ||
|
||
# Compiler definitions and options | ||
add_wavemap_compile_definitions_and_options() | ||
add_compile_options(-Wno-suggest-attribute=const) | ||
|
||
# For all targets | ||
include_directories(include) | ||
|
||
# Binaries | ||
cs_add_executable(save_map_to_file | ||
src/io/save_map_to_file.cc) | ||
cs_add_executable(load_map_from_file | ||
src/io/load_map_from_file.cc) | ||
cs_add_executable(receive_map_over_ros | ||
src/io/receive_map_over_ros.cc) | ||
cs_add_executable(send_map_over_ros | ||
src/io/send_map_over_ros.cc) | ||
|
||
cs_add_executable(fixed_resolution | ||
src/queries/fixed_resolution.cc) | ||
cs_add_executable(multi_resolution | ||
src/queries/multi_resolution.cc) | ||
cs_add_executable(accelerated_queries | ||
src/queries/accelerated_queries.cc) | ||
|
||
cs_add_executable(nearest_neighbor_interpolation | ||
src/queries/nearest_neighbor_interpolation.cc) | ||
cs_add_executable(trilinear_interpolation | ||
src/queries/trilinear_interpolation.cc) | ||
|
||
cs_add_executable(classification | ||
src/queries/classification.cc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Examples | ||
|
||
Welcome! We're glad you're interested in using wavemap. | ||
|
||
To get started, we recommend taking a look at the [Usage examples](https://ethz-asl.github.io/wavemap/pages/usage_examples.html) documentation page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
root=. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef WAVEMAP_EXAMPLES_COMMON_H_ | ||
#define WAVEMAP_EXAMPLES_COMMON_H_ | ||
|
||
namespace wavemap::examples { | ||
/** | ||
* A placeholder method used to illustrate where the user would use a value. | ||
* Concretely, this method is also used to suppress 'unused variable' warnings | ||
* issued by GCC when compiling the usage examples. | ||
*/ | ||
template <typename... T> | ||
void doSomething([[maybe_unused]] T... t) {} | ||
} // namespace wavemap::examples | ||
|
||
#endif // WAVEMAP_EXAMPLES_COMMON_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>wavemap_examples</name> | ||
<version>1.6.0</version> | ||
<description>Usages examples for wavemap.</description> | ||
|
||
<maintainer email="[email protected]">Victor Reijgwart</maintainer> | ||
<license>BSD</license> | ||
<url>https://github.com/ethz-asl/wavemap</url> | ||
|
||
<author email="[email protected]">Victor Reijgwart</author> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
<buildtool_depend>catkin_simple</buildtool_depend> | ||
|
||
<depend>wavemap</depend> | ||
<depend>wavemap_io</depend> | ||
<depend>wavemap_msgs</depend> | ||
<depend>wavemap_ros_conversions</depend> | ||
</package> |
Oops, something went wrong.