-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 1D particle filter tutorial code (#362)
### Proposed changes Related to #305, split from #340. #### Type of change - [ ] 🐛 Bugfix (change which fixes an issue) - [x] 🚀 Feature (change which adds functionality) - [ ] 📚 Documentation (change which fixes or extends documentation) ### Checklist - [x] Lint and unit tests (if any) pass locally with my changes - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added necessary documentation (if appropriate) - [x] All commits have been signed for [DCO](https://developercertificate.org/) --------- Signed-off-by: Alon Druck <alon.druck@ekumenlabs.com>
- Loading branch information
Showing
6 changed files
with
429 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright 2024 Ekumen, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(beluga_tutorial) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
message(STATUS "Setting build type to 'Release' as none was specified.") | ||
set(CMAKE_BUILD_TYPE | ||
"Release" | ||
CACHE STRING "Build type" FORCE) | ||
endif() | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options( | ||
-Wall | ||
-Wconversion | ||
-Wextra | ||
-Werror | ||
-Wpedantic) | ||
endif() | ||
|
||
find_package(beluga REQUIRED) | ||
find_package(yaml_cpp_vendor REQUIRED) | ||
|
||
include_directories(include) | ||
|
||
add_executable(${PROJECT_NAME} src/main.cpp) | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> ${yaml_cpp_vendor_INCLUDE_DIRS}) | ||
|
||
target_link_libraries(${PROJECT_NAME} beluga::beluga yaml-cpp) | ||
|
||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION lib/${PROJECT_NAME}) |
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,24 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>beluga_tutorial</name> | ||
<version>1.0.0</version> | ||
|
||
<description>Primer on Particle Filtering with Beluga.</description> | ||
|
||
<maintainer email="glpuga@ekumenlabs.com">Gerardo Puga</maintainer> | ||
<maintainer email="michel@ekumenlabs.com">Michel Hidalgo</maintainer> | ||
<maintainer email="nespinosa@ekumenlabs.com">Nahuel Espinosa</maintainer> | ||
<maintainer email="alon.druck@ekumenlabs.com">Alon Druck</maintainer> | ||
|
||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>cmake</buildtool_depend> | ||
|
||
<depend>beluga</depend> | ||
<depend>yaml_cpp_vendor</depend> | ||
|
||
<export> | ||
<build_type>cmake</build_type> | ||
</export> | ||
</package> |
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,26 @@ | ||
map_size: 100 # Size of the map in [m] | ||
number_of_doors: 15 | ||
number_of_particles: 300 # Fixed number of particles | ||
number_of_cycles: 100 | ||
initial_position: 0.0 #[m] | ||
initial_position_sd: 20.0 | ||
dt: 1.0 #[s] | ||
velocity: 1.0 #[m/s] | ||
translation_sd: 1.0 | ||
sensor_range: 3.0 # Sensor range of view in [m] | ||
sensor_model_sigma: 1.0 | ||
min_particle_weight: 0.08 | ||
record_path: "./record.yaml" | ||
|
||
landmark_map: | ||
- 5 | ||
- 12 | ||
- 25 | ||
- 37 | ||
- 52 | ||
- 55 | ||
- 65 | ||
- 74 | ||
- 75 | ||
- 87 | ||
- 97 |
Oops, something went wrong.