Install GeographicLibs datasets in Clover CMakeLists.txt

This commit is contained in:
Oleg Kalachev
2022-09-15 09:56:14 +03:00
parent 1e12498cb2
commit 2db77dfe97
4 changed files with 12 additions and 2 deletions

View File

@@ -29,8 +29,6 @@ jobs:
run: apt-get update && apt-get -y install python3-pip
- name: Install dependencies
run: rosdep update && rosdep install --from-paths src --ignore-src -y
- name: Install GeographicLib datasets
run: wget -qO- https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | bash
- name: catkin_make
run: source /opt/ros/$ROS_DISTRO/setup.bash && catkin_make
- name: Run tests

View File

@@ -46,6 +46,14 @@ find_package(OpenCV ${_opencv_version} REQUIRED
imgproc
)
# Download GeographicLib datasets
message(STATUS "Downloading GeographicLib datasets to ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}")
add_custom_target(download_geographiclib_datasets ALL
COMMAND geographiclib-get-geoids -p ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/GeographicLib egm96-5
COMMAND geographiclib-get-gravity -p ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/GeographicLib egm96
COMMAND geographiclib-get-magnetic -p ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/GeographicLib emm2015
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)

View File

@@ -44,6 +44,9 @@
<!-- remap rangefinder -->
<remap from="mavros/distance_sensor/rangefinder_sub" to="$(arg distance_sensor_remap)" if="$(eval bool(distance_sensor_remap))"/>
<!-- path to find GoegraphicLib datasets -->
<env name="GEOGRAPHICLIB_DATA" value="$(eval env('CMAKE_PREFIX_PATH').split(':')[0] + '/share/GeographicLib')"/>
<rosparam param="plugin_whitelist">
- altitude
- command

View File

@@ -4,6 +4,7 @@
<node pkg="mavros" type="mavros_node" name="mavros" required="true" output="screen">
<param name="fcu_url" value="udp://@127.0.1:14557"/>
<rosparam command="load" file="$(find clover)/launch/mavros_config.yaml"/>
<env name="GEOGRAPHICLIB_DATA" value="$(eval env('CMAKE_PREFIX_PATH').split(':')[0] + '/share/GeographicLib')"/>
</node>
<node name="visualization" pkg="mavros_extras" type="visualization" required="true">