> For the complete documentation index, see [llms.txt](https://omorobot.gitbook.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omorobot.gitbook.io/manual/product/omo-r1mini/ros/ros1-melodic/udev.md).

# UDEV 설정

Only Robot (w/ SSH)

* **Robot에서만 진행합니다.**
* jetson nano 설치image를 통해 설치한 경우 건너뛰어도 됩니다.

## 1. UDEV

**필요성**

* USB 장치는 ttyUSB, ttyACM 등에 번호가 붙어서 연결되며, 매번 권한을 주어야 합니다.
* 이런 일들을 자동으로 처리하도록 udev 폴더 내부에서 작업하는 것을 편의상 유데브 설정이라고 부니다.

**create\_udev\_rules.sh**

* 경로 : catkin\_ws/src/omo\_r1mini/ omo\_r1mini\_bringup/scripts/

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThlrOwtotL4_PxjD3n%2Fimage.png?alt=media\&token=6888cc33-1744-4e92-868a-5025aaf7c2fa)

* 내용

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThlwXtgEZ-9IyK8YLw%2Fimage.png?alt=media\&token=8de75fea-4c51-4cb0-ae4d-ab6b632c9dd0)

## 2. UDEV 설정하기

lsusb로 연결 된 USB 장치를 확인합니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThm0le4wDbRt-VOCf1%2Fimage.png?alt=media\&token=0321f0fe-bcb8-4ab6-81b2-62e8dbc3cf91)

활성화 된 USB 포트를 확인합니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThm5Geg4xnYivy9_jT%2Fimage.png?alt=media\&token=72ef05be-62bb-42cd-a7ab-e4e0558c8080)

sh 파일을 관리자 권한으로 실행해줍니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThm9tlf9CfPMlApJ-q%2Fimage.png?alt=media\&token=e4fe9159-2b82-4ac5-9a5e-efab95d565cc)

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThmEBKtCMo727mFBPN%2Fimage.png?alt=media\&token=5b3c7226-06da-469c-8c35-d15fb086a158)

그리고 아래 명령들을 실행해줍니다\~

* systemctl stop nvgetty
* systemctl disable nvgetty

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThmN9TYLzx4BsqSkV4%2Fimage.png?alt=media\&token=8ed40e18-aa6b-4b0e-9a8a-db43c5ff08c8)

udevadm trigger 명령을 실행해줍니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThmRY_HHAtDRjpLLEF%2Fimage.png?alt=media\&token=66a8e76f-7474-4df2-99ea-fc31460418df)

그리고 reboot 명령을 실행합니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThnHdTwUVGRrAcBI8c%2Fimage.png?alt=media\&token=ca88e123-97ea-4feb-aa30-62986e99597f)

* 잠시 후 다시 ssh로 접근해주세요.

이제 활성화 된 포트 목록에 ttyLIDAR가 생긴 걸 확인할 수 있습니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThnQsgvbFYEyyfn7Ng%2Fimage.png?alt=media\&token=5f62bf8d-af6e-42cd-9cb8-cf734163d638)

권한도 자동으로 주어진 것을 알 수 있습니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThnUjg8CtXuH6Gamr5%2Fimage.png?alt=media\&token=526e18f6-3791-4646-8aec-7b048a73ecda)

## 3. 확인 하기

내 PC에서 roscore를 실행하고, 로봇에서 omo\_r1mini\_robot.launch를 실행합니다.

![omo\_r1mini\_robot.launch](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThnYW8Ns1kXHx1BgVW%2Fimage.png?alt=media\&token=ab850f69-a20d-4f21-b8ed-413211a42f79)

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThnfek3Tr071o1MBHY%2Fimage.png?alt=media\&token=0f6aaf40-d691-45e3-92f5-eeda25b4e09f)

* LIDAR와 로봇이 모두 실행됩니다.

rostopic list를 보면, 한 번에 볼 수 있는 topic이 많아진 걸 알 수 있습니다.

![](https://491696592-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK7gxD_6rkqAewni4tk%2F-MThiI0xwCy_UJgodPxq%2F-MThnq6IrE78XtYr9WQ8%2Fimage.png?alt=media\&token=9c005137-ff86-44e6-ae37-92eab157d525)
