Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit e0f1e9e

Browse files
authored
Merge pull request #1 from estherag/rolling
Add octomap maps builder
2 parents c6d3116 + 4d96d87 commit e0f1e9e

13 files changed

Lines changed: 4360 additions & 0 deletions

File tree

.github/Doxyfile

Lines changed: 2660 additions & 0 deletions
Large diffs are not rendered by default.

.github/thirdparty.repos

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repositories:
2+
ThirdParty/EasyNavigation:
3+
type: git
4+
url: https://github.com/EasyNavigation/EasyNavigation.git
5+
version: rolling

.github/workflows/doxygen-doc.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Doxygen Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- rolling
7+
schedule:
8+
- cron: '0 0 * * 6'
9+
workflow_dispatch:
10+
11+
jobs:
12+
doxygen_generation:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
- name: Generate Doxygen for EasyNav Costmap Stack
22+
uses: mattnotmitt/doxygen-action@edge
23+
with:
24+
doxyfile-path: ".github/Doxyfile"
25+
26+
- name: Doxygen Deployment
27+
uses: peaceiris/actions-gh-pages@v4
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_branch: gh-pages
31+
publish_dir: docs/html

.github/workflows/rolling.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: rolling
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- rolling
7+
push:
8+
branches:
9+
- rolling
10+
schedule:
11+
- cron: '0 0 * * 6'
12+
jobs:
13+
build-and-test:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-24.04]
18+
fail-fast: false
19+
steps:
20+
- name: Repo checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup ROS 2
24+
uses: ros-tooling/setup-ros@0.7.13
25+
with:
26+
required-ros-distributions: rolling
27+
28+
- name: build and test
29+
uses: ros-tooling/action-ros-ci@0.4.3
30+
with:
31+
package-name: easynav_octomap_maps_builder
32+
target-ros2-distro: rolling
33+
vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/thirdparty.repos
34+
colcon-defaults: |
35+
{
36+
"test": {
37+
"parallel-workers" : 1
38+
}
39+
}
40+
colcon-mixin-name: coverage-gcc
41+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
42+
43+
- name: Codecov
44+
uses: codecov/codecov-action@v5.4.2
45+
with:
46+
files: ros_ws/lcov/total_coverage.info
47+
flags: unittests
48+
name: codecov-umbrella
49+
# yml: ./codecov.yml
50+
fail_ci_if_error: false

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# easynav_octomap_stack
2+
3+
This stack is part of the Easy Navigation (EasyNav) project developed by the Intelligent Robotics Lab. Ir building elevation grid maps
4+
from point cloud data. The node subscribes to a sensor topic, processes the incoming point cloud data, downsamples it, and
5+
publishes a grid_map_msgs::msg::GridMap message.
6+
7+
It is composed of the **octomap_maps_builder** package and the **octomap_maps_manager** package (currently under construction).
8+
9+
The `OctomapMapsBuilderNode` subscribes to sensor point cloud topics, processes and filters the data, and incrementally builds an Octomap representation of the environment. It publishes the resulting maps as ROS messages in both binary and full map formats.
10+
11+
12+
## Installation
13+
14+
Clone the repository into your ROS 2 workspace:
15+
```bash
16+
cd ~/ros2_ws/src
17+
git clone https://github.com/EasyNavigation/easynav_octomap_stack.git
18+
cd ..
19+
rosdep install --from-paths src --ignore-src -r -y
20+
colcon build --packages-select easynav_octomap_maps_builder
21+
```
22+
23+
## Usage
24+
25+
Source your workspace:
26+
```bash
27+
source ~/ros2_ws/install/setup.bash
28+
```
29+
Run the lifecycle node:
30+
```bash
31+
ros2 run easynav_octomap_maps_builder octomap_maps_builder_node
32+
```
33+
34+
## Parameters
35+
36+
| Parameter | Type | Default | Description |
37+
|-------------------------|--------|--------------|------------------------------------------------|
38+
| `sensor_topic` | string | `"map"` | Topic name for incoming sensor point clouds. |
39+
| `downsample_resolution` | double | `1.0` | Downsampling resolution for input point clouds.|
40+
| `perception_default_frame` | string | `"map"` | Default target frame for perception fusion. |
41+
| `sensor_model.max_range`| double | `90.0` | Maximum sensor range for raycasting. |
42+
| `resolution` | double | `1.0` | Resolution of the OctoMap octree. |
43+
| `base_frame_id` | string | `"base_link"`| Robot base frame ID. |
44+
| `occupancy_min_z` | double | `0.1` | Minimum z height for occupancy filtering. |
45+
| `occupancy_max_z` | double | `10.0` | Maximum z height for occupancy filtering. |
46+
| `publish_binary_map` | bool | `true` | Enable publishing of binary octomap message. |
47+
| `publish_full_map` | bool | `true` | Enable publishing of full octomap message. |
48+
| `world_frame_id` | string | `"map"` | Global coordinate frame for map integration. |
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
project(easynav_octomap_maps_builder)
3+
4+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
add_compile_options(-Wall -Wextra -Wpedantic)
6+
endif()
7+
8+
set(CMAKE_CXX_STANDARD 23)
9+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
10+
set(CMAKE_CXX_EXTENSIONS OFF)
11+
12+
# Dependencies
13+
find_package(ament_cmake REQUIRED)
14+
find_package(rclcpp REQUIRED)
15+
find_package(rclcpp_lifecycle REQUIRED)
16+
find_package(sensor_msgs REQUIRED)
17+
find_package(tf2 REQUIRED)
18+
find_package(tf2_ros REQUIRED)
19+
find_package(easynav_common REQUIRED)
20+
find_package(octomap_msgs REQUIRED)
21+
find_package(octomap_ros REQUIRED)
22+
find_package(pcl_conversions REQUIRED)
23+
find_package(pcl_ros REQUIRED)
24+
find_package(visualization_msgs REQUIRED)
25+
26+
find_package(PCL REQUIRED)
27+
include_directories(${PCL_INCLUDE_DIRS})
28+
29+
find_package(ament_cmake_auto REQUIRED)
30+
ament_auto_find_build_dependencies()
31+
find_package(OCTOMAP REQUIRED)
32+
33+
34+
set(dependencies
35+
rclcpp
36+
rclcpp_lifecycle
37+
sensor_msgs
38+
tf2
39+
tf2_ros
40+
octomap_ros
41+
octomap_msgs
42+
pcl_conversions
43+
pcl_ros
44+
easynav_common
45+
)
46+
47+
48+
include_directories(include)
49+
50+
51+
# Library
52+
add_library(${PROJECT_NAME} SHARED
53+
src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp
54+
)
55+
ament_target_dependencies(${PROJECT_NAME} ${dependencies})
56+
57+
target_link_libraries(${PROJECT_NAME}
58+
${OCTOMAP_LIBRARIES}
59+
${PCL_LIBRARIES}
60+
)
61+
62+
# Executable
63+
add_executable(octomap_maps_builder_main src/octomap_maps_builder_main.cpp)
64+
ament_target_dependencies(octomap_maps_builder_main ${dependencies})
65+
target_link_libraries(octomap_maps_builder_main ${PROJECT_NAME})
66+
67+
# Install headers
68+
install(DIRECTORY include/
69+
DESTINATION include/
70+
)
71+
72+
# Install targets
73+
install(TARGETS
74+
${PROJECT_NAME}
75+
octomap_maps_builder_main
76+
ARCHIVE DESTINATION lib
77+
LIBRARY DESTINATION lib
78+
RUNTIME DESTINATION lib/${PROJECT_NAME}
79+
)
80+
81+
# Tests
82+
if(BUILD_TESTING)
83+
find_package(ament_lint_auto REQUIRED)
84+
set(ament_cmake_copyright_FOUND TRUE)
85+
set(ament_cmake_cpplint_FOUND TRUE)
86+
ament_lint_auto_find_test_dependencies()
87+
88+
find_package(ament_cmake_gtest REQUIRED)
89+
add_subdirectory(tests)
90+
endif()
91+
92+
# Export
93+
ament_export_include_directories(include)
94+
ament_export_libraries(${PROJECT_NAME})
95+
ament_export_dependencies(${dependencies})
96+
97+
ament_package()

0 commit comments

Comments
 (0)