From 983146636b68059df2191a35286b37f30eabffe5 Mon Sep 17 00:00:00 2001 From: estherag Date: Sat, 5 Jul 2025 09:38:36 +0200 Subject: [PATCH 1/9] updated blackboard --- README.md | 27 +- easynav_octomap_maps_builder/CMakeLists.txt | 106 ++++--- .../OctomapMapsBuilderNode.hpp | 260 +++++++++--------- easynav_octomap_maps_builder/package.xml | 3 +- .../OctomapMapsBuilderNode.cpp | 118 +++++--- .../src/octomap_maps_builder_main.cpp | 8 +- .../tests/CMakeLists.txt | 24 +- .../tests/octomap_maps_builder_tests.cpp | 13 +- 8 files changed, 321 insertions(+), 238 deletions(-) diff --git a/README.md b/README.md index 283c59d..ae2eb5c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Clone the repository into your ROS 2 workspace: ```bash cd ~/ros2_ws/src git clone https://github.com/EasyNavigation/easynav_octomap_stack.git +vcs import < easynav_octomap_stack/thirdparty.repos cd .. rosdep install --from-paths src --ignore-src -r -y colcon build --packages-select easynav_octomap_maps_builder @@ -26,16 +27,33 @@ Source your workspace: ```bash source ~/ros2_ws/install/setup.bash ``` -Run the lifecycle node: -```bash -ros2 run easynav_octomap_maps_builder octomap_maps_builder_node + +Create a parameter YAML file (e.g., `params.yaml`) with the following content: + +```yaml +octomap_maps_builder_node: + ros__parameters: + use_sim_time: true + sensors: [map] + downsample_resolution: 0.1 + perception_default_frame: map + map: + topic: map + type: sensor_msgs/msg/PointCloud2 + group: points +``` + +Run the node using the parameter file with this command: +``` +ros2 run easynav_octomap_maps_builder octomap_maps_builder_main \ +--ros-args --params-file src/easynav_octomap_stack/params.yaml ``` ## Parameters | Parameter | Type | Default | Description | |-------------------------|--------|--------------|------------------------------------------------| -| `sensor_topic` | string | `"map"` | Topic name for incoming sensor point clouds. | +| `sensors` | list | - | Topic names for incoming sensor point clouds. | | `downsample_resolution` | double | `1.0` | Downsampling resolution for input point clouds.| | `perception_default_frame` | string | `"map"` | Default target frame for perception fusion. | | `sensor_model.max_range`| double | `90.0` | Maximum sensor range for raycasting. | @@ -46,3 +64,4 @@ ros2 run easynav_octomap_maps_builder octomap_maps_builder_node | `publish_binary_map` | bool | `true` | Enable publishing of binary octomap message. | | `publish_full_map` | bool | `true` | Enable publishing of full octomap message. | | `world_frame_id` | string | `"map"` | Global coordinate frame for map integration. | + diff --git a/easynav_octomap_maps_builder/CMakeLists.txt b/easynav_octomap_maps_builder/CMakeLists.txt index 7cf90b0..9b9b4dd 100644 --- a/easynav_octomap_maps_builder/CMakeLists.txt +++ b/easynav_octomap_maps_builder/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) project(easynav_octomap_maps_builder) -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() @@ -9,75 +9,77 @@ set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -# Dependencies find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rclcpp_lifecycle REQUIRED) find_package(sensor_msgs REQUIRED) find_package(tf2 REQUIRED) find_package(tf2_ros REQUIRED) +find_package(tf2_geometry_msgs REQUIRED) find_package(easynav_common REQUIRED) find_package(octomap_msgs REQUIRED) find_package(octomap_ros REQUIRED) find_package(pcl_conversions REQUIRED) find_package(pcl_ros REQUIRED) find_package(visualization_msgs REQUIRED) - find_package(PCL REQUIRED) -include_directories(${PCL_INCLUDE_DIRS}) - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() find_package(OCTOMAP REQUIRED) - -set(dependencies - rclcpp - rclcpp_lifecycle - sensor_msgs - tf2 - tf2_ros - octomap_ros - octomap_msgs - pcl_conversions - pcl_ros - easynav_common -) - - -include_directories(include) - - -# Library +# Main library add_library(${PROJECT_NAME} SHARED src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp ) -ament_target_dependencies(${PROJECT_NAME} ${dependencies}) -target_link_libraries(${PROJECT_NAME} - ${OCTOMAP_LIBRARIES} - ${PCL_LIBRARIES} +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ + ${octomap_ros_INCLUDE_DIRS} ) -# Executable -add_executable(octomap_maps_builder_main src/octomap_maps_builder_main.cpp) -ament_target_dependencies(octomap_maps_builder_main ${dependencies}) -target_link_libraries(octomap_maps_builder_main ${PROJECT_NAME}) - -# Install headers -install(DIRECTORY include/ - DESTINATION include/ +# Link against ROS2 targets and external libs +target_link_libraries(${PROJECT_NAME} PUBLIC + ${octomap_msgs_TARGETS} + ${sensor_msgs_TARGETS} + ${visualization_msgs_TARGETS} + ${OCTOMAP_LIBRARIES} + ${OCTOMATH_LIBRARIES} + easynav_common::easynav_common + pcl_conversions::pcl_conversions + pcl_ros::bag_to_pcd_lib + pcl_ros::combined_pointcloud_to_pcd_lib + pcl_ros::pcd_to_pointcloud_lib + pcl_ros::pcl_ros_filter + pcl_ros::pcl_ros_filters + pcl_ros::pcl_ros_tf + pcl_ros::pointcloud_to_pcd_lib + rclcpp::rclcpp + rclcpp_lifecycle::rclcpp_lifecycle + sensor_msgs::sensor_msgs_library + tf2::tf2 + tf2_geometry_msgs::tf2_geometry_msgs + tf2_ros::static_transform_broadcaster_node + tf2_ros::tf2_ros ) -# Install targets -install(TARGETS - ${PROJECT_NAME} - octomap_maps_builder_main +# Install library and headers +install( + DIRECTORY include/ + DESTINATION include/${PROJECT_NAME} +) +install( + TARGETS ${PROJECT_NAME} + EXPORT export_${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION lib/${PROJECT_NAME} ) +# Main executable +add_executable(octomap_maps_builder_main src/octomap_maps_builder_main.cpp) +target_link_libraries(octomap_maps_builder_main PUBLIC + ${PROJECT_NAME} +) + # Tests if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) @@ -89,9 +91,23 @@ if(BUILD_TESTING) add_subdirectory(tests) endif() -# Export -ament_export_include_directories(include) +# Export for downstream +ament_export_include_directories(include/${PROJECT_NAME}) ament_export_libraries(${PROJECT_NAME}) -ament_export_dependencies(${dependencies}) +ament_export_targets(export_${PROJECT_NAME}) +ament_export_dependencies( + rclcpp + rclcpp_lifecycle + sensor_msgs + tf2 + tf2_ros + tf2_geometry_msgs + easynav_common + octomap_msgs + octomap_ros + pcl_conversions + pcl_ros + visualization_msgs +) ament_package() diff --git a/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp b/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp index 1a0b4e6..fb20a83 100644 --- a/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp +++ b/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp @@ -1,10 +1,6 @@ // Copyright 2025 Intelligent Robotics Lab // -// This file is part of the project Easy Navigation (EasyNav in short) -// licensed under the GNU General Public License v3.0. -// See for details. -// -// Easy Navigation program is free software: you can redistribute it and/or modify +// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. @@ -15,12 +11,13 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . + /// \file /// \brief Declaration of the OctomapMapsBuilderNode class. -#ifndef EASYNAV_OUTDOOR_MAPS_BUILDER__OCTOMAPMAPSBUILDERNODE_HPP_ -#define EASYNAV_OUTDOOR_MAPS_BUILDER__OCTOMAPMAPSBUILDERNODE_HPP_ +#ifndef EASYNAV_OCTOMAP_MAPS_BUILDER__OCTOMAPMAPSBUILDERNODE_HPP_ +#define EASYNAV_OCTOMAP_MAPS_BUILDER__OCTOMAPMAPSBUILDERNODE_HPP_ #include "rclcpp/rclcpp.hpp" #include "rclcpp/macros.hpp" @@ -36,80 +33,91 @@ namespace easynav { -/** - * @class OctomapMapsBuilderNode - * @brief ROS2 lifecycle node for building and maintaining 3D occupancy maps using OctoMap. - * - * This node subscribes to sensor data, processes perception point clouds, - * updates an internal OctoMap occupancy map, and publishes the map as binary - * or full OctoMap messages. It supports lifecycle management callbacks for - * configuration, activation, deactivation, and cleanup. - */ + /** + * @class OctomapMapsBuilderNode + * @brief ROS2 lifecycle node for building and maintaining 3D occupancy maps using OctoMap. + * + * This node subscribes to sensor data, processes perception point clouds, + * updates an internal OctoMap occupancy map, and publishes the map as binary + * or full OctoMap messages. It supports lifecycle management callbacks for + * configuration, activation, deactivation, and cleanup. + */ class OctomapMapsBuilderNode : public rclcpp_lifecycle::LifecycleNode { public: - RCLCPP_SMART_PTR_DEFINITIONS(OctomapMapsBuilderNode) ///< Smart pointer definitions for this node. + RCLCPP_SMART_PTR_DEFINITIONS(OctomapMapsBuilderNode) ///< Smart pointer definitions for this node. using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn; - /** - * @brief Constructor. - * @param options Node initialization options. - */ + /** + * @brief Constructor. + * @param options Node initialization options. + */ explicit OctomapMapsBuilderNode(const rclcpp::NodeOptions & options = rclcpp::NodeOptions()); - /** - * @brief Lifecycle callback invoked when node is configured. - * - * Initializes parameters, declares topics, and sets up data structures. - * @param state The current lifecycle state. - * @return CallbackReturnT indicating success or failure. - */ + /** + * @brief Destructor. + */ + ~OctomapMapsBuilderNode(); + + /** + * @brief Lifecycle callback invoked when node is configured. + * + * Initializes parameters, declares topics, and sets up data structures. + * @param state The current lifecycle state. + * @return CallbackReturnT indicating success or failure. + */ CallbackReturnT on_configure(const rclcpp_lifecycle::State & state) override; - /** - * @brief Lifecycle callback invoked when node is activated. - * - * Activates publishers and starts processing data. - * @param state The current lifecycle state. - * @return CallbackReturnT indicating success or failure. - */ + /** + * @brief Lifecycle callback invoked when node is activated. + * + * Activates publishers and starts processing data. + * @param state The current lifecycle state. + * @return CallbackReturnT indicating success or failure. + */ CallbackReturnT on_activate(const rclcpp_lifecycle::State & state) override; - /** - * @brief Lifecycle callback invoked when node is deactivated. - * - * Stops publishing data and pauses processing. - * @param state The current lifecycle state. - * @return CallbackReturnT indicating success or failure. - */ + /** + * @brief Lifecycle callback invoked when node is deactivated. + * + * Stops publishing data and pauses processing. + * @param state The current lifecycle state. + * @return CallbackReturnT indicating success or failure. + */ CallbackReturnT on_deactivate(const rclcpp_lifecycle::State & state) override; - /** - * @brief Lifecycle callback invoked when node is cleaned up. - * - * Releases resources and resets internal state. - * @param state The current lifecycle state. - * @return CallbackReturnT indicating success or failure. - */ + /** + * @brief Lifecycle callback invoked when node is cleaned up. + * + * Releases resources and resets internal state. + * @param state The current lifecycle state. + * @return CallbackReturnT indicating success or failure. + */ CallbackReturnT on_cleanup(const rclcpp_lifecycle::State & state) override; - /** - * @brief Perform a processing cycle to update the map. - * - * Processes incoming perception data, updates the OctoMap, and publishes results. - * Should be called periodically. - */ + /** + * @brief Perform a processing cycle to update the map. + * + * Processes incoming perception data, updates the OctoMap, and publishes results. + * Should be called periodically. + */ void cycle(); + /** + * @brief Registers a perception handler. + * @param handler Shared pointer to a PerceptionHandler instance. + */ + void register_handler(std::shared_ptr handler); + protected: - /** - * @brief Update the minimum bounding box key based on an input key. - * - * Compares each coordinate and stores the minimum in `min`. - * @param in Input OcTreeKey. - * @param min Minimum key to update. - */ + /** + * @brief Update the minimum bounding box key based on an input key. + * + * Compares each coordinate and stores the minimum in `min`. + * @param in Input OcTreeKey. + * @param min Minimum key to update. + */ inline static void updateMinKey(const octomap::OcTreeKey & in, octomap::OcTreeKey & min) { for (size_t i = 0; i < 3; ++i) { @@ -117,13 +125,13 @@ class OctomapMapsBuilderNode : public rclcpp_lifecycle::LifecycleNode } } - /** - * @brief Update the maximum bounding box key based on an input key. - * - * Compares each coordinate and stores the maximum in `max`. - * @param in Input OcTreeKey. - * @param max Maximum key to update. - */ + /** + * @brief Update the maximum bounding box key based on an input key. + * + * Compares each coordinate and stores the maximum in `max`. + * @param in Input OcTreeKey. + * @param max Maximum key to update. + */ inline static void updateMaxKey(const octomap::OcTreeKey & in, octomap::OcTreeKey & max) { for (size_t i = 0; i < 3; ++i) { @@ -132,128 +140,128 @@ class OctomapMapsBuilderNode : public rclcpp_lifecycle::LifecycleNode } private: - using PCLPoint = pcl::PointXYZ; ///< PCL point type alias. - using PCLPointCloud = pcl::PointCloud; ///< PCL point cloud alias. - using OcTreeT = octomap::OcTree; ///< Octomap OcTree type alias. - - /** - * @brief Callback to insert new sensor point cloud data. - * - * Processes incoming point clouds, filters and transforms them, - * then inserts into the octree map. - */ + using PCLPoint = pcl::PointXYZ; ///< PCL point type alias. + using PCLPointCloud = pcl::PointCloud; ///< PCL point cloud alias. + using OcTreeT = octomap::OcTree; ///< Octomap OcTree type alias. + + /** + * @brief Callback to insert new sensor point cloud data. + * + * Processes incoming point clouds, filters and transforms them, + * then inserts into the octree map. + */ void insert_cloud_callback(); - /** - * @brief Insert a processed nonground point cloud scan into the octree. - * @param nonground Point cloud excluding ground points. - */ + /** + * @brief Insert a processed nonground point cloud scan into the octree. + * @param nonground Point cloud excluding ground points. + */ void insert_scan(const PCLPointCloud & nonground); - /** - * @brief Publish octomap messages. - * - * Publishes either binary or full octomap messages according to node parameters. - */ + /** + * @brief Publish octomap messages. + * + * Publishes either binary or full octomap messages according to node parameters. + */ void publish(); - /// Topic name for sensor point cloud subscription. - std::string sensor_topic_; - - /// Frame ID of the robot's base. + /// Frame ID of the robot's base. std::string base_frame_id_; - /// Frame ID of the world coordinate system. + /// Frame ID of the world coordinate system. std::string world_frame_id_; - /// Resolution for downsampling the input cloud. + /// Resolution for downsampling the input cloud. double downsample_resolution_; - /// Maximum range to consider points for the map. + /// Maximum range to consider points for the map. double max_range_; - /// Resolution of the octomap voxels. + /// Resolution of the octomap voxels. double resolution_; - /// Minimum height (Z) for occupancy consideration. + /// Minimum height (Z) for occupancy consideration. double occupancy_min_z_; - /// Maximum height (Z) for occupancy consideration. + /// Maximum height (Z) for occupancy consideration. double occupancy_max_z_; - /// Whether to publish the binary octomap. + /// Whether to publish the binary octomap. bool publish_binary_map_; - /// Whether to publish the full octomap. + /// Whether to publish the full octomap. bool publish_full_map_; - /// Unique pointer to the OctoMap octree instance. + /// Unique pointer to the OctoMap octree instance. std::unique_ptr octree_; - /// Key ray used for raycasting in octomap updates. + /// Key ray used for raycasting in octomap updates. octomap::KeyRay key_ray_; - /// Current octree depth. + /// Current octree depth. unsigned tree_depth_; - /// Maximum allowed depth for the octree. + /// Maximum allowed depth for the octree. unsigned max_tree_depth_; - /// Minimum key for bounding box update in the octree. + /// Minimum key for bounding box update in the octree. octomap::OcTreeKey update_bbox_min_; - /// Maximum key for bounding box update in the octree. + /// Maximum key for bounding box update in the octree. octomap::OcTreeKey update_bbox_max_; - /// Buffer holding the current perception point clouds. - std::vector> perceptions_; + /// Map of perception data grouped by sensor name. + std::map> perceptions_; + + /// Registered perception handlers by sensor name. + std::map> handlers_; - /// Minimum X coordinate filter for incoming clouds. + /// Minimum X coordinate filter for incoming clouds. double point_cloud_min_x_{-100.0}; - /// Maximum X coordinate filter for incoming clouds. + /// Maximum X coordinate filter for incoming clouds. double point_cloud_max_x_{100.0}; - /// Minimum Y coordinate filter for incoming clouds. + /// Minimum Y coordinate filter for incoming clouds. double point_cloud_min_y_{-100.0}; - /// Maximum Y coordinate filter for incoming clouds. + /// Maximum Y coordinate filter for incoming clouds. double point_cloud_max_y_{100.0}; - /// Minimum Z coordinate filter for incoming clouds. + /// Minimum Z coordinate filter for incoming clouds. double point_cloud_min_z_{-10.0}; - /// Maximum Z coordinate filter for incoming clouds. + /// Maximum Z coordinate filter for incoming clouds. double point_cloud_max_z_{10.0}; - /// Lifecycle publisher for binary octomap messages. + /// Lifecycle publisher for binary octomap messages. rclcpp_lifecycle::LifecyclePublisher::SharedPtr pub_binary_; - /// Lifecycle publisher for full octomap messages. + /// Lifecycle publisher for full octomap messages. rclcpp_lifecycle::LifecyclePublisher::SharedPtr pub_full_; - /// Callback group to handle subscription callbacks. + /// Callback group to handle subscription callbacks. rclcpp::CallbackGroup::SharedPtr cbg_; - /// Cached point cloud of ground points. + /// Cached point cloud of ground points. PCLPointCloud pc_ground; - /// Cached point cloud of nonground points. + /// Cached point cloud of nonground points. PCLPointCloud pc_nonground; - /// Sensor model probability of hit. + /// Sensor model probability of hit. double prob_hit_{0.7}; - /// Sensor model probability of miss. + /// Sensor model probability of miss. double prob_miss_{0.4}; - /// Minimum clamping threshold for occupancy probability. + /// Minimum clamping threshold for occupancy probability. double clamping_thres_min_{0.12}; - /// Maximum clamping threshold for occupancy probability. + /// Maximum clamping threshold for occupancy probability. double clamping_thres_max_{0.97}; }; -} // namespace easynav +} // namespace easynav -#endif // EASYNAV_OUTDOOR_MAPS_BUILDER__OCTOMAPMAPSBUILDERNODE_HPP_ +#endif // EASYNAV_OCTOMAP_MAPS_BUILDER__OCTOMAPMAPSBUILDERNODE_HPP_ diff --git a/easynav_octomap_maps_builder/package.xml b/easynav_octomap_maps_builder/package.xml index 97532bb..4fd1a10 100644 --- a/easynav_octomap_maps_builder/package.xml +++ b/easynav_octomap_maps_builder/package.xml @@ -17,6 +17,7 @@ pcl_conversions pcl_ros visualization_msgs + tf2_geometry_msgs ament_lint_auto @@ -25,4 +26,4 @@ ament_cmake - + \ No newline at end of file diff --git a/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp b/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp index 92f5ba7..d3db4ca 100644 --- a/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp +++ b/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp @@ -1,10 +1,6 @@ // Copyright 2025 Intelligent Robotics Lab // -// This file is part of the project Easy Navigation (EasyNav in short) -// licensed under the GNU General Public License v3.0. -// See for details. -// -// Easy Navigation program is free software: you can redistribute it and/or modify +// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. @@ -15,7 +11,7 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . /// \file /// \brief Implementation of the OctomapMapsBuilderNode class. @@ -27,7 +23,7 @@ #include "lifecycle_msgs/msg/state.hpp" #include "easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp" -#include "easynav_common/types/Perceptions.hpp" +#include "easynav_common/types/PointPerception.hpp" #include "octomap_msgs/msg/octomap.hpp" #include @@ -40,7 +36,6 @@ #include #include - namespace easynav { @@ -49,8 +44,8 @@ OctomapMapsBuilderNode::OctomapMapsBuilderNode(const rclcpp::NodeOptions & optio { cbg_ = create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive); - if (!has_parameter("sensor_topic")) { - declare_parameter("sensor_topic", "map"); + if (!has_parameter("sensors")) { + declare_parameter("sensors", std::vector()); } if (!has_parameter("downsample_resolution")) { @@ -90,11 +85,19 @@ OctomapMapsBuilderNode::OctomapMapsBuilderNode(const rclcpp::NodeOptions & optio } pub_binary_ = create_publisher( - "map_builder/octomap_binary", rclcpp::QoS(1).transient_local().reliable()); + "map_builder/octomap_binary", rclcpp::QoS(1).transient_local().reliable()); pub_full_ = create_publisher( - "map_builder/octomap_full", rclcpp::QoS(1).transient_local().reliable()); + "map_builder/octomap_full", rclcpp::QoS(1).transient_local().reliable()); + + register_handler(std::make_shared()); +} +OctomapMapsBuilderNode::~OctomapMapsBuilderNode() +{ + if (get_current_state().id() != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE) { + trigger_transition(lifecycle_msgs::msg::Transition::TRANSITION_ACTIVE_SHUTDOWN); + } } using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn; @@ -104,7 +107,8 @@ OctomapMapsBuilderNode::on_configure(const rclcpp_lifecycle::State & state) { (void)state; - get_parameter("sensor_topic", sensor_topic_); + std::vector sensors; + get_parameter("sensors", sensors); get_parameter("downsample_resolution", downsample_resolution_); get_parameter("sensor_model.max_range", max_range_); get_parameter("resolution", resolution_); @@ -116,7 +120,7 @@ OctomapMapsBuilderNode::on_configure(const rclcpp_lifecycle::State & state) get_parameter("world_frame_id", world_frame_id_); - // Initialize OctoMap + // Initialize OctoMap octree_ = std::make_unique(resolution_); octree_->setProbHit(prob_hit_); octree_->setProbMiss(prob_miss_); @@ -126,18 +130,41 @@ OctomapMapsBuilderNode::on_configure(const rclcpp_lifecycle::State & state) tree_depth_ = octree_->getTreeDepth(); max_tree_depth_ = tree_depth_; - auto perception_entry = std::make_shared(); - perception_entry->data.points.clear(); - perception_entry->data.clear(); - perception_entry->frame_id = ""; - perception_entry->stamp = now(); - perception_entry->valid = false; - perception_entry->new_data = true; + for (const auto & sensor_id : sensors) { + std::string topic, msg_type, group; - perceptions_.push_back(perception_entry); + if (!has_parameter(sensor_id + ".topic")) { + declare_parameter(sensor_id + ".topic", topic); + } + if (!has_parameter(sensor_id + ".type")) { + declare_parameter(sensor_id + ".type", msg_type); + } + if (!has_parameter(sensor_id + ".group")) { + declare_parameter(sensor_id + ".group", group); + } - perception_entry->subscription = create_typed_subscription( - *this, sensor_topic_, perception_entry, cbg_); + get_parameter(sensor_id + ".topic", topic); + get_parameter(sensor_id + ".type", msg_type); + get_parameter(sensor_id + ".group", group); + + RCLCPP_DEBUG(get_logger(), + "Loaded sensor parameters: id=%s topic=%s type=%s group=%s", + sensor_id.c_str(), topic.c_str(), msg_type.c_str(), group.c_str()); + + auto handler_it = handlers_.find(group); + if (handler_it == handlers_.end()) { + RCLCPP_WARN(get_logger(), "No handler for group [%s]", group.c_str()); + continue; + } + + auto ptr = handler_it->second->create(sensor_id); + auto sub = handler_it->second->create_subscription(*this, topic, msg_type, ptr, cbg_); + + perceptions_[group].emplace_back(PerceptionPtr{ptr, sub}); + + RCLCPP_DEBUG(get_logger(), "Creating perception for sensor %s", sensor_id.c_str()); + RCLCPP_DEBUG(get_logger(), "Handler group = %s", group.c_str()); + } return CallbackReturnT::SUCCESS; } @@ -181,17 +208,16 @@ OctomapMapsBuilderNode::on_cleanup(const rclcpp_lifecycle::State & state) pub_full_.reset(); } - return CallbackReturnT::SUCCESS; } void OctomapMapsBuilderNode::insert_cloud_callback() { - - auto processed_perceptions = PerceptionsOpsView(perceptions_); + auto point_perceptions = get_point_perceptions(perceptions_["points"]); + auto processed_perceptions = PointPerceptionsOpsView(point_perceptions); // Fuse perceptions if the frame_id is different from default and downsample - if (!perceptions_.empty() && perceptions_[0] && - perceptions_[0]->frame_id != world_frame_id_) + if (!point_perceptions.empty() && point_perceptions[0] && + point_perceptions[0]->frame_id != world_frame_id_) { processed_perceptions.downsample(downsample_resolution_).fuse(world_frame_id_); } else { @@ -200,7 +226,7 @@ void OctomapMapsBuilderNode::insert_cloud_callback() PCLPointCloud pc = processed_perceptions.as_points(); - // set up filter for height range, also removes NANs: + // set up filter for height range, also removes NANs: pcl::PassThrough pass_x; pass_x.setFilterFieldName("x"); pass_x.setFilterLimits(point_cloud_min_x_, point_cloud_max_x_); @@ -211,7 +237,7 @@ void OctomapMapsBuilderNode::insert_cloud_callback() pass_z.setFilterFieldName("z"); pass_z.setFilterLimits(point_cloud_min_z_, point_cloud_max_z_); - // just filter height range: + // just filter height range: pass_x.setInputCloud(pc.makeShared()); pass_x.filter(pc); pass_y.setInputCloud(pc.makeShared()); @@ -219,7 +245,6 @@ void OctomapMapsBuilderNode::insert_cloud_callback() pass_z.setInputCloud(pc.makeShared()); pass_z.filter(pc); - pc_nonground = pc; // pc_nonground is empty without ground segmentation pc_ground.header = pc.header; @@ -294,7 +319,7 @@ void OctomapMapsBuilderNode::insert_scan(const PCLPointCloud & nonground) void OctomapMapsBuilderNode::publish() { - + auto point_perceptions = get_point_perceptions(perceptions_["points"]); const size_t octomap_size = octree_->size(); if (octomap_size <= 1) { @@ -308,7 +333,7 @@ void OctomapMapsBuilderNode::publish() { octomap_msgs::msg::Octomap map; map.header.frame_id = world_frame_id_; - map.header.stamp = perceptions_[0]->stamp; + map.header.stamp = point_perceptions[0]->stamp; if (octomap_msgs::binaryMapToMsg(*octree_, map)) { pub_binary_->publish(map); @@ -323,7 +348,7 @@ void OctomapMapsBuilderNode::publish() { octomap_msgs::msg::Octomap map; map.header.frame_id = world_frame_id_; - map.header.stamp = perceptions_[0]->stamp; + map.header.stamp = point_perceptions[0]->stamp; if (octomap_msgs::fullMapToMsg(*octree_, map)) { pub_full_->publish(map); @@ -333,13 +358,12 @@ void OctomapMapsBuilderNode::publish() } } - void OctomapMapsBuilderNode::cycle() { - // Finish cycle if no new perceptions - if (std::none_of(perceptions_.begin(), perceptions_.end(), - [](const auto & perception) - {return perception && perception->new_data;})) + // Finish cycle if no new perceptions + if (std::none_of(perceptions_["points"].begin(), perceptions_["points"].end(), + [](const auto & p) + {return p.perception->new_data;})) { return; } @@ -349,15 +373,21 @@ void OctomapMapsBuilderNode::cycle() (pub_full_->get_subscription_count() + pub_full_->get_intra_process_subscription_count()) > 0) { + RCLCPP_INFO(get_logger(), "MAIN SUBS"); insert_cloud_callback(); publish(); - // Mark perceptions as not new after published - for (auto & perception : perceptions_) { - if (perception->new_data) { - perception->new_data = false; + // Mark perceptions as not new after published + for (auto & p : perceptions_["points"]) { + if (p.perception->new_data) { + p.perception->new_data = false; } } } } +void +OctomapMapsBuilderNode::register_handler(std::shared_ptr handler) +{ + handlers_[handler->group()] = handler; +} } // namespace easynav diff --git a/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp b/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp index 1e0cee8..cbe8ac3 100644 --- a/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp +++ b/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp @@ -1,10 +1,6 @@ // Copyright 2025 Intelligent Robotics Lab // -// This file is part of the project Easy Navigation (EasyNav in short) -// licensed under the GNU General Public License v3.0. -// See for details. -// -// Easy Navigation program is free software: you can redistribute it and/or modify +// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. @@ -15,7 +11,7 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . #include "rclcpp/rclcpp.hpp" #include "rclcpp_lifecycle/lifecycle_node.hpp" diff --git a/easynav_octomap_maps_builder/tests/CMakeLists.txt b/easynav_octomap_maps_builder/tests/CMakeLists.txt index 69320ac..e5d54c2 100644 --- a/easynav_octomap_maps_builder/tests/CMakeLists.txt +++ b/easynav_octomap_maps_builder/tests/CMakeLists.txt @@ -1,11 +1,29 @@ ament_add_gtest(octomap_maps_builder_tests octomap_maps_builder_tests.cpp) + target_include_directories(octomap_maps_builder_tests PUBLIC $ $ ) + target_link_libraries(octomap_maps_builder_tests ${PROJECT_NAME} + ${octomap_msgs_TARGETS} + ${sensor_msgs_TARGETS} + ${visualization_msgs_TARGETS} + easynav_common::easynav_common + pcl_conversions::pcl_conversions + pcl_ros::bag_to_pcd_lib + pcl_ros::combined_pointcloud_to_pcd_lib + pcl_ros::pcd_to_pointcloud_lib + pcl_ros::pcl_ros_filter + pcl_ros::pcl_ros_filters + pcl_ros::pcl_ros_tf + pcl_ros::pointcloud_to_pcd_lib + rclcpp::rclcpp + rclcpp_lifecycle::rclcpp_lifecycle + sensor_msgs::sensor_msgs_library + tf2::tf2 + tf2_geometry_msgs::tf2_geometry_msgs + tf2_ros::static_transform_broadcaster_node + tf2_ros::tf2_ros ) -ament_target_dependencies(octomap_maps_builder_tests ${dependencies}) - - diff --git a/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp b/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp index 8286a5c..a32b249 100644 --- a/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp +++ b/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp @@ -1,10 +1,6 @@ // Copyright 2025 Intelligent Robotics Lab // -// This file is part of the project Easy Navigation (EasyNav in sh0rt) -// licensed under the GNU General Public License v3.0. -// See for details. -// -// Easy Navigation program is free software: you can redistribute it and/or modify +// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. @@ -15,7 +11,7 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . #include "gtest/gtest.h" #include "rclcpp/rclcpp.hpp" @@ -43,8 +39,7 @@ TEST_F(OctomapMapsBuilderTest, test_configure_success) { auto options = rclcpp::NodeOptions(); - options.append_parameter_override("map_types", std::vector{"pcl"}); - options.append_parameter_override("sensor_topic", "points"); + options.append_parameter_override("downsample_resolution", 0.3); auto node = std::make_shared(options); @@ -52,5 +47,5 @@ TEST_F(OctomapMapsBuilderTest, test_configure_success) auto result = node->on_configure(state); EXPECT_EQ(result, - rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS); + rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS); } From 37409ae7fb558bc5dce5aa0f2213ac94b4d7d101 Mon Sep 17 00:00:00 2001 From: estherag Date: Sat, 5 Jul 2025 09:47:06 +0200 Subject: [PATCH 2/9] fix octomap-ros in our fork --- .github/thirdparty.repos | 7 ++++++- README.md | 3 ++- easynav_octomap_maps_builder/package.xml | 2 +- thirdparty.repos | 5 +++++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 thirdparty.repos diff --git a/.github/thirdparty.repos b/.github/thirdparty.repos index 6ebe54f..7fdccf6 100644 --- a/.github/thirdparty.repos +++ b/.github/thirdparty.repos @@ -2,4 +2,9 @@ repositories: ThirdParty/EasyNavigation: type: git url: https://github.com/EasyNavigation/EasyNavigation.git - version: rolling \ No newline at end of file + version: rolling + + ThirdParty/octomap_ros: + type: git + url: https://github.com/estherag/octomap_ros.git + version: ros2 diff --git a/README.md b/README.md index ae2eb5c..faf3676 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ The `OctomapMapsBuilderNode` subscribes to sensor point cloud topics, processes ## Installation -Clone the repository into your ROS 2 workspace: +Clone the repository into your ROS 2 workspace. Temporarilly you will need to install octomap-ros from a ThirdParties: + ```bash cd ~/ros2_ws/src git clone https://github.com/EasyNavigation/easynav_octomap_stack.git diff --git a/easynav_octomap_maps_builder/package.xml b/easynav_octomap_maps_builder/package.xml index 4fd1a10..467e203 100644 --- a/easynav_octomap_maps_builder/package.xml +++ b/easynav_octomap_maps_builder/package.xml @@ -13,7 +13,7 @@ sensor_msgs easynav_common octomap_msgs - octomap_ros + pcl_conversions pcl_ros visualization_msgs diff --git a/thirdparty.repos b/thirdparty.repos new file mode 100644 index 0000000..869049c --- /dev/null +++ b/thirdparty.repos @@ -0,0 +1,5 @@ +repositories: + ThirdParty/octomap_ros: + type: git + url: https://github.com/estherag/octomap_ros.git + version: ros2 From 40a27b90301f9c549566bf7b5a0b1fb88bb6d420 Mon Sep 17 00:00:00 2001 From: estherag Date: Sat, 5 Jul 2025 10:02:28 +0200 Subject: [PATCH 3/9] fix ci --- .github/thirdparty.repos | 1 - .github/workflows/rolling.yaml | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/thirdparty.repos b/.github/thirdparty.repos index 7fdccf6..f27b365 100644 --- a/.github/thirdparty.repos +++ b/.github/thirdparty.repos @@ -3,7 +3,6 @@ repositories: type: git url: https://github.com/EasyNavigation/EasyNavigation.git version: rolling - ThirdParty/octomap_ros: type: git url: https://github.com/estherag/octomap_ros.git diff --git a/.github/workflows/rolling.yaml b/.github/workflows/rolling.yaml index a86fab5..8545e86 100644 --- a/.github/workflows/rolling.yaml +++ b/.github/workflows/rolling.yaml @@ -31,13 +31,14 @@ jobs: package-name: easynav_octomap_maps_builder target-ros2-distro: rolling vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/thirdparty.repos + skip-test: true colcon-defaults: | - { - "test": { - "parallel-workers" : 1 - } - } - colcon-mixin-name: coverage-gcc + { + "build": { + "packages-up-to": true, + "mixin": ["coverage-gcc"] + } + } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - name: Codecov From 35b50031e9338d9c8be09b8faca2dd81c867f8ab Mon Sep 17 00:00:00 2001 From: estherag Date: Sat, 5 Jul 2025 10:56:57 +0200 Subject: [PATCH 4/9] fix ci --- .github/workflows/rolling.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rolling.yaml b/.github/workflows/rolling.yaml index 8545e86..bae9ec6 100644 --- a/.github/workflows/rolling.yaml +++ b/.github/workflows/rolling.yaml @@ -31,6 +31,7 @@ jobs: package-name: easynav_octomap_maps_builder target-ros2-distro: rolling vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/thirdparty.repos + build-dependencies: all skip-test: true colcon-defaults: | { From 47a8e223362f5c729e76a842880fe1b25d27be4d Mon Sep 17 00:00:00 2001 From: estherag Date: Sat, 5 Jul 2025 11:15:20 +0200 Subject: [PATCH 5/9] fix ci --- easynav_octomap_maps_builder/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easynav_octomap_maps_builder/CMakeLists.txt b/easynav_octomap_maps_builder/CMakeLists.txt index 9b9b4dd..4475505 100644 --- a/easynav_octomap_maps_builder/CMakeLists.txt +++ b/easynav_octomap_maps_builder/CMakeLists.txt @@ -18,7 +18,7 @@ find_package(tf2_ros REQUIRED) find_package(tf2_geometry_msgs REQUIRED) find_package(easynav_common REQUIRED) find_package(octomap_msgs REQUIRED) -find_package(octomap_ros REQUIRED) +# find_package(octomap_ros REQUIRED) find_package(pcl_conversions REQUIRED) find_package(pcl_ros REQUIRED) find_package(visualization_msgs REQUIRED) From 48de3fa7df4c24ae6801644e905ad99b96f6be48 Mon Sep 17 00:00:00 2001 From: estherag Date: Mon, 7 Jul 2025 10:52:29 +0200 Subject: [PATCH 6/9] find octomap_ros from thirdparties --- easynav_octomap_maps_builder/CMakeLists.txt | 3 ++- easynav_octomap_maps_builder/package.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/easynav_octomap_maps_builder/CMakeLists.txt b/easynav_octomap_maps_builder/CMakeLists.txt index 4475505..3b02dac 100644 --- a/easynav_octomap_maps_builder/CMakeLists.txt +++ b/easynav_octomap_maps_builder/CMakeLists.txt @@ -18,7 +18,7 @@ find_package(tf2_ros REQUIRED) find_package(tf2_geometry_msgs REQUIRED) find_package(easynav_common REQUIRED) find_package(octomap_msgs REQUIRED) -# find_package(octomap_ros REQUIRED) +find_package(octomap_ros REQUIRED) find_package(pcl_conversions REQUIRED) find_package(pcl_ros REQUIRED) find_package(visualization_msgs REQUIRED) @@ -39,6 +39,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC # Link against ROS2 targets and external libs target_link_libraries(${PROJECT_NAME} PUBLIC ${octomap_msgs_TARGETS} + ${octomap_ros_TARGETS} ${sensor_msgs_TARGETS} ${visualization_msgs_TARGETS} ${OCTOMAP_LIBRARIES} diff --git a/easynav_octomap_maps_builder/package.xml b/easynav_octomap_maps_builder/package.xml index 467e203..4fd1a10 100644 --- a/easynav_octomap_maps_builder/package.xml +++ b/easynav_octomap_maps_builder/package.xml @@ -13,7 +13,7 @@ sensor_msgs easynav_common octomap_msgs - + octomap_ros pcl_conversions pcl_ros visualization_msgs From 16033ca915abf6ebcd35004c03706d0df6fa739e Mon Sep 17 00:00:00 2001 From: estherag Date: Mon, 7 Jul 2025 12:14:34 +0200 Subject: [PATCH 7/9] remove ref to dependencies in workflow --- .github/workflows/rolling.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rolling.yaml b/.github/workflows/rolling.yaml index bae9ec6..8545e86 100644 --- a/.github/workflows/rolling.yaml +++ b/.github/workflows/rolling.yaml @@ -31,7 +31,6 @@ jobs: package-name: easynav_octomap_maps_builder target-ros2-distro: rolling vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/thirdparty.repos - build-dependencies: all skip-test: true colcon-defaults: | { From bfec2f7fcdc0ec12e618ca302e9b5fe20739e690 Mon Sep 17 00:00:00 2001 From: estherag Date: Tue, 8 Jul 2025 13:11:27 +0200 Subject: [PATCH 8/9] improve ci and license --- .github/workflows/rolling.yaml | 6 +++--- .../OctomapMapsBuilderNode.hpp | 10 +++++++--- .../OctomapMapsBuilderNode.cpp | 11 ++++++++--- .../src/octomap_maps_builder_main.cpp | 10 +++++++--- .../tests/octomap_maps_builder_tests.cpp | 10 +++++++--- params.yaml | 10 ++++++++++ 6 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 params.yaml diff --git a/.github/workflows/rolling.yaml b/.github/workflows/rolling.yaml index 8545e86..e9c3755 100644 --- a/.github/workflows/rolling.yaml +++ b/.github/workflows/rolling.yaml @@ -31,18 +31,18 @@ jobs: package-name: easynav_octomap_maps_builder target-ros2-distro: rolling vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/thirdparty.repos - skip-test: true + skip-tests: true colcon-defaults: | { "build": { "packages-up-to": true, - "mixin": ["coverage-gcc"] + "mixin": ["coverage-gcc"] } } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - name: Codecov - uses: codecov/codecov-action@v5.4.2 + uses: codecov/codecov-action@v5.4.0 with: files: ros_ws/lcov/total_coverage.info flags: unittests diff --git a/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp b/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp index fb20a83..25e3bff 100644 --- a/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp +++ b/easynav_octomap_maps_builder/include/easynav_octomap_maps_builder/OctomapMapsBuilderNode.hpp @@ -1,17 +1,21 @@ // Copyright 2025 Intelligent Robotics Lab // -// This program is free software: you can redistribute it and/or modify +// This file is part of the project Easy Navigation (EasyNav in short) +// licensed under the GNU General Public License v3.0. +// See for details. +// +// Easy Navigation program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . /// \file /// \brief Declaration of the OctomapMapsBuilderNode class. diff --git a/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp b/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp index d3db4ca..4217bee 100644 --- a/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp +++ b/easynav_octomap_maps_builder/src/easynav_octomap_maps_builder/OctomapMapsBuilderNode.cpp @@ -1,17 +1,22 @@ // Copyright 2025 Intelligent Robotics Lab // -// This program is free software: you can redistribute it and/or modify +// This file is part of the project Easy Navigation (EasyNav in short) +// licensed under the GNU General Public License v3.0. +// See for details. +// +// Easy Navigation program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . + /// \file /// \brief Implementation of the OctomapMapsBuilderNode class. diff --git a/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp b/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp index cbe8ac3..a9be2bb 100644 --- a/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp +++ b/easynav_octomap_maps_builder/src/octomap_maps_builder_main.cpp @@ -1,17 +1,21 @@ // Copyright 2025 Intelligent Robotics Lab // -// This program is free software: you can redistribute it and/or modify +// This file is part of the project Easy Navigation (EasyNav in short) +// licensed under the GNU General Public License v3.0. +// See for details. +// +// Easy Navigation program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . #include "rclcpp/rclcpp.hpp" #include "rclcpp_lifecycle/lifecycle_node.hpp" diff --git a/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp b/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp index a32b249..14398e2 100644 --- a/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp +++ b/easynav_octomap_maps_builder/tests/octomap_maps_builder_tests.cpp @@ -1,17 +1,21 @@ // Copyright 2025 Intelligent Robotics Lab // -// This program is free software: you can redistribute it and/or modify +// This file is part of the project Easy Navigation (EasyNav in short) +// licensed under the GNU General Public License v3.0. +// See for details. +// +// Easy Navigation program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// along with this program. If not, see . #include "gtest/gtest.h" #include "rclcpp/rclcpp.hpp" diff --git a/params.yaml b/params.yaml new file mode 100644 index 0000000..067df81 --- /dev/null +++ b/params.yaml @@ -0,0 +1,10 @@ +octomap_maps_builder_node: + ros__parameters: + use_sim_time: true + sensors: [map] + downsample_resolution: 0.1 + perception_default_frame: map + map: + topic: map + type: sensor_msgs/msg/PointCloud2 + group: points \ No newline at end of file From fc49fa521690e07ed416603fd6eb1ddd04c6eb80 Mon Sep 17 00:00:00 2001 From: estherag Date: Tue, 8 Jul 2025 13:12:03 +0200 Subject: [PATCH 9/9] improve ci and license --- params.yaml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 params.yaml diff --git a/params.yaml b/params.yaml deleted file mode 100644 index 067df81..0000000 --- a/params.yaml +++ /dev/null @@ -1,10 +0,0 @@ -octomap_maps_builder_node: - ros__parameters: - use_sim_time: true - sensors: [map] - downsample_resolution: 0.1 - perception_default_frame: map - map: - topic: map - type: sensor_msgs/msg/PointCloud2 - group: points \ No newline at end of file