# 설치하기

PC의 catkin 워크스페이스로 이동 하여 프로젝트를 가져옵니다.

```
$ cd ~/catkin_ws/src
$ git clone https://github.com/omorobot/r1mini_gui_teleop
```

### 문제해결

catkin 워크스페이스에서 catkin\_make 또는 catkin build 를 통해 설치하는 경우 아래와 같은 문제가 발생할 수 있습니다.

#### Parse error at "BOOST\_JOIN"

빌드 도중 아래와 같은 에러가 발생하는 경우

```bash
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
```

<https://answers.ros.org/question/233786/parse-error-at-boost_join/> 문서를 참조하여 다음과 같이 조치하세요.

```bash
$ sudo gedit /usr/include/boost/type_traits/detail/has_binary_operator.hpp
```

다음과 같은 코드 블럭이 보일겁니다.

```cpp
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
...
}
```

위 부분을 ifndef Q\_MOC\_RUN 로 다음과 같이 감싸줍니다.

```cpp
#ifndef Q_MOC_RUN
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
#endif

....

#ifndef Q_MOC_RUN
}
#endif
```

#### cv\_bridge 에러

```bash
$ sudo nano /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
```

```cpp
if(NOT "include;/usr/include;/usr/include/opencv " STREQUAL " ")
  set(cv_bridge_INCLUDE_DIRS "")
  set(_include_dirs "include;/usr/include;/usr/local/include/opencv")
  if(NOT "https://github.com/ros-perception/vision_opencv/issues " STREQUAL " ")
    set(_report "Check the issue tracker 'https://github.com/ros-perception/vis$
  elseif(NOT "http://www.ros.org/wiki/cv_bridge " STREQUAL " ")
    set(_report "Check the website 'http://www.ros.org/wiki/cv_bridge' for info$
  else()
```
