Skip to content

Commit

Permalink
Run pre-commit on all files
Browse files Browse the repository at this point in the history
* This commit will be hidden

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
  • Loading branch information
Ryanf55 committed Jan 20, 2024
1 parent fe5a4e8 commit 4d1faf2
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 75 deletions.
57 changes: 26 additions & 31 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
%YAML 1.2
---
name: Build Test
on:

on: # yamllint disable-line rule:truthy
push:
branches:
- 'ros2'
- 'ros2'
pull_request:
branches:
- '*'
- '*'

jobs:
build:
Expand All @@ -17,31 +20,23 @@ jobs:
- {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'}
container: ${{ matrix.config.container }}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
working-directory:
run: |
apt update
apt install -y python3-wstool libgdal-dev
shell: bash
- name: Build Test
working-directory:
run: |
mkdir -p $HOME/ros2_ws/src;
cd $HOME/ros2_ws/src
ln -s $GITHUB_WORKSPACE
cd $HOME/ros2_ws
source /opt/ros/humble/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}}
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map_geo
shell: bash
# - name: unit_tests
# working-directory:
# run: |
# cd $HOME/catkin_ws/src
# catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=True
# catkin build grid_map_geo --no-deps -i --catkin-make-args tests
# source $HOME/catkin_ws/devel/setup.bash
# status=0 && for f in $HOME/catkin_ws/devel/lib/*/*-test; do $f || exit 1; done
# shell: bash
- uses: actions/checkout@v4
- name: Install Dependencies
working-directory:
run: |
apt update
apt install -y python3-wstool libgdal-dev
shell: bash
- name: Build Test
working-directory:
run: |
mkdir -p $HOME/ros2_ws/src;
cd $HOME/ros2_ws/src
ln -s $GITHUB_WORKSPACE
cd $HOME/ros2_ws
source /opt/ros/humble/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -y
colcon build --cmake-args --mixin release --packages-up-to grid_map_geo
shell: bash
# TODO add unit tests
4 changes: 3 additions & 1 deletion .github/workflows/check_style.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
%YAML 1.2
---
name: Style Checks

on:
on: # yamllint disable-line rule:truthy
push:
branches:
- master
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/doxygen_build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
%YAML 1.2
---
name: Doxygen Build
on:

on: # yamllint disable-line rule:truthy
push:
branches:
- 'ros2'
Expand All @@ -15,4 +18,3 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: mattnotmitt/doxygen-action@v1.9.5

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map_g

## Running the package

The default launch file can be run as the following command.
The default launch file can be run as the following command.
```
source install/setup.bash
ros2 launch grid_map_geo load_tif_launch.xml
```

6 changes: 3 additions & 3 deletions include/grid_map_geo/grid_map_geo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ class GridMapGeo {

/**
* @brief Get the name of the coordinate frame of the dataset
*
* @return std::string
*
* @return std::string
*/
std::string getCoordinateName() { return coordinate_name_; };


/**
* @brief Overloading terrain loading with only elevation
*
*
* @param map_path Path to dsm path (Supported formats are *.tif)
*/
bool Load(const std::string& map_path) {
Expand Down
37 changes: 17 additions & 20 deletions launch/load_multiple_tif_launch.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<?xml version="1.0"?>
<launch>
<arg name="rviz" default="true"/>
<node pkg="tf2_ros" exec="static_transform_publisher" name="world_map" args="--frame-id world --child-frame-id map"/>

<node pkg="grid_map_geo" exec="test_tif_loader" name="first_tif_loader" output="screen">
<param name="frame_id" value="map"/>
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/sargans.tif"/>
<param name="tif_color_path" value="$(find-pkg-share grid_map_geo)/resources/sargans_color.tif"/>
</node>

<node pkg="grid_map_geo" exec="test_tif_loader" name="second_tif_loader" output="screen">
<param name="frame_id" value="dischma_valley"/>
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/dischma_valley.tif"/>
<param name="tif_color_path" value="$(find-pkg-share grid_map_geo)/resources/dischma_valley_color.tif"/>
<remap from="elevation_map" to="second_elevation_map"/>
</node>


<group if="$(var rviz)">
<node exec="rviz2" name="rviz2" pkg="rviz2" args="-d $(find-pkg-share grid_map_geo)/rviz/multi_config.rviz" />
</group>
<arg name="rviz" default="true"/>
<node pkg="tf2_ros" exec="static_transform_publisher" name="world_map" args="--frame-id world --child-frame-id map"/>
<node pkg="grid_map_geo" exec="test_tif_loader" name="first_tif_loader" output="screen">
<param name="frame_id" value="map"/>
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/sargans.tif"/>
<param name="tif_color_path" value="$(find-pkg-share grid_map_geo)/resources/sargans_color.tif"/>
</node>
<node pkg="grid_map_geo" exec="test_tif_loader" name="second_tif_loader" output="screen">
<param name="frame_id" value="dischma_valley"/>
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/dischma_valley.tif"/>
<param name="tif_color_path" value="$(find-pkg-share grid_map_geo)/resources/dischma_valley_color.tif"/>
<remap from="elevation_map" to="second_elevation_map"/>
</node>
<group if="$(var rviz)">
<node exec="rviz2" name="rviz2" pkg="rviz2" args="-d $(find-pkg-share grid_map_geo)/rviz/multi_config.rviz"/>
</group>
</launch>
23 changes: 11 additions & 12 deletions launch/load_tif_launch.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0"?>
<launch>
<arg name="rviz" default="true"/>
<arg name="location" default="sargans"/>
<node pkg="tf2_ros" exec="static_transform_publisher" name="world_map" args="--frame-id world --child-frame-id map"/>

<node pkg="grid_map_geo" exec="test_tif_loader" name="test_tif_loader" namespace="grid_map_geo" output="screen">
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/sargans.tif"/>
<param name="tif_color_path" value="$(find-pkg-share grid_map_geo)/resources/sargans_color.tif"/>
</node>

<group if="$(var rviz)">
<node pkg="rviz2" exec="rviz2" name="rviz2" args="-d $(find-pkg-share grid_map_geo)/rviz/config.rviz"/>
</group>
<arg name="rviz" default="true"/>
<arg name="location" default="sargans"/>
<node pkg="tf2_ros" exec="static_transform_publisher" name="world_map" args="--frame-id world --child-frame-id map"/>
<node pkg="grid_map_geo" exec="test_tif_loader" name="test_tif_loader" namespace="grid_map_geo" output="screen">
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/sargans.tif"/>
<param name="tif_color_path" value="$(find-pkg-share grid_map_geo)/resources/sargans_color.tif"/>
</node>
<group if="$(var rviz)">
<node pkg="rviz2" exec="rviz2" name="rviz2" args="-d $(find-pkg-share grid_map_geo)/rviz/config.rviz"/>
</group>
</launch>
3 changes: 0 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
<maintainer email="ryanfriedman5410+github@gmail.com">Ryan Friedman</maintainer>
<author>Jaeyoung Lim</author>
<license>BSD-3</license>

<url type="website">https://github.com/Jaeyoung-Lim/grid_map_geo</url>
<url type="bugtracker">https://github.com/Jaeyoung-Lim/grid_map_geo/issues</url>

<buildtool_depend>ament_cmake</buildtool_depend>
<depend>eigen</depend>
<depend>grid_map_core</depend>
Expand All @@ -22,7 +20,6 @@
<depend>yaml_cpp_vendor</depend>
<exec_depend>ros2launch</exec_depend>
<exec_depend>grid_map_rviz_plugin</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add gtest based cpp test target and link libraries
find_package(ament_cmake_gtest)
ament_add_gtest(${PROJECT_NAME}-test
ament_add_gtest(${PROJECT_NAME}-test
main.cpp
test_grid_map_geo.cpp
)
Expand Down

0 comments on commit 4d1faf2

Please sign in to comment.