File tree Expand file tree Collapse file tree 8 files changed +40
-42
lines changed Expand file tree Collapse file tree 8 files changed +40
-42
lines changed Original file line number Diff line number Diff line change @@ -18,22 +18,19 @@ jobs:
18
18
container : ${{ matrix.config.container }}
19
19
steps :
20
20
- uses : actions/checkout@v4
21
- - name : Install Dependencies
22
- working-directory :
21
+ with :
22
+ path : src/grid_map_geo
23
+ - name : Install Dependencies with Rosdep
23
24
run : |
24
25
apt update
25
- apt install -y python3-wstool libgdal-dev
26
+ rosdep update
27
+ source /opt/ros/${{matrix.config.rosdistro}}/setup.bash
28
+ rosdep install --from-paths src --ignore-src -y
26
29
shell : bash
27
- - name : Build Test
30
+ - name : Colcon Build (Release)
28
31
working-directory :
29
32
run : |
30
- mkdir -p $HOME/ros2_ws/src;
31
- cd $HOME/ros2_ws/src
32
- ln -s $GITHUB_WORKSPACE
33
- cd $HOME/ros2_ws
34
- source /opt/ros/humble/setup.bash
35
- rosdep update
36
- rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}}
33
+ source /opt/ros/${{matrix.config.rosdistro}}/setup.bash
37
34
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map_geo
38
35
shell : bash
39
36
# - name: unit_tests
Original file line number Diff line number Diff line change @@ -14,16 +14,21 @@ jobs:
14
14
strategy :
15
15
fail-fast : false
16
16
matrix :
17
- container :
18
- - ' px4io/px4-dev-simulation-focal:2020-09-14 '
19
- container : ${{ matrix.container }}
17
+ config :
18
+ - {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'}
19
+ container : ${{ matrix.config. container }}
20
20
steps :
21
21
- uses : actions/checkout@v4
22
- - name : submodule update
23
- run : git submodule update --init --recursive
24
- - name : Install clang-format
25
- run : apt update && apt install -y clang-format-6.0
22
+ with :
23
+ path : src/grid_map_geo
24
+ - name : Install Dependencies with Rosdep
25
+ run : |
26
+ apt update
27
+ rosdep update
28
+ source /opt/ros/${{matrix.config.rosdistro}}/setup.bash
29
+ rosdep install --from-paths src --ignore-src -y --dependency-types test
30
+ shell : bash
26
31
- name : Check Code format
27
- working-directory : Tools
32
+ working-directory : src/grid_map_geo/ Tools
28
33
run : |
29
34
./check_code_format.sh ..
Original file line number Diff line number Diff line change 13
13
for arg in " $@ "
14
14
do
15
15
if [ -f $arg ]; then
16
- clang-format-6.0 -i -style=' {BasedOnStyle: google, ColumnLimit: 120}' $arg
16
+ clang-format -i -style=' {BasedOnStyle: google, ColumnLimit: 120}' $arg
17
17
elif [ -d $arg ]; then
18
- find $arg -iname ' *.h' -o -iname ' *.cpp' -o -iname ' *.hpp' | xargs clang-format-6.0 -i -style=' {BasedOnStyle: google, ColumnLimit: 120}'
18
+ find $arg -iname ' *.h' -o -iname ' *.cpp' -o -iname ' *.hpp' | xargs clang-format -i -style=' {BasedOnStyle: google, ColumnLimit: 120}'
19
19
find $arg -iname ' *.h' -o -iname ' *.cpp' -o -iname ' *.hpp' | xargs chmod 644
20
20
fi
21
21
done
Original file line number Diff line number Diff line change 34
34
#ifndef GRID_MAP_GEO_H
35
35
#define GRID_MAP_GEO_H
36
36
37
- #include " grid_map_geo/transform.hpp"
38
-
39
37
#include < grid_map_core/GridMap.hpp>
40
38
#include < grid_map_core/iterators/GridMapIterator.hpp>
41
- #include " tf2_ros/transform_broadcaster.h"
42
-
43
39
#include < iostream>
40
+
41
+ #include " grid_map_geo/transform.hpp"
42
+ #include " tf2_ros/transform_broadcaster.h"
44
43
struct Location {
45
44
ESPG espg{ESPG::WGS84};
46
45
Eigen::Vector3d position{Eigen::Vector3d::Zero ()};
@@ -86,20 +85,17 @@ class GridMapGeo {
86
85
87
86
/* *
88
87
* @brief Get the name of the coordinate frame of the dataset
89
- *
90
- * @return std::string
88
+ *
89
+ * @return std::string
91
90
*/
92
91
std::string getCoordinateName () { return coordinate_name_; };
93
92
94
-
95
93
/* *
96
94
* @brief Overloading terrain loading with only elevation
97
- *
95
+ *
98
96
* @param map_path Path to dsm path (Supported formats are *.tif)
99
97
*/
100
- bool Load (const std::string& map_path) {
101
- Load (map_path, " " );
102
- }
98
+ bool Load (const std::string& map_path) { Load (map_path, " " ); }
103
99
104
100
/* *
105
101
* @brief Helper function for loading terrain from path
@@ -109,7 +105,7 @@ class GridMapGeo {
109
105
* @return true Successfully loaded terrain
110
106
* @return false Failed to load terrain
111
107
*/
112
- bool Load (const std::string& map_path, const std::string & color_map_path);
108
+ bool Load (const std::string& map_path, const std::string& color_map_path);
113
109
114
110
/* *
115
111
* @brief Initialize grid map from a geotiff file
Original file line number Diff line number Diff line change 25
25
<exec_depend >ros2launch</exec_depend >
26
26
<exec_depend >rviz2</exec_depend >
27
27
28
+ <test_depend >clang-format</test_depend >
29
+
28
30
<export >
29
31
<build_type >ament_cmake</build_type >
30
32
</export >
Original file line number Diff line number Diff line change 58
58
#include < gdal/ogr_spatialref.h>
59
59
#endif
60
60
61
- GridMapGeo::GridMapGeo (const std::string& frame_id) { frame_id_ = frame_id; }
61
+ GridMapGeo::GridMapGeo (const std::string & frame_id) { frame_id_ = frame_id; }
62
62
63
63
GridMapGeo::~GridMapGeo () {}
64
64
Original file line number Diff line number Diff line change 37
37
* @author Jaeyoung Lim <[email protected] >
38
38
*/
39
39
40
+ #include " geometry_msgs/msg/transform_stamped.hpp"
40
41
#include " grid_map_geo/grid_map_geo.hpp"
41
-
42
- #include " rclcpp/rclcpp.hpp"
43
- #include " std_msgs/msg/string.hpp"
44
-
45
42
#include " grid_map_msgs/msg/grid_map.h"
46
43
#include " grid_map_ros/GridMapRosConverter.hpp"
47
- #include " geometry_msgs/msg/transform_stamped.hpp"
44
+ #include " rclcpp/rclcpp.hpp"
45
+ #include " std_msgs/msg/string.hpp"
48
46
#include " tf2_ros/static_transform_broadcaster.h"
49
47
50
48
using namespace std ::chrono_literals;
51
49
52
50
class MapPublisher : public rclcpp ::Node {
53
51
public:
54
52
MapPublisher () : Node(" map_publisher" ) {
55
-
56
53
std::string file_path = this ->declare_parameter (" tif_path" , " ." );
57
54
std::string color_path = this ->declare_parameter (" tif_color_path" , " ." );
58
55
std::string frame_id = this ->declare_parameter (" frame_id" , " map" );
Original file line number Diff line number Diff line change 1
- #include " grid_map_geo/transform.hpp"
2
-
3
1
#include < gtest/gtest.h>
2
+
4
3
#include < iostream>
5
4
5
+ #include " grid_map_geo/transform.hpp"
6
+
6
7
TEST (GridMapTest, geoTransform) {
7
8
Eigen::Vector3d berghaus_wgs84 (46.7209147 , 9.9219592 , 488.0 );
8
9
Eigen::Vector3d berghaus_lv03 (789823.96735451114 , 177416.47911055354 , 440.3752994351089 );
You can’t perform that action at this time.
0 commit comments