# 원격 접속

## 내 PC에서 **원격 접속**

내 컴퓨터에서 ssh 명령을 통해 로봇에 접근하는 방법을 알아보도록 하겠습니다.

![현재 상황](/files/-MSRucPAX7sWoYZL4bOg)

먼저, 로봇에서 ifconfig 명령을 통해 ip 주소를 알아냅니다.

![](/files/-MSRumNtzN4EQVjpCQ2S)

내 컴퓨터에서 ssh 명령을 통해 위에서 알아낸 ip로 접속합니다.

![](/files/-MSRvWg9rry-MGR2T55w)

* 만약 REMOTE 어쩌구 하는 에러가 뜬다면

  ```
  ssh-keygen -R [ip or hostname]
  ```

  ex) ssh-keygen -R 192.168.0.1\
  이 명령어를 치면 도움이 될 겁니다.

그 후, 접속이 성공한 프롬프트 화면을 확인합니다.

![](/files/-MSRvkBRpK__72oFmGo6)

## Dependency 설치

* 내 PC와 로봇 양 쪽 모두에서 진행해주세요.

아래 명령어를 복사 후 편한 경로에서 수행합니다.

```
sudo apt update
sudo apt-get install ros-melodic-tf ros-melodic-joy \
ros-melodic-teleop-twist-joy \
ros-melodic-teleop-twist-keyboard \
ros-melodic-laser-proc ros-melodic-rgbd-launch \
ros-melodic-depthimage-to-laserscan \
ros-melodic-rosserial-arduino ros-melodic-rosserial-python \
ros-melodic-rosserial-server ros-melodic-rosserial-client \
ros-melodic-rosserial-msgs ros-melodic-amcl \
ros-melodic-map-server ros-melodic-move-base \
ros-melodic-urdf ros-melodic-xacro ros-melodic-usb-cam \
ros-melodic-compressed-image-transport \
ros-melodic-rqt-image-view ros-melodic-gmapping \
ros-melodic-navigation ros-melodic-interactive-markers \
ros-melodic-ar-track-alvar ros-melodic-ar-track-alvar-msgs 
```

![아래의 과정도 위처럼 동일하게 수행해주세요.](/files/-MSRxDvas_QH6uR5w62Q)

catkin\_ws/src 경로로 이동합니다.

![](/files/-MSRz5Rve4zGoOSnZxWw)

해당 위치에서 git clone 명령을 이용하여 omo\_r1mini 패키지를 다운 받습니다.

![](/files/-MSRxXS2bBQyvlwczfE-)

![](/files/-MSRziQJw5SZ7U1-xh0z)

이제 cd.. 명령어를 통해 catkin\_ws로 재 이동한 다음, build를 시작합니다.

![](/files/-MSS-zDjHaH8RkEFerbp)

변경 된 bashrc를 적용 시킵니다.

![](/files/-MSS0MJhWrHsFNjfd7DT)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://omorobot.gitbook.io/manual/product/omo-r1mini/ros/ros1-melodic/remote.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
