Skip to content
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7505486
Use multithreaded executor so layers can use different callback groups
JustusBraun Mar 5, 2025
38c2bd2
Create LayerManager to load, initialize and handle layers
JustusBraun Mar 12, 2025
96f8552
WIP: Layer updates
JustusBraun Mar 16, 2025
d2f041e
Ensure layer updates are not published before initialization finished
JustusBraun Mar 16, 2025
de7f7ff
Add notifyChanged call in combination layers
JustusBraun Mar 17, 2025
de87afd
Add readLock() and writeLock() functions to layer interface for
JustusBraun Mar 23, 2025
6440206
Switch map_ptr_ to std::weak_ptr to prevent cyclic dependencies.
JustusBraun Mar 23, 2025
d37d9b6
Add LayerTimer to allow layers to log locking, update and notifyChange
JustusBraun Mar 23, 2025
fae057a
Unique logger for each layer provided by AbstractLayer
JustusBraun Mar 24, 2025
46156b1
Add dynamic_obstacle_layer to implement optimizations
JustusBraun Mar 25, 2025
c978366
Remove weak_ptr overhead and in loop vector allocations
JustusBraun Mar 25, 2025
a1bec6c
Downcast Mesh and remove vector field publish
JustusBraun Mar 25, 2025
3d19157
Reduce the number of faces checkd for each neighbour vertex
JustusBraun Mar 25, 2025
f747a34
Remove unused vertex maps, set log levels to debug
JustusBraun Mar 25, 2025
8aef90d
Add check if downcast was successful
JustusBraun Mar 25, 2025
0ea8330
Improve default layer update performance by updating only changed
JustusBraun Mar 26, 2025
f3acf8f
Changed writeLock to a protected function. The only logic that should…
JustusBraun Mar 28, 2025
660c10d
The layer update can now be done without needing the writeLock for the
JustusBraun Mar 28, 2025
13a2be2
Added check to detect if a Non-Manifold Mesh was used as input
JustusBraun Apr 6, 2025
0ea1471
Switch log msg to debug
JustusBraun Apr 7, 2025
0c9cfb9
Set cost of lethal vertices to 1.0 and enable OpenMP for faster
JustusBraun Apr 11, 2025
a7c05f7
Fix vertex color loading and publishing
JustusBraun May 27, 2025
e97557f
Add check if the edge_weights map contains the keys
JustusBraun May 27, 2025
09b4b87
Handle non-manifold meshes during Map load
JustusBraun May 30, 2025
6b7ab87
Fix combination layer lethal vertex handling
JustusBraun Jul 13, 2025
e093a9e
Remove explicit initialization for all map values
JustusBraun Jul 14, 2025
ea5776a
Propagate timestamps through notifyChanged and updateInput calls
JustusBraun Jul 16, 2025
c1442bf
Post merge clean up and fixes
JustusBraun Aug 8, 2025
230e8bf
Apply runtime improvements from dynamic_inflation_layer to inflation_…
JustusBraun Aug 8, 2025
aad1e2e
Remove DynamicInflationLayer
JustusBraun Aug 8, 2025
a496eb6
Add note why we do not normalize the combined costs
JustusBraun Aug 11, 2025
17d48d0
Add note on why we use a multithreaded executor
JustusBraun Aug 13, 2025
cb2ccc3
Change AbstractLayer::costs() and AbstractLayer::lethals() to return
JustusBraun Aug 13, 2025
9e887a3
Merge pull request #83 from JustusBraun/feature/dynamic-cost-updates
amock Aug 15, 2025
c26c942
Add ObstacleLayer
JustusBraun Aug 15, 2025
d87078d
Move lvr2 raycaster to MeshMap to allow multiple plugins to share the…
JustusBraun Aug 17, 2025
e790735
Use robot's down axis as projection vector
JustusBraun Aug 17, 2025
ee913e6
Merge pull request #85 from JustusBraun/feature/dynamic-cost-updates
JustusBraun Aug 17, 2025
32a9d22
Rename CombinationLayer -> AvgCombinationLayer
JustusBraun Sep 7, 2025
6d15786
Add exception handling when writing layers to file
JustusBraun Sep 9, 2025
c0e4786
merge main
amock Sep 10, 2025
172b6ca
v3.0.0
amock Sep 10, 2025
72e0037
changelog mbf_mesh_nav
amock Sep 10, 2025
e60fd92
Change cost limit to ignore vertices at or above the cost limit
JustusBraun Sep 10, 2025
578fbce
Remove floating point range from lethal and inscribed cost parameters.
JustusBraun Sep 10, 2025
749b9e7
post fixes and cleanup
amock Sep 10, 2025
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ The package structure is as follows:
- ClearanceLayer - `mesh_layers/ClearanceLayer`
- InflationLayer - `mesh_layers/InflationLayer`
- BorderLayer - `mesh_layers/BorderLayer`
- ObstacleLayer - `mesh_layers/ObstacleLayer`

- `dijkstra_mesh_planner` contains a mesh planner plugin providing a path planning method based on Dijkstra's algorithm. It plans by using the edges of the mesh map. The propagation start a the goal pose, thus a path from every accessed vertex to the goal pose can be computed. This leads to a sub-optimal potential field, which highly depends on the mesh structure.

Expand All @@ -125,6 +126,7 @@ The following table gives an overview of all currently implemented layer plugins
| **ClearanceLayer** | `mesh_layers/ClearanceLayer` | comparison of robot height and clearance along each vertex normal | ![ClearanceLayer](docs/images/costlayers/clearance.jpg?raw=true "Clearance Layer") |
| **InflationLayer** | `mesh_layers/InflationLayer` | by distance to a lethal vertex | ![InflationLayer](docs/images/costlayers/inflation.jpg?raw=true "Inflation Layer") |
| **BorderLayer** | `mesh_layers/BorderLayer` | give vertices close to the border a certain cost | ![BorderLayer](docs/images/costlayers/border.png?raw=true "Border Layer") |
| **ObstacleLayer** | `mesh_layers/ObstacleLayer` | marks vertices blocked by dynamic obstacles as lethal. Cost layer (left) and gazebo sim with unmapped obstacle (right) | ![ObstacleLayer](docs/images/costlayers/obstacle.png?raw=true "ObstacleLayer") |

## Planners
Currently the following planners are available:
Expand Down
4 changes: 4 additions & 0 deletions cvp_mesh_planner/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package cvp_mesh_planner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.0.0 (2025-09-10)
------------------
* Cost-aware planning

2.0.1 (2025-08-11)
------------------
* Bug fixes and cleanup since initial ROS 2 port
Expand Down
2 changes: 1 addition & 1 deletion cvp_mesh_planner/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>cvp_mesh_planner</name>
<version>2.0.1</version>
<version>3.0.0</version>
<description>The Continuous Vector Field Planner (CVP) mesh planner package</description>
<maintainer email="matthias.holoch@naturerobots.com">Matthias Holoch</maintainer>
<maintainer email="sebastian.puetz@naturerobots.com">Sebastian Pütz</maintainer>
Expand Down
14 changes: 7 additions & 7 deletions cvp_mesh_planner/src/cvp_mesh_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ uint32_t CVPMeshPlanner::waveFrontPropagation(const mesh_map::Vector& original_s
if (distances[current_vh] > goal_dist)
continue;

if (vertex_costs[current_vh] > config_.cost_limit)
if (vertex_costs[current_vh] >= config_.cost_limit)
continue;

if (invalid[current_vh])
Expand Down Expand Up @@ -786,8 +786,8 @@ uint32_t CVPMeshPlanner::waveFrontPropagation(const mesh_map::Vector& original_s
else if (fixed[a] && fixed[b] && !fixed[c])
{
// c is free
// Skip vertices above the cost limit
if (costs[c] > config_.cost_limit)
// Skip vertices at or above the cost limit
if (costs[c] >= config_.cost_limit)
{
continue;
}
Expand All @@ -809,8 +809,8 @@ uint32_t CVPMeshPlanner::waveFrontPropagation(const mesh_map::Vector& original_s
else if (fixed[a] && !fixed[b] && fixed[c])
{
// b is free
// Skip vertices above the cost limit
if (costs[b] > config_.cost_limit)
// Skip vertices at or above the cost limit
if (costs[b] >= config_.cost_limit)
{
continue;
}
Expand All @@ -832,8 +832,8 @@ uint32_t CVPMeshPlanner::waveFrontPropagation(const mesh_map::Vector& original_s
else if (!fixed[a] && fixed[b] && fixed[c])
{
// a if free
// Skip vertices above the cost limit
if (costs[a] > config_.cost_limit)
// Skip vertices at or above the cost limit
if (costs[a] >= config_.cost_limit)
{
continue;
}
Expand Down
4 changes: 4 additions & 0 deletions dijkstra_mesh_planner/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package dijkstra_mesh_planner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.0.0 (2025-09-10)
------------------
* Cost-aware planning

2.0.1 (2025-08-11)
------------------
* Bug fixes and cleanup since initial ROS 2 port
Expand Down
2 changes: 1 addition & 1 deletion dijkstra_mesh_planner/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>dijkstra_mesh_planner</name>
<version>2.0.1</version>
<version>3.0.0</version>
<description>The dijkstra_mesh_planner package</description>
<maintainer email="matthias.holoch@naturerobots.com">Matthias Holoch</maintainer>
<maintainer email="sebastian.puetz@naturerobots.com">Sebastian Pütz</maintainer>
Expand Down
Binary file added docs/images/costlayers/obstacle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions mbf_mesh_core/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package mbf_mesh_core
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3.0.0 (2025-09-10)
------------------

2.0.1 (2025-08-11)
------------------
Expand Down
2 changes: 1 addition & 1 deletion mbf_mesh_core/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>mbf_mesh_core</name>
<version>2.0.1</version>
<version>3.0.0</version>
<description>The mbf_mesh_core package</description>

<maintainer email="matthias.holoch@naturerobots.com">Matthias Holoch</maintainer>
Expand Down
4 changes: 4 additions & 0 deletions mbf_mesh_nav/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package mbf_mesh_nav
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.0.0 (2025-09-10)
------------------
* Multi-threaded executor

2.0.1 (2025-08-11)
------------------
* Bug fixes and cleanup since initial ROS 2 port
Expand Down
2 changes: 1 addition & 1 deletion mbf_mesh_nav/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>mbf_mesh_nav</name>
<version>2.0.1</version>
<version>3.0.0</version>
<description>The mbf_mesh_nav package</description>

<maintainer email="matthias.holoch@naturerobots.com">Matthias Holoch</maintainer>
Expand Down
7 changes: 6 additions & 1 deletion mbf_mesh_nav/src/mbf_mesh_nav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <signal.h>
#include <tf2_ros/transform_listener.h>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/executors/multi_threaded_executor.hpp>

mbf_mesh_nav::MeshNavigationServer::Ptr mesh_nav_srv_ptr;
rclcpp::Node::SharedPtr node;
Expand Down Expand Up @@ -66,7 +67,11 @@ int main(int argc, char** argv)

signal(SIGINT, sigintHandler);

rclcpp::spin(node);
// NOTE: Using a multithreaded executor is recommended so cost layers can use
// different callback groups when processing sensor data.
rclcpp::executors::MultiThreadedExecutor exec;
exec.add_node(node);
exec.spin();

return EXIT_SUCCESS;
}
3 changes: 3 additions & 0 deletions mesh_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mesh_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.0.0 (2025-09-10)
------------------

2.0.1 (2025-08-11)
------------------
* Bug fixes and cleanup since initial ROS 2 port
Expand Down
2 changes: 1 addition & 1 deletion mesh_controller/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>mesh_controller</name>
<version>2.0.1</version>
<version>3.0.0</version>
<description>The mesh_controller package</description>

<maintainer email="matthias.holoch@naturerobots.com">Matthias Holoch</maintainer>
Expand Down
4 changes: 4 additions & 0 deletions mesh_layers/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package mesh_layers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.0.0 (2025-09-10)
------------------
* Graph Layer System

2.0.1 (2025-08-11)
------------------
* Bug fixes and cleanup since initial ROS 2 port
Expand Down
16 changes: 16 additions & 0 deletions mesh_layers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endif()
find_package(ament_cmake_ros REQUIRED)
find_package(mesh_map REQUIRED)
find_package(LVR2 REQUIRED)
find_package(OpenMP)
add_definitions(${LVR2_DEFINITIONS})

pluginlib_export_plugin_description_file(mesh_map mesh_layers.xml)
Expand All @@ -23,6 +24,8 @@ add_library(${PROJECT_NAME}
src/steepness_layer.cpp
src/ridge_layer.cpp
src/clearance_layer.cpp
src/combination_layer.cpp
src/obstacle_layer.cpp
)
include_directories(
include
Expand All @@ -38,6 +41,7 @@ ament_target_dependencies(${PROJECT_NAME} mesh_map LVR2)
target_compile_definitions(${PROJECT_NAME} PRIVATE "MESH_LAYERS_BUILDING_LIBRARY")
target_link_libraries(${PROJECT_NAME}
${LVR2_LIBRARIES}
OpenMP::OpenMP_CXX
)

install(DIRECTORY include/
Expand All @@ -51,6 +55,18 @@ install(TARGETS
RUNTIME DESTINATION bin
)

if (BUILD_TESTING)
# Add GTest tests
find_package(ament_cmake_gtest REQUIRED)

ament_add_gtest(${PROJECT_NAME}_inflation_layer_test test/inflation_layer_test.cpp)
target_include_directories(${PROJECT_NAME}_inflation_layer_test PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(${PROJECT_NAME}_inflation_layer_test ${PROJECT_NAME})
endif()

ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_dependencies(mesh_map)
Expand Down
12 changes: 2 additions & 10 deletions mesh_layers/include/mesh_layers/border_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,18 @@ class BorderLayer : public mesh_map::AbstractLayer
*
* @return calculated costmap
*/
virtual lvr2::VertexMap<float>& costs() override;
virtual const lvr2::VertexMap<float>& costs() override;

/**
* @brief deliver set containing all vertices marked as lethal
*
* @return lethal vertices
*/
virtual std::set<lvr2::VertexHandle>& lethals() override
virtual const std::set<lvr2::VertexHandle>& lethals() override
{
return lethal_vertices_;
}

/**
* @brief update set of lethal vertices by adding and removing vertices
*
* @param added_lethal vertices to be marked as lethal
* @param removed_lethal vertices to be removed from the set of lethal vertices
*/
virtual void updateLethal(std::set<lvr2::VertexHandle>& added_lethal, std::set<lvr2::VertexHandle>& removed_lethal) override {};

/**
* @brief initializes this layer plugin
*
Expand Down
12 changes: 2 additions & 10 deletions mesh_layers/include/mesh_layers/clearance_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,18 @@ class ClearanceLayer : public mesh_map::AbstractLayer
*
* @return calculated costmap
*/
virtual lvr2::VertexMap<float>& costs() override;
virtual const lvr2::VertexMap<float>& costs() override;

/**
* @brief deliver set containing all vertices marked as lethal
*
* @return lethal vertices
*/
virtual std::set<lvr2::VertexHandle>& lethals() override
virtual const std::set<lvr2::VertexHandle>& lethals() override
{
return lethal_vertices_;
}

/**
* @brief update set of lethal vertices by adding and removing vertices
*
* @param added_lethal vertices to be marked as lethal
* @param removed_lethal vertices to be removed from the set of lethal vertices
*/
virtual void updateLethal(std::set<lvr2::VertexHandle>& added_lethal, std::set<lvr2::VertexHandle>& removed_lethal) override {};

/**
* @brief initializes this layer plugin
*
Expand Down
Loading