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

Commit f295437

Browse files
committed
first commit, pc maps builder
0 parents  commit f295437

13 files changed

Lines changed: 3927 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: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.1
30+
with:
31+
package-name: easynav_outdoor_maps_builder easynav_outdoor_maps_manager easynav_vff_controller easynav_gps_localizer
32+
target-ros2-distro: rolling
33+
vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/thirdparty.repos
34+
skip-test: true
35+
colcon-defaults: |
36+
{
37+
"build": {
38+
"packages-up-to": true
39+
}
40+
}
41+
colcon-mixin-name: coverage-gcc
42+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
43+
44+
- name: Codecov
45+
uses: codecov/codecov-action@v5.4.0
46+
with:
47+
files: ros_ws/lcov/total_coverage.info
48+
flags: unittests
49+
name: codecov-umbrella
50+
# yml: ./codecov.yml
51+
fail_ci_if_error: false

LICENSE

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

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# easynav_pointcloud_stack
2+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
project(easynav_pointcloud_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(easynav_common REQUIRED)
18+
19+
set(dependencies
20+
rclcpp
21+
rclcpp_lifecycle
22+
sensor_msgs
23+
easynav_common
24+
)
25+
26+
include_directories(include)
27+
28+
# Library
29+
add_library(${PROJECT_NAME} SHARED
30+
src/easynav_pointcloud_maps_builder/PointcloudMapsBuilderNode.cpp
31+
32+
)
33+
ament_target_dependencies(${PROJECT_NAME} ${dependencies})
34+
35+
# Executable
36+
add_executable(pointcloud_maps_builder_main src/pointcloud_maps_builder_main.cpp)
37+
ament_target_dependencies(pointcloud_maps_builder_main ${dependencies})
38+
target_link_libraries(pointcloud_maps_builder_main ${PROJECT_NAME})
39+
40+
# Install headers
41+
install(DIRECTORY include/
42+
DESTINATION include/
43+
)
44+
45+
# Install targets
46+
install(TARGETS
47+
${PROJECT_NAME}
48+
pointcloud_maps_builder_main
49+
ARCHIVE DESTINATION lib
50+
LIBRARY DESTINATION lib
51+
RUNTIME DESTINATION lib/${PROJECT_NAME}
52+
)
53+
54+
# Tests
55+
if(BUILD_TESTING)
56+
find_package(ament_lint_auto REQUIRED)
57+
set(ament_cmake_copyright_FOUND TRUE)
58+
set(ament_cmake_cpplint_FOUND TRUE)
59+
ament_lint_auto_find_test_dependencies()
60+
61+
find_package(ament_cmake_gtest REQUIRED)
62+
add_subdirectory(tests)
63+
endif()
64+
65+
# Export
66+
ament_export_include_directories(include)
67+
ament_export_libraries(${PROJECT_NAME})
68+
ament_export_dependencies(${dependencies})
69+
70+
ament_package()
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#ifndef EASYNAV_OUTDOOR_MAPS_BUILDER__POINTCLOUDMAPSBUILDERNODE_HPP_
2+
#define EASYNAV_OUTDOOR_MAPS_BUILDER__POINTCLOUDMAPSBUILDERNODE_HPP_
3+
4+
#include "rclcpp/rclcpp.hpp"
5+
#include "rclcpp/macros.hpp"
6+
#include "rclcpp_lifecycle/lifecycle_node.hpp"
7+
8+
#include "sensor_msgs/msg/point_cloud2.hpp"
9+
#include "easynav_common/types/Perceptions.hpp"
10+
11+
namespace easynav
12+
{
13+
14+
/**
15+
* @class PointcloudMapsBuilderNode
16+
* @brief Lifecycle node that subscribes to point cloud sensor data and manages map building.
17+
*
18+
* This node handles perception data (point clouds) using multiple MapsBuilder instances
19+
* to generate outdoor maps. It supports ROS2 lifecycle management with clean startup,
20+
* activation, deactivation, and cleanup phases. The node also publishes processed maps
21+
* (e.g., filtered point clouds) for downstream consumption.
22+
*/
23+
class PointcloudMapsBuilderNode : public rclcpp_lifecycle::LifecycleNode
24+
{
25+
public:
26+
RCLCPP_SMART_PTR_DEFINITIONS(PointcloudMapsBuilderNode)
27+
28+
using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
29+
30+
/**
31+
* @brief Constructor.
32+
* @param options Options for node initialization.
33+
*/
34+
explicit PointcloudMapsBuilderNode(const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
35+
36+
/**
37+
* @brief Destructor.
38+
*/
39+
~PointcloudMapsBuilderNode();
40+
41+
/**
42+
* @brief Lifecycle configure callback.
43+
* @param state Current lifecycle state.
44+
* @return CallbackReturnT indicating success or failure.
45+
*/
46+
CallbackReturnT on_configure(const rclcpp_lifecycle::State & state) override;
47+
48+
/**
49+
* @brief Lifecycle activate callback.
50+
* @param state Current lifecycle state.
51+
* @return CallbackReturnT indicating success or failure.
52+
*/
53+
CallbackReturnT on_activate(const rclcpp_lifecycle::State & state) override;
54+
55+
/**
56+
* @brief Lifecycle deactivate callback.
57+
* @param state Current lifecycle state.
58+
* @return CallbackReturnT indicating success or failure.
59+
*/
60+
CallbackReturnT on_deactivate(const rclcpp_lifecycle::State & state) override;
61+
62+
/**
63+
* @brief Lifecycle cleanup callback.
64+
* @param state Current lifecycle state.
65+
* @return CallbackReturnT indicating success or failure.
66+
*/
67+
CallbackReturnT on_cleanup(const rclcpp_lifecycle::State & state) override;
68+
69+
/**
70+
* @brief Perform a processing cycle on the perception data and update maps.
71+
*
72+
* This method should be called periodically (e.g., in a timer or main loop) to process
73+
* incoming sensor data, update the internal map representations, and publish outputs.
74+
*/
75+
void cycle();
76+
77+
private:
78+
/// Name of the sensor topic to subscribe to (e.g., point clouds).
79+
std::string sensor_topic_;
80+
81+
/// Collection of perception data managed by this node.
82+
Perceptions perceptions_;
83+
84+
/// Callback group for concurrency management of subscriptions and timers.
85+
rclcpp::CallbackGroup::SharedPtr cbg_;
86+
87+
/// Downsampling resolution applied to point cloud data.
88+
double downsample_resolution_;
89+
90+
/// Default frame ID used for perception data and published messages.
91+
std::string perception_default_frame_;
92+
93+
/// Publisher for processed (e.g., filtered or downsampled) point cloud map data.
94+
rclcpp_lifecycle::LifecyclePublisher<sensor_msgs::msg::PointCloud2>::SharedPtr pub_;
95+
};
96+
97+
} // namespace easynav
98+
99+
#endif // EASYNAV_OUTDOOR_MAPS_BUILDER__POINTCLOUDMAPSBUILDERNODE_HPP_
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>easynav_pointcloud_maps_builder</name>
5+
<version>0.0.1</version>
6+
<description>Easy Navigation: Pointcloud Map Builder Package.</description>
7+
<maintainer email="e.aguado.glez@gmail.com">Esther Aguado Gonzalez</maintainer>
8+
<license>GPL-3.0-only</license>
9+
10+
<buildtool_depend>ament_cmake</buildtool_depend>
11+
12+
<depend>rclcpp</depend>
13+
<depend>sensor_msgs</depend>
14+
<depend>easynav_common</depend>
15+
16+
<test_depend>ament_lint_auto</test_depend>
17+
<test_depend>ament_lint_common</test_depend>
18+
19+
<export>
20+
<build_type>ament_cmake</build_type>
21+
</export>
22+
</package>

0 commit comments

Comments
 (0)