Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b6cb109
Remove deprecated Eigen empty struct constructors
Jul 19, 2026
8899d7a
Default copy operations for grid_map_core types
Jul 19, 2026
b7bff87
Match grid_map_pcl timer clock type
Jul 19, 2026
3ceb9c4
fix(grid_map_cv): use the cv::COLOR_* constants
Nov 13, 2026
81459fc
Use imported targets in grid_map_ros
anttix Aug 10, 2026
1697d1c
fix: use target_link_libraries instead of ament_target_dependencies
xmfcx Nov 13, 2026
d8e0ad3
fix(grid_map_rviz_plugin): build with Qt 6
xmfcx Nov 13, 2026
1c3ad97
fix(grid_map_pcl): define JsonCpp::JsonCpp before finding PCL
xmfcx Nov 13, 2026
ce3f60a
fix: replace deprecated ROS 2 APIs
xmfcx Nov 13, 2026
ae25aaa
fix(grid_map_demos): do not fail on the ciso646 warning from OctoMap
xmfcx Nov 13, 2026
2b22bdc
fix(grid_map_rviz_plugin): use the version-neutral Qt rosdep keys
xmfcx Nov 13, 2026
51d05ce
fix(grid_map_demos): limit -Wno-error=cpp to GCC and Clang
xmfcx Nov 13, 2026
d73c982
test: replace deprecated ROS 2 headers and APIs
xmfcx Nov 13, 2026
756c047
test(grid_map_costmap_2d): follow the Nav2 costmap changes
xmfcx Nov 13, 2026
bf93ae1
test(grid_map_costmap_2d): keep each test costmap in its own namespace
xmfcx Nov 13, 2026
5ec78e5
test: remove a stale comment and an unused include
xmfcx Nov 13, 2026
7fe8fa9
fix: take ConstSharedPtr in the subscription callbacks
Nov 13, 2026
a4f1047
test(grid_map_core): remove unused variables in SubmapIteratorTest
Nov 13, 2026
a963b50
ci: build and test on Lyrical and Rolling with Ubuntu 26.04
xmfcx Nov 13, 2026
ae8970c
ci: skip octomap_server on Rolling
xmfcx Nov 13, 2026
959b9ac
ci: upgrade the image packages after switching to ros2-testing
xmfcx Nov 13, 2026
ba8d5e4
ci: cancel superseded runs
xmfcx Nov 13, 2026
14e6a7f
ci: give the build jobs fixed names and explain the skipped keys
xmfcx Nov 13, 2026
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
26 changes: 20 additions & 6 deletions .github/workflows/colcon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,34 @@ on:
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-test:
name: build-test (${{ matrix.config.rosdistro }}, ${{ matrix.config.ros_repo }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {rosdistro: 'rolling', container: 'rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-desktop-latest'}
container:
image: ${{ matrix.config.container }}
- {rosdistro: 'lyrical', ros_repo: 'main', skip_keys: ''}
# octomap_rviz_plugins and octomap_server have no Rolling binary on Ubuntu 26.04 yet.
- {rosdistro: 'rolling', ros_repo: 'testing', skip_keys: 'octomap_rviz_plugins octomap_server'}
container:
image: ros:${{ matrix.config.rosdistro }}-ros-base-resolute
steps:
- uses: actions/checkout@v4
with:
path: src/grid_map
- name: Use the ROS testing repository
run: |
sed -i 's|packages.ros.org/ros2/ubuntu|packages.ros.org/ros2-testing/ubuntu|' /etc/apt/sources.list.d/*
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
shell: bash
if: ${{ matrix.config.ros_repo == 'testing' }}
- name: Pull in repos with vcs
run: |
apt-get update
Expand All @@ -32,10 +46,10 @@ jobs:
if: ${{ matrix.config.rosdistro == 'rolling' }}
- name: Install Dependencies with Rosdep
run: |
apt update
rosdep update
apt-get update
rosdep update --rosdistro ${{matrix.config.rosdistro}}
source /opt/ros/${{matrix.config.rosdistro}}/setup.bash
rosdep install --from-paths src --ignore-src -y --skip-keys "slam_toolbox"
rosdep install --from-paths $(colcon list --packages-up-to grid_map --paths-only) --ignore-src -y --rosdistro ${{matrix.config.rosdistro}} --skip-keys "${{matrix.config.skip_keys}}"
shell: bash
- name: Colcon Build (Release)
run: |
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/industrial-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ on:
branches:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
industrial_ci:
strategy:
fail-fast: false
matrix:
env:
- {ROS_DISTRO: lyrical, ROS_REPO: main}
- {ROS_DISTRO: lyrical, ROS_REPO: testing}
- {ROS_DISTRO: rolling, ROS_REPO: testing}
- {ROS_DISTRO: rolling, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -32,8 +38,9 @@ jobs:
# We duplicate NAV2's key skipping because I doubt they intend this bespoke file to be used by other CI jobs:
# https://github.com/ros-navigation/navigation2/blob/main/tools/skip_keys.txt
# It also is out of date, so grid_map is just going to skip keys we are sure don't work.
- name: set ROSDEP_SKIP_KEYS to skip nav2 keys
# octomap_rviz_plugins and octomap_server have no Rolling binary on Ubuntu 26.04 yet.
- name: Set ROSDEP_SKIP_KEYS to skip keys without Rolling binaries
if: ${{ matrix.env.ROS_DISTRO == 'rolling' }}
run: echo "ROSDEP_SKIP_KEYS=slam_toolbox" >> $GITHUB_ENV
run: echo "ROSDEP_SKIP_KEYS=slam_toolbox octomap_rviz_plugins octomap_server" >> $GITHUB_ENV
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
2 changes: 2 additions & 0 deletions grid_map_core/include/grid_map_core/BufferRegion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class BufferRegion
BufferRegion(
const Index & startIndex, const Size & size,
const BufferRegion::Quadrant & quadrant);
BufferRegion(const BufferRegion & other) = default;
BufferRegion & operator=(const BufferRegion & other) = default;
virtual ~BufferRegion() = default;

const Index & getStartIndex() const;
Expand Down
3 changes: 3 additions & 0 deletions grid_map_core/include/grid_map_core/Polygon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class Polygon
*/
explicit Polygon(std::vector<Position> vertices);

Polygon(const Polygon & other) = default;
Polygon & operator=(const Polygon & other) = default;

/*!
* Destructor.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
template<typename Scalar>
struct scalar_sum_of_finites_op
{
EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_of_finites_op)
EIGEN_STRONG_INLINE const Scalar operator()(const Scalar & a, const Scalar & b) const
{
using std::isfinite;
Expand All @@ -29,7 +28,6 @@ struct functor_traits<scalar_sum_of_finites_op<Scalar>>
template<typename Scalar>
struct scalar_min_of_finites_op
{
EIGEN_EMPTY_STRUCT_CTOR(scalar_min_of_finites_op)
EIGEN_STRONG_INLINE const Scalar operator()(const Scalar & a, const Scalar & b) const
{
using std::min;
Expand All @@ -53,7 +51,6 @@ struct functor_traits<scalar_min_of_finites_op<Scalar>>
template<typename Scalar>
struct scalar_max_of_finites_op
{
EIGEN_EMPTY_STRUCT_CTOR(scalar_max_of_finites_op)
EIGEN_STRONG_INLINE const Scalar operator()(const Scalar & a, const Scalar & b) const
{
using std::max;
Expand Down
4 changes: 0 additions & 4 deletions grid_map_core/test/SubmapIteratorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ TEST(SubmapIterator, Simple)
{
Eigen::Array2i submapTopLeftIndex(3, 1);
Eigen::Array2i submapBufferSize(3, 2);
Eigen::Array2i index;
Eigen::Array2i submapIndex;

std::vector<std::string> types;
types.push_back("type");
Expand Down Expand Up @@ -91,8 +89,6 @@ TEST(SubmapIterator, CircularBuffer)
{
Eigen::Array2i submapTopLeftIndex(6, 3);
Eigen::Array2i submapBufferSize(2, 4);
Eigen::Array2i index;
Eigen::Array2i submapIndex;

std::vector<std::string> types;
types.push_back("type");
Expand Down
4 changes: 1 addition & 3 deletions grid_map_costmap_2d/test/test_costmap_2d_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ class TestCostmap2DConversion
const nav2_costmap_2d::Costmap2D & costMap)
{
// Check map info.
// Different conventions: Costmap2d returns the *centerpoint* of the last cell in the map.
grid_map::Length length =
gridMap.getLength() - grid_map::Length::Constant(0.5 * gridMap.getResolution());
grid_map::Length length = gridMap.getLength();
grid_map::Length position = gridMap.getPosition() - 0.5 * gridMap.getLength().matrix();
EXPECT_EQ(costMap.getSizeInMetersX(), length.x());
EXPECT_EQ(costMap.getSizeInMetersY(), length.y());
Expand Down
36 changes: 18 additions & 18 deletions grid_map_costmap_2d/test/test_costmap_2d_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include "rclcpp/rclcpp.hpp"

#include "tf2_ros/transform_broadcaster.h"
#include "tf2/transform_datatypes.h"
#include "tf2_ros/transform_broadcaster.hpp"
#include "tf2/transform_datatypes.hpp"

#include "test_costmap_2d_ros.hpp"

Expand Down Expand Up @@ -63,22 +63,22 @@ ROSCostmapServer::ROSCostmapServer(
: tfBuffer_(node_->get_clock()),
tfListener_(tfBuffer_)
{
// lots of parameters here affect the construction ( e.g. rolling window)
// if you don't have any parameters set, then this
// - alot of defaults which get dumped on the ros param server
// - fires up an obstacle layer and an inflation layer
// - creates a publisher for an occupancy grid

costmap_ = std::make_shared<ROSCostmap>(name);
costmap_->set_parameter(rclcpp::Parameter{"plugins", std::vector<std::string>()});
costmap_->set_parameter(rclcpp::Parameter{"robot_base_frame", baseLinkTransformName});
costmap_->set_parameter(rclcpp::Parameter{"origin_x", origin.x()});
costmap_->set_parameter(rclcpp::Parameter{"origin_y", origin.y()});
costmap_->set_parameter(rclcpp::Parameter{"width", width});
costmap_->set_parameter(rclcpp::Parameter{"height", height});
costmap_->set_parameter(rclcpp::Parameter{"resolution", 0.5});
// clears 1 cell if inside, up to 4 cells on a vertex
costmap_->set_parameter(rclcpp::Parameter{"robot_radius", 0.03});
// Costmap2DROS declares most parameters in on_configure(), so set them as overrides.
// Only the NodeOptions constructor keeps the overrides.
rclcpp::NodeOptions options;
options.arguments({"--ros-args", "-r", "__node:=" + name, "-r", "__ns:=/" + name});
options.parameter_overrides({
{"plugins", std::vector<std::string>()},
{"robot_base_frame", baseLinkTransformName},
{"origin_x", origin.x()},
{"origin_y", origin.y()},
{"width", width},
{"height", height},
{"resolution", 0.5},
// clears 1 cell if inside, up to 4 cells on a vertex
{"robot_radius", 0.03},
});
costmap_ = std::make_shared<ROSCostmap>(options);

costmap_->configure();
costmap_->activate();
Expand Down
2 changes: 1 addition & 1 deletion grid_map_costmap_2d/test/test_costmap_2d_ros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "rclcpp/rclcpp.hpp"

#include "tf2_ros/transform_listener.h"
#include "tf2_ros/transform_listener.hpp"
#include "geometry_msgs/msg/transform.hpp"
#include "geometry_msgs/msg/vector3.hpp"
#include "geometry_msgs/msg/quaternion.hpp"
Expand Down
6 changes: 3 additions & 3 deletions grid_map_cv/include/grid_map_cv/GridMapCvConverter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ class GridMapCvConverter

cv::Mat imageMono;
if (isColor && !hasAlpha) {
cv::cvtColor(image, imageMono, CV_BGR2GRAY);
cv::cvtColor(image, imageMono, cv::COLOR_BGR2GRAY);
} else if (isColor && hasAlpha) {
cv::cvtColor(image, imageMono, CV_BGRA2GRAY);
cv::cvtColor(image, imageMono, cv::COLOR_BGRA2GRAY);
} else if (!isColor && !hasAlpha) {
imageMono = image;
} else {
Expand Down Expand Up @@ -156,7 +156,7 @@ class GridMapCvConverter

cv::Mat imageRGB;
if (hasAlpha) {
cv::cvtColor(image, imageRGB, CV_BGRA2RGB);
cv::cvtColor(image, imageRGB, cv::COLOR_BGRA2RGB);
} else {
imageRGB = image;
}
Expand Down
93 changes: 43 additions & 50 deletions grid_map_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ find_package(OpenCV REQUIRED

grid_map_package()

set(dependencies
grid_map_msgs
grid_map_ros
rclcpp
set(demo_libraries
rclcpp::rclcpp
${grid_map_msgs_TARGETS}
${grid_map_ros_LIBRARIES}
)

###########
Expand All @@ -40,6 +40,9 @@ include_directories(
include
SYSTEM
${EIGEN3_INCLUDE_DIR}
${grid_map_cv_INCLUDE_DIRS}
${grid_map_octomap_INCLUDE_DIRS}
${grid_map_ros_INCLUDE_DIRS}
)

## Declare a cpp executable
Expand Down Expand Up @@ -112,76 +115,66 @@ add_executable(
)

## Specify libraries to link a library or executable target against
ament_target_dependencies(
simple_demo SYSTEM
${dependencies}
target_link_libraries(simple_demo PRIVATE
${demo_libraries}
)

ament_target_dependencies(
tutorial_demo SYSTEM
${dependencies}
target_link_libraries(tutorial_demo PRIVATE
${demo_libraries}
)

ament_target_dependencies(
iterators_demo SYSTEM
${dependencies}
target_link_libraries(iterators_demo PRIVATE
${demo_libraries}
)

ament_target_dependencies(image_to_gridmap_demo SYSTEM
${dependencies}
target_link_libraries(image_to_gridmap_demo PRIVATE
${demo_libraries}
)

ament_target_dependencies(
octomap_to_gridmap_demo SYSTEM
${dependencies}
grid_map_octomap
octomap_msgs
target_link_libraries(octomap_to_gridmap_demo PRIVATE
${demo_libraries}
${grid_map_octomap_LIBRARIES}
${octomap_msgs_TARGETS}
)

ament_target_dependencies(
move_demo SYSTEM
${dependencies}
)
# OctoMap 1.10.1 and older include <ciso646>, which emits a #warning in C++20.
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(octomap_to_gridmap_demo PRIVATE -Wno-error=cpp)
endif()

ament_target_dependencies(
iterator_benchmark SYSTEM
grid_map_core
target_link_libraries(move_demo PRIVATE
${demo_libraries}
)

ament_target_dependencies(
opencv_demo SYSTEM
${dependencies}
grid_map_cv
target_link_libraries(iterator_benchmark PRIVATE
grid_map_core::grid_map_core
)

ament_target_dependencies(
resolution_change_demo SYSTEM
${dependencies}
target_link_libraries(opencv_demo PRIVATE
${demo_libraries}
${grid_map_cv_LIBRARIES}
)

target_link_libraries(filters_demo filters_demo_lib)
target_link_libraries(resolution_change_demo PRIVATE
${demo_libraries}
)

ament_target_dependencies(
filters_demo_lib SYSTEM
${dependencies}
filters
target_link_libraries(filters_demo_lib PUBLIC
${demo_libraries}
${filters_TARGETS}
)

ament_target_dependencies(
filters_demo SYSTEM
${dependencies}
filters
target_link_libraries(filters_demo PRIVATE
filters_demo_lib
)

ament_target_dependencies(
normal_filter_comparison_demo SYSTEM
${dependencies}
filters
target_link_libraries(normal_filter_comparison_demo PRIVATE
${demo_libraries}
${filters_TARGETS}
)

ament_target_dependencies(
interpolation_demo SYSTEM
${dependencies}
target_link_libraries(interpolation_demo PRIVATE
${demo_libraries}
)

set(targets_list
Expand Down
2 changes: 1 addition & 1 deletion grid_map_demos/include/grid_map_demos/FiltersDemo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FiltersDemo : public rclcpp::Node
* Callback method for the incoming grid map message.
* @param message the incoming message.
*/
void callback(const grid_map_msgs::msg::GridMap::SharedPtr message);
void callback(const grid_map_msgs::msg::GridMap::ConstSharedPtr message);

private:
//! Name of the input grid map topic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ImageToGridmapDemo : public rclcpp::Node
*/
bool readParameters();

void imageCallback(const sensor_msgs::msg::Image::SharedPtr msg);
void imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr msg);

private:
//! Grid map publisher.
Expand Down
Loading
Loading