Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
73ea27f
Merge branch 'fix/grid_map_rviz_plugin_segfault_on_melodic' into 'mas…
mgaertneratanybotics Dec 1, 2020
27e651b
Merge branch 'feature/_extend_grid_map_threshold_filter' into 'master'
YoshuaNavaANYbotics Dec 3, 2020
191c4f0
Merge branch 'feature/_morphological_mask_in_median_fill_filter' into…
YoshuaNavaANYbotics Dec 9, 2020
25a9844
Merge branch 'fix/mock_filter_behaviour_if_print_name_not_set' into '…
mgaertneratanybotics Dec 10, 2020
49d3159
Merge branch 'fix/grid_map_jenkins_pipeline' into 'master'
mgaertneratanybotics Dec 10, 2020
b5d2b93
Merge branch 'fix/grid_map_jenkins_melodic' into 'master'
mgaertneratanybotics Dec 15, 2020
61972c8
Merge branch 'fix/visibility_cleanup' into 'master'
mgaertneratanybotics Dec 15, 2020
f1344bd
Merge branch 'fix/clip_points_to_map' into 'master'
maximilianwulf Dec 16, 2020
8536d55
Merge branch 'fix/update_readme' into 'master'
maximilianwulf Jan 4, 2021
b02aa92
Merge branch 'feature/grid-map/v1-6-4'
samuelba Jan 6, 2021
9cbb4eb
Merge branch 'github/grid_map/255' into 'master'
maximilianwulf Jan 8, 2021
381b30e
Merge branch 'feature/update_readme_grid_map' into 'master'
Jan 13, 2021
539f9db
Merge branch 'fix/perception_compiler_warnings' into 'master'
Feb 16, 2021
0c0724f
Merge branch 'fix/grid_map_cv_remove_compiler_warnings' into 'master'
Mar 30, 2021
9bf14a1
Merge branch 'fix/grid_map_visualization_remove_compiler_warnings' in…
Mar 31, 2021
6297da7
Merge branch 'fix/grid_map_sdf_remove_compiler_warnings' into 'master'
Apr 1, 2021
9f68a57
Merge branch 'fix/grid_map_filters_remove_compiler_warnings' into 'ma…
Apr 1, 2021
1cbbf46
Merge branch 'fix/grid_map_ros_remove_gcc_warnings' into 'master'
Apr 6, 2021
6ddff74
Merge branch 'fix/grid_map_core_remove_compiler_warnings' into 'master'
Apr 7, 2021
758b504
Merge branch 'fix/grid_map_demos_remove_compiler_warnings' into 'master'
Apr 7, 2021
792e083
Merge branch 'fix/change_install_grid_map' into 'master'
maximilianwulf Jun 1, 2021
ee5edb0
Merge branch 'github/grid_map/293' into 'master'
maximilianwulf Jun 1, 2021
d564ab0
Merge branch 'fix/grid-map-rviz-plugin/render-in-gui-thread' into 'ma…
samuelba Jul 22, 2021
b207fee
Merge branch 'fix/grid-map-rviz-plugin/reset' into 'master'
samuelba Jul 30, 2021
761e11b
Merge branch 'release-21.08' of git.anybotics.com:anybotics/anybotics
remod Aug 13, 2021
893a416
Merge branch 'release-21.10' of git.anybotics.com:anybotics/anybotics
remod Oct 12, 2021
26db24a
Merge branch 'anymal_research/rsl/feature/grid_map_vis' into 'master'
Nov 3, 2021
0e4b5a4
Merge branch 'fix/grid_map/increase_unit_test_value' into 'master'
maximilianwulf Nov 18, 2021
794909a
Merge branch 'github/grid_map/297' into 'master'
mgaertneratanybotics Nov 22, 2021
55c0085
Merge branch 'github/grid_map/327' into 'master'
maximilianwulf Nov 25, 2021
fb3bcd6
Merge branch 'fix/elevation_mapping_post_processor_for_scaffolding_st…
maximilianwulf Nov 26, 2021
c88a9e3
Merge remote-tracking branch 'origin/release-21.11'
pleemann Nov 26, 2021
32978d9
Merge branch 'anymal_research/rsl/fix/grid_map_pcl' into 'master'
maximilianwulf Nov 30, 2021
a2eb6b1
Merge branch 'feature/grid_map/update_maintainers' into 'master'
maximilianwulf Dec 3, 2021
b59cd8c
Merge branch 'feature/grid_map_filters_improve_template_definitions' …
mgaertneratanybotics Dec 21, 2021
ccc4ad6
Merge branch 'feature/documentation_on_grid_map_move' into 'master'
mgaertneratanybotics Jan 5, 2022
d6d4650
Merge remote-tracking branch 'origin/release-22.01'
domingoesteban Feb 2, 2022
6b9a948
Merge branch 'fix/grid_map/failing_costmap_rostest' into 'master'
maximilianwulf Feb 9, 2022
6ad3aff
Merge branch 'fix/threshold_obstacle_frame' into 'master'
Feb 16, 2022
ba52294
Merge branch 'feature/eigen_utils_/dependencies' into 'master'
mgaertneratanybotics Mar 24, 2022
c23dcde
Merge remote-tracking branch 'origin/feature/merge/release-22.04-into…
hwyss-anybotics Apr 13, 2022
2459bde
Merge branch 'github/grid_map/211' into 'master'
maximilianwulf May 6, 2022
a15f50c
Merge branch 'fix/grid_map_remove_unused_code' into 'master'
harmishhk May 16, 2022
2a937c0
Merge branch 'feature/anydrive_rsl' into 'master'
samuelba May 23, 2022
7dbe117
Merge branch 'release-22.05'
samuelba May 28, 2022
f4ccb5f
Merge branch 'fix/grid_map_filters/define_include_path' into 'master'
maximilianwulf Jun 2, 2022
b7293f5
Merge branch 'fix/grid_map_core/reduce_clang_warnings' into 'master'
mgaertneratanybotics Jun 3, 2022
91ba880
Merge branch 'anymal_research/rsl/feature/grid_map_sdf' into 'master'
maximilianwulf Jun 23, 2022
4249a9d
Merge branch 'fix/grid_map_core_version' into 'master'
fvina-anybotics Jun 27, 2022
52c10ef
Merge remote-tracking branch 'origin/release-22.07'
remod Jul 1, 2022
d6f0912
Merge branch 'fix/grid_map_core/reduce_even_more_clang_warnings' into…
mgaertneratanybotics Jul 11, 2022
bb636e6
Merge branch 'release-22.08'
samuelba Aug 13, 2022
fd4034b
Merge branch 'release-22.10' into master
YoshuaNava Oct 10, 2022
03f8676
Merge branch 'release-22.12' of git.anybotics.com:anybotics/anybotics
hogabrie Nov 25, 2022
c4b8776
Merge branch 'release-23.02' of git.anybotics.com:anybotics/anybotics
remod Jan 20, 2023
c6b6e6c
Merge branch 'fix/grid_map_rviz/visualization_toggle_on_startup' into…
mgaertneratanybotics Feb 1, 2023
515e3d8
Merge branch 'feature/grid_map_rviz/anybotics_color_map' into 'master'
mgaertneratanybotics Feb 23, 2023
9d0de96
Merge remote-tracking branch 'origin/release-23.04'
Mar 24, 2023
7406b98
Merge branch 'fix/grid_map_rviz_plugin_crash' into 'master'
fvina-anybotics Apr 19, 2023
678f691
Merge branch 'fix/grid_map_rviz_plugin/reset_behavior' into 'master'
mgaertneratanybotics Apr 19, 2023
80863e9
Merge branch 'release-23.05' of git.anybotics.com:anybotics/anybotics
FGiraldez May 12, 2023
38bc721
Merge branch 'release-23.07' of git.anybotics.com:anybotics/anybotics
hogabrie Jul 1, 2023
0b889ca
Merge branch 'release-23.09'
pleemann Aug 18, 2023
da3ee2e
Merge release-23.10 into master.
PrajishKumar Oct 6, 2023
2be3747
Merge branch 'release-23.10'
samuelba Oct 10, 2023
53340cd
Merge branch 'fix/perception_code_cpp17' into 'master'
rororov Nov 15, 2023
8be23b7
Merge branch 'release-23.12'
PrajishKumar Nov 24, 2023
5af6906
xMerge branch 'release-24.02' of git.anybotics.com:anybotics/anybotics
hogabrie Jan 19, 2024
4c34876
Merge branch 'release-24.04'
samuelba Apr 13, 2024
caa687b
Merge branch 'release-24.06'
mgaertneratanybotics May 24, 2024
46accc2
Merge remote-tracking branch 'origin/release-24.07'
Jul 5, 2024
887260e
Merge branch 'feature/sanitize_msg_headers' into 'master'
remod Jul 11, 2024
725d1ab
Merge branch 'feature/ros2/migrate_grid_map_msgs' into 'master'
mgaertneratanybotics Jul 15, 2024
552ed01
Merge branch 'fix/clean_grid_map_msgs_ros2' into 'master'
domingoesteban Jul 24, 2024
1c726c9
Merge branch 'release-24.09'
samuelba Aug 23, 2024
2dce579
Merge branch 'feature/grid_map/update_docs' into 'master'
maximilianwulf Sep 9, 2024
be3bbc9
Merge branch 'release-24.11'
Oct 18, 2024
34f1ff8
Merge branch 'fix/removed_const_map_from_a_header' into 'master'
Jan 30, 2025
e3e24f0
Merge remote-tracking branch 'origin/release-25.03'
fvina-anybotics Feb 14, 2025
73a5b61
Merge branch 'fix/grid_map/conversion_warnings' into 'master'
mgaertneratanybotics Feb 21, 2025
d467025
Merge branch 'feature/reverted_grid_map_msgs_port' into 'master'
ANYZichong Sep 12, 2025
c91cd28
Merge branch 'feature/grid_map_msgs_maintainer' into 'master'
ANYZichong Sep 29, 2025
cdd0ea2
manual squash to master, see https://git.anybotics.com/anybotics/anyb…
Jan 12, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@
# OS X
.DS_Store

grid_map_pcl/data/
grid_map_pcl/data/*
!grid_map_pcl/data/input_cloud.pcd
96 changes: 67 additions & 29 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions grid_map/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package grid_map
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.7.0 (2022-03-17)
------------------

1.6.4 (2020-12-04)
------------------

1.6.2 (2019-10-14)
------------------

Expand Down
6 changes: 3 additions & 3 deletions grid_map/package.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<package format="2">
<name>grid_map</name>
<version>1.6.2</version>
<version>1.7.18</version>
<description>Meta-package for the universal grid map library.</description>
<maintainer email="mwulf@anybotics.com">Maximilian Wulf</maintainer>
<maintainer email="ynava@anybotics.com">Yoshua Nava</maintainer>
<maintainer email="mgaertner@anybotics.com">Magnus Gaertner</maintainer>
<maintainer email="magostinucci@anybotics.com">Mathieu Agostinucci</maintainer>
<license>BSD</license>
<url type="website">http://github.com/anybotics/grid_map</url>
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
Expand Down
6 changes: 6 additions & 0 deletions grid_map_core/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package grid_map_core
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.7.0 (2022-03-17)
------------------

1.6.4 (2020-12-04)
------------------

1.6.2 (2019-10-14)
------------------
* Implements a grid map transformation from one map frame to another map frame given the transform between the frames.
Expand Down
2 changes: 1 addition & 1 deletion grid_map_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5.1)
project(grid_map_core)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
Expand Down
6 changes: 3 additions & 3 deletions grid_map_core/include/grid_map_core/BufferRegion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class BufferRegion
constexpr static unsigned int nQuadrants = 4;

BufferRegion();
BufferRegion(const Index& startIndex, const Size& size, const BufferRegion::Quadrant& quadrant);
virtual ~BufferRegion();
BufferRegion(Index startIndex, Size size, BufferRegion::Quadrant quadrant);
virtual ~BufferRegion() = default;

const Index& getStartIndex() const;
void setStartIndex(const Index& startIndex);
Expand All @@ -48,7 +48,7 @@ class BufferRegion
private:

//! Start index (typically top-left) of the buffer region.
Index staretIndex_;
Index startIndex_;

//! Size of the buffer region.
Size size_;
Expand Down
14 changes: 7 additions & 7 deletions grid_map_core/include/grid_map_core/CubicInterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GridMap;
* necessary for interpolation. These are either 16
* function values in the case of bicubic convolution interpolation
* or function values and their derivatives for the case
* of standard bicubic inteprolation.
* of standard bicubic interpolation.
*/
using FunctionValueMatrix = Eigen::Matrix4d;

Expand All @@ -46,7 +46,7 @@ using FunctionValueMatrix = Eigen::Matrix4d;
* @param[in] nElem - number of elements in the container
* @return index that is within [0, nElem-1].
*/
unsigned int bindIndexToRange(int idReq, unsigned int nElem);
unsigned int bindIndexToRange(unsigned int idReq, unsigned int nElem);


/*!
Expand Down Expand Up @@ -74,7 +74,7 @@ static const Eigen::Matrix4d cubicInterpolationConvolutionMatrix {
-1.0, 3.0, -3.0, 1.0).finished() };

/*
* Index of the middle knot for bicubic inteprolation. This is
* Index of the middle knot for bicubic interpolation. This is
* the function value with subscripts (0,0), i.e. f00 in
* https://en.wikipedia.org/wiki/Bicubic_interpolation
* In the grid map it corresponds to the grid map point closest to the
Expand All @@ -100,7 +100,7 @@ bool getNormalizedCoordinates(const GridMap &gridMap, const Position &queriedPos
Position *position);

/*
* Queries the grid map for function values at the coordiantes which are neccesary for
* Queries the grid map for function values at the coordinates which are necessary for
* performing the interpolation. The right function values are then assembled
* in a matrix.
* @param[in] gridMap - grid map with the data
Expand All @@ -119,7 +119,7 @@ bool assembleFunctionValueMatrix(const GridMap &gridMap, const std::string &laye
* Performs convolution in 1D. the function requires 4 function values
* to compute the convolution. The result is interpolated data in 1D.
* @param[in] t - normalized coordinate (x or y)
* @param[in] functionValues - vector of 4 function values neccessary to perform
* @param[in] functionValues - vector of 4 function values necessary to perform
* interpolation in 1 dimension.
* @return - interpolated value at normalized coordinate t
*/
Expand Down Expand Up @@ -177,7 +177,7 @@ struct DataMatrix

/*
* Interpolation is performed on a unit square.
* Hence we need to compute 4 corners of that unit square,
* Hence, we need to compute 4 corners of that unit square,
* and find their indices in the grid map. IndicesMatrix
* is a container that stores those indices. Each index
* contains two numbers (row number, column number) in the
Expand Down Expand Up @@ -313,7 +313,7 @@ double mixedSecondOrderDerivativeAt(const Matrix &layerData, const Index &index,
double evaluatePolynomial(const FunctionValueMatrix &functionValues, double tx, double ty);

/*
* Assemble function value matrix from small submatrices containing function values
* Assemble function value matrix from small sub-matrices containing function values
* or derivative values at the corners of the unit square.
* See https://en.wikipedia.org/wiki/Bicubic_interpolation for details.
*
Expand Down
83 changes: 41 additions & 42 deletions grid_map_core/include/grid_map_core/GridMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#pragma once

#include "grid_map_core/TypeDefs.hpp"
#include "grid_map_core/SubmapGeometry.hpp"
#include "grid_map_core/BufferRegion.hpp"
#include "grid_map_core/SubmapGeometry.hpp"
#include "grid_map_core/TypeDefs.hpp"

// STL
#include <vector>
#include <unordered_map>
#include <vector>

// Eigen
#include <Eigen/Core>
Expand All @@ -37,8 +37,7 @@ class SubmapGeometry;
* - "surface_normal_x", "surface_normal_y", "surface_normal_z"
* etc.
*/
class GridMap
{
class GridMap {
public:
// Type traits for use with template methods/classes using GridMap as a template parameter.
typedef grid_map::DataType DataType;
Expand All @@ -48,7 +47,7 @@ class GridMap
* Constructor.
* @param layers a vector of strings containing the definition/description of the data layer.
*/
GridMap(const std::vector<std::string>& layers);
explicit GridMap(const std::vector<std::string>& layers);

/*!
* Emtpy constructor.
Expand All @@ -74,8 +73,7 @@ class GridMap
* @param resolution the cell size in [m/cell].
* @param position the 2d position of the grid map in the grid map frame [m].
*/
void setGeometry(const Length& length, const double resolution,
const Position& position = Position::Zero());
void setGeometry(const Length& length, const double resolution, const Position& position = Position::Zero());

/*!
* Set the geometry of the grid map from submap geometry information.
Expand All @@ -88,7 +86,7 @@ class GridMap
* @param layer the name of the layer.
* @value value the value to initialize the cells with.
*/
void add(const std::string& layer, const double value = NAN);
void add(const std::string& layer, const float value = NAN);

/*!
* Add a new data layer (if the layer already exists, overwrite its data, otherwise add layer and data).
Expand Down Expand Up @@ -127,7 +125,7 @@ class GridMap
* @return grid map data as matrix.
* @throw std::out_of_range if no map layer with name `layer` is present.
*/
const Matrix& operator [](const std::string& layer) const;
const Matrix& operator[](const std::string& layer) const;

/*!
* Returns the grid map data for a layer as non-const. Use this method
Expand All @@ -136,7 +134,7 @@ class GridMap
* @return grid map data.
* @throw std::out_of_range if no map layer with name `layer` is present.
*/
Matrix& operator [](const std::string& layer);
Matrix& operator[](const std::string& layer);

/*!
* Removes a layer from the grid map.
Expand Down Expand Up @@ -283,8 +281,7 @@ class GridMap
* @param vector the vector with the values of the data type.
* @return true if successful, false if no valid data available.
*/
bool getVector(const std::string& layerPrefix, const Index& index,
Eigen::Vector3d& vector) const;
bool getVector(const std::string& layerPrefix, const Index& index, Eigen::Vector3d& vector) const;

/*!
* Gets a submap from the map. The requested submap is specified with the requested
Expand All @@ -309,12 +306,12 @@ class GridMap
* @param[out] isSuccess true if successful, false otherwise.
* @return submap (is empty if success is false).
*/
GridMap getSubmap(const Position& position, const Length& length, Index& indexInSubmap,
bool& isSuccess) const;
GridMap getSubmap(const Position& position, const Length& length, Index& indexInSubmap, bool& isSuccess) const;

/*!
* Apply isometric transformation (rotation + offset) to grid map and returns the transformed map.
* Note: The returned map may not have the same length since it's geometric description contains
* Note: The transformation will only be applied to the height layer of the grid map, other layers will remain untouched.
* the original map.
* @param[in] transform the requested transformation to apply.
* @param[in] heightLayerName the height layer of the map.
Expand All @@ -325,26 +322,33 @@ class GridMap
* @return transformed map.
* @throw std::out_of_range if no map layer with name `heightLayerName` is present.
*/
GridMap getTransformedMap(const Eigen::Isometry3d& transform, const std::string& heightLayerName,
const std::string& newFrameId,
GridMap getTransformedMap(const Eigen::Isometry3d& transform, const std::string& heightLayerName, const std::string& newFrameId,
const double sampleRatio = 0.0) const;

/*!
* Set the position of the grid map.
* Note: This method does not change the data stored in the grid map and
* is complementary to the `move(...)` method. For a comparison between
* the `setPosition` and the `move` method, see the `move_demo_node.cpp`
* file of the `grid_map_demos` package.
* @param position the 2d position of the grid map in the grid map frame [m].
*/
void setPosition(const Position& position);

/*!
* Move the grid map w.r.t. to the grid map frame. Use this to move the grid map
* boundaries without moving the grid map data. Takes care of all the data handling,
* such that the grid map data is stationary in the grid map frame.
* Note: For a comparison between the `setPosition` and the `move` method,
* see the `move_demo_node.cpp` file of the `grid_map_demos` package.
* Set the position of the grid map.
* Note: This method does not change the data stored in the grid map and
* is complementary to the `move(...)` method. For a comparison between
* the `setPosition` and the `move` method, see the `move_demo_node.cpp`
* file of the `grid_map_demos` package.
* @param position the 2d position of the grid map in the grid map frame [m].
*/
void setPosition(const Position& position);

/*!
* Relocates the region captured by grid map w.r.t. to the static grid map frame. Use this to move the grid map boundaries
* without relocating the grid map data. Takes care of all the data handling, such that the grid map data is stationary in the grid map
* frame.
* - Data in the overlapping region before and after the position change remains stored.
* - Data that falls outside the map at its new position is discarded.
* - Cells that cover previously unknown regions are emptied (set to nan).
* The data storage is implemented as two-dimensional circular buffer to minimize computational effort.
*
* Note: Due to the circular buffer structure, neighbouring indices might not fall close in the map frame.
* This assumption only holds for indices obtained by getUnwrappedIndex().
*
* Note: For a comparison between the `setPosition` and the `move` method, see the `move_demo_node.cpp` file of the `grid_map_demos` package.
*
* @param position the new location of the grid map in the map frame.
* @param newRegions the regions of the newly covered / previously uncovered regions of the buffer.
* @return true if map has been moved, false otherwise.
Expand All @@ -369,8 +373,7 @@ class GridMap
* @param layers the layers that are copied if not all layers are used.
* @return true if successful.
*/
bool addDataFrom(const GridMap& other, bool extendMap,
bool overwriteData, bool copyAllLayers,
bool addDataFrom(const GridMap& other, bool extendMap, bool overwriteData, bool copyAllLayers,
std::vector<std::string> layers = std::vector<std::string>());

/*!
Expand Down Expand Up @@ -515,7 +518,6 @@ class GridMap
*/
bool atPositionLinearInterpolated(const std::string& layer, const Position& position, float& value) const;


/*!
* Get cell data at requested position, cubic convolution
* interpolated from 4x4 cells. At the edge of the map,
Expand All @@ -527,8 +529,7 @@ class GridMap
* @param[out] value the data of the cell.
* @return true if bicubic convolution interpolation was successful.
*/
bool atPositionBicubicConvolutionInterpolated(const std::string& layer, const Position& position,
float& value) const;
bool atPositionBicubicConvolutionInterpolated(const std::string& layer, const Position& position, float& value) const;

/*!
* Get cell data at requested position, cubic interpolated
Expand All @@ -541,9 +542,7 @@ class GridMap
* @param[out] value the data of the cell.
* @return true if bicubic interpolation was successful.
*/
bool atPositionBicubicInterpolated(const std::string& layer, const Position& position,
float& value) const;

bool atPositionBicubicInterpolated(const std::string& layer, const Position& position, float& value) const;

/*!
* Resize the buffer.
Expand Down Expand Up @@ -580,11 +579,11 @@ class GridMap
//! Size of the buffer (rows and cols of the data structure).
Size size_;

//! Circular buffer start indeces.
//! Circular buffer start indices.
Index startIndex_;

public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};

} /* namespace */
} // namespace grid_map
Loading