ROS/GPS

Resolve gps-waypoint-based-autonomous-navigation-in-ros PKG Cmake Error

hm02123 2022. 3. 29. 01:53
728x90
  • Ubuntu 18.04
  • ROS Melodic 

1. 오류 목록

  • geographic error
  • robot_localization error

 

2. Solution

 (1) Geographic Lib

    1) geographic lib을 저장할 디렉토리로 이동

    2) geographic lib 을 clone

    3) geographiclib 디렉토리로 이동

    4) build 파일 생성및 해당 디렉토리로 이동

    5) make

    6) make 설치

$ git clone git://git.code.sourceforge.net/p/geographiclib/code ./geographiclib
$ cd geographiclib
$ mkdir build && cd build
$ cmake .. && make
$ sudo make install

 

 

 

 

 (2) Robot_Localization 불러오기 

    1) /catkin/src 로 이동

    2) robot_localization clone

$ cd catkin_ws/src
$ git clone https://github.com/cra-ros-pkg/robot_localization.git

 

 (3) Robot_Localization navsat_conversions.h / navsat_transform.h 파일 수정

    1) robot_localization/include/robot_localization/ navsat_conversion.h 과 navsat_transform.h 파일로 이동

    2) .h 파일의 #include <GeographicLib/MGRS.hpp>#include <GeographicLib/UTMUPS.hpp>의 경로를

#include "/ _your_path_ /geographiclib/include/GeographicLib/MGRS.hpp"           

#include "/ _your_path_ /geographiclib/include/GeographicLib/UTMPS.hpp" 로 수정

 

 (4) gps-waypoint-based-autonomous-navigation-in-ros 의 CMakeList.txt 수정

    1) CMakeList.txt 의 find_package에 robot_localization 을 추가

find_package(catkin REQUIRED COMPONENTS 
   roscpp
   rospy
   std_msgs
   tf
   roslib
   roslaunch
   robot_localization
)

 

 (5) gps-waypoint-based-autonomous-navigation-in-ros 의 package.xml 수정

    1) package.xml에 <build_depend>robot_localization</build_depend> 추가

 

 (6) gps-waypoint-based-autonomous-navigation-in-ros/src 의 .cpp파일 수정

   1) .cpp 파일에 있는 #include <robot_localization/navsat_conversions.h> 의 경로를

"/ _your_path_ /catkin_ws/src/robot_localization/include/robot_localization/navsat_conversions.h"           

 로 수정 

   2) 모든 .cpp 파일에 #include "/ _your_path_ /geographiclib/include/GeographicLib/MGRS.hpp"           

#include "/ _your_path_ /geographiclib/include/GeographicLib/UTMPS.hpp" 추가   

 

(7) catkin_make

$ cd catkin_ws
$ catkin_make

              

 

 

728x90

'ROS > GPS' 카테고리의 다른 글

Mapviz에서 구글 위성 지도 사용  (2) 2022.04.09
Mapviz 사용법  (0) 2022.04.08
ROS Melodic에 Mapviz 설치  (0) 2022.04.08
ublox ZED-f9p GPS(RTK) 사용  (2) 2022.02.01
Linux 에서 U-center 사용  (0) 2022.01.06