Skip to content

How to build and install gauss utm?

Héctor Pérez León edited this page Mar 11, 2021 · 15 revisions

How to build and install gauss-utm?

The installation is done under Ubuntu 16.04 with ROS Kinetic

  1. Follow the instructions for install and build the GRVC UAV abstraction layer on release 3.0. (Instead of catkin_make, you can use catkin build to compile).

  2. Change from ual master branch to branch fixed_wing

$ cd ~/catkin_ws/src/grvc-ual
$ git checkout fixed_wing
  1. Follow these instructions to install SITL PX4 if you want to do simulations.

  2. Follow these instructions which is a UAV Path And Trajectory Follower.

  3. Clone Path Planner in your workspace

$ cd ~/catkin_ws/src
$ git clone https://github.com/Angel-M-Montes/path_planner
  1. Clone this repository in your workspace.
$ cd ~/catkin_ws/src
$ git clone https://github.com/grvcTeam/gauss.git
  1. Install some extra dependencies.
$ sudo apt-get install ros-kinetic-mqtt-bridge
$ sudo apt-get install libpugixml-dev
  1. Build and source your workspace.
$ cd ~/catkin_ws
$ catkin build

In case GeographicLib is not found, create/modify the file /usr/share/cmake/geographiclib/FindGeographicLib.cmake with the following content (thanks, stackoverflow):

# Look for GeographicLib
#
# Sets
#  GeographicLib_FOUND = TRUE
#  GeographicLib_INCLUDE_DIRS = /usr/local/include
#  GeographicLib_LIBRARIES = /usr/local/lib/libGeographic.so
#  GeographicLib_LIBRARY_DIRS = /usr/local/lib

find_library (GeographicLib_LIBRARIES Geographic
  PATHS "${CMAKE_INSTALL_PREFIX}/../GeographicLib/lib")

  if (GeographicLib_LIBRARIES)
  get_filename_component (GeographicLib_LIBRARY_DIRS
    "${GeographicLib_LIBRARIES}" PATH)

  get_filename_component (_ROOT_DIR "${GeographicLib_LIBRARY_DIRS}" PATH)
  set (GeographicLib_INCLUDE_DIRS "${_ROOT_DIR}/include")
  set (GeographicLib_BINARY_DIRS "${_ROOT_DIR}/bin")
  if (NOT EXISTS "${GeographicLib_INCLUDE_DIRS}/GeographicLib/Config.h")
    get_filename_component(_ROOT_DIR "${_ROOT_DIR}" PATH)                     # Added to script
    set (GeographicLib_INCLUDE_DIRS "${_ROOT_DIR}/include")                   # Added to script
    set (GeographicLib_BINARY_DIRS "${_ROOT_DIR}/bin")                        # Added to script
    if (NOT EXISTS "${GeographicLib_INCLUDE_DIRS}/GeographicLib/Config.h")    # Added to script
      unset (GeographicLib_INCLUDE_DIRS)
      unset (GeographicLib_LIBRARIES)
      unset (GeographicLib_LIBRARY_DIRS)
      unset (GeographicLib_BINARY_DIRS)
    endif()                                                                   # Added to script
  endif ()
  unset (_ROOT_DIR)                                                           # Moved below if() statements
endif ()

include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (GeographicLib DEFAULT_MSG
  GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)
mark_as_advanced (GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES
  GeographicLib_INCLUDE_DIRS)

And link it to the right place:

sudo ln -s /usr/share/cmake/geographiclib/FindGeographicLib.cmake /usr/share/cmake-3.5/Modules/