Skip to content

Commit

Permalink
Get launch file running aside from resources
Browse files Browse the repository at this point in the history
* Update docs
* Remove ROS1 cruft

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
  • Loading branch information
Ryanf55 committed Oct 22, 2023
1 parent 6df6dc0 commit f12bf51
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 39 deletions.
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,28 @@ endif()

target_link_libraries(${PROJECT_NAME} Eigen3::Eigen GDAL::GDAL grid_map_core::grid_map_core)

ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
ament_export_dependencies(GDAL)

install(
DIRECTORY include/
DESTINATION include
)

install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/
)

install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)

include(CTest)
if(BUILD_TESTING)
add_subdirectory(test)
Expand Down
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,22 @@ This package provides a georeferenced extension to the elevation map [grid_map](
Affiliation: [ETH Zurich, Autonomous Systems Lab](https://asl.ethz.ch/)<br />**
## Setup
Install the dependencies. This package depends on gdal, to read georeferenced images and GeoTIFF files.
```
apt install libgdal-dev
```
Configure the catkin workspace
```
catkin config --extend "/opt/ros/noetic"
catkin config --merge-devel
```

Pull in dependencies using rosinstall / rosdep
Pull in dependencies using rosdep
```
wstool init src src/grid_map_geo/dependencies.rosinstall
wstool update -t src -j4
source /opt/ros/humble/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -y --rosdistro noetic
# Assuming the package is cloned in the src folder of a ROS workspace...
rosdep install --from-paths src --ignore-src -y
```

Build the package
```
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False
catkin build -j$(nproc) -l$(nproc) grid_map_geo
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False --packages-up-to grid_map_geo
```
## Running the package
The default launch file can be run as the following command.
```
roslaunch grid_map_geo load_tif.launch
source install/setup.bash
ros2 launch grid_map_geo load_tif_launch.xml
```
4 changes: 0 additions & 4 deletions dependencies.rosinstall

This file was deleted.

14 changes: 0 additions & 14 deletions launch/load_tif.launch

This file was deleted.

14 changes: 14 additions & 0 deletions launch/load_tif_launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<launch>
<arg name="visualization" 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" output="screen">
<param name="tif_path" value="$(find-pkg-share grid_map_geo)/resources/sertig.tif"/>
<param name="color_path" value="$(find-pkg-share grid_map_geo)/resources/sertig_color.tif"/>
</node>

<group if="$(var visualization)">
<node exec="rviz" name="rviz" pkg="rviz" args="-d $(find-pkg-share grid_map_geo)/launch/config.rviz" />
</group>
</launch>
14 changes: 8 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>grid_map_geo</name>
<version>0.0.1</version>
<description>Georeferenced grid map</description>

<maintainer email="jalim@ethz.ch">Jaeyoung Lim</maintainer>
<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>

<!-- Dependencies which this package needs to build itself. -->
<buildtool_depend>colcon</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>eigen</depend>
<depend>grid_map_core</depend>
<depend>grid_map_ros</depend>
<depend>libgdal-dev</depend>
<depend>rclcpp</depend>
<exec_depend>ros2launch</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>

0 comments on commit f12bf51

Please sign in to comment.