YDLIDAR 인식 문제 - 라즈베리파이에서 /dev/ttyUSB2 미발생 > STELLA_N2_Forum

본문 바로가기
사이트 내 전체검색

STELLA_N2_Forum

YDLIDAR 인식 문제 - 라즈베리파이에서 /dev/ttyUSB2 미발생

페이지 정보

profile_image
작성자 오오잉
댓글 3건 조회 82회 작성일 25-08-07 00:44

본문

STELLA N2 SBC 버전: Stella N2 X4

REMOTE PC 버전: Ubuntu 20.04

ROS 버전: ROS2 FOXY

YDLIDAR 장치 인식 문제로 문의드립니다.
현재 라즈베리파이에는 USB 장치를 총 3개 연결하여 사용 중입니다.
Motor Driver(MW), AHRS, YDLIDAR를 연결하여 사용 중인데 YDLIDAR USB가 인식되지 않고 있습니다.



1. 세 장치를 모두 연결한 상태에서 USB 시리얼 디바이스 상태를 확인해본 결과는 아래와 같습니다.
pi@raspberrypi:~ $ ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1
결과를 보면 알 수 있듯이 두 개의 USB 장치만이 인식되고 있습니다.



2. ls -la /dev/를 통해 확인해본 결과는 아래와 같습니다.
pi@raspberrypi:~ $ ls -la /dev/
total 4
drwxr-xr-x 18 root root        4000 Aug  6 23:30 .
drwxr-xr-x 18 root root        4096 May  8  2021 ..
lrwxrwxrwx  1 root root          7 Aug  6 23:29 ahrs -> ttyUSB1
crw-r--r--  1 root root    10, 235 Aug  6 20:59 autofs
drwxr-xr-x  2 root root        580 Aug  6 20:59 block
lrwxrwxrwx  1 root root          5 Aug  6 20:59 BT -> ttyS0
crw-------  1 root root    10, 234 Aug  6 20:59 btrfs-control
drwxr-xr-x  3 root root          60 Jan  1  1970 bus
crw-------  1 root root    10,  62 Aug  6 20:59 cachefiles
drwxr-xr-x  2 root root        3060 Aug  6 23:30 char
crw-------  1 root root      5,  1 Aug  6 20:59 console
crw-------  1 root root    10, 203 Aug  6 20:59 cuse
drwxr-xr-x  7 root root        140 Aug  6 20:59 disk
drwxr-xr-x  2 root root          80 Jan  1  1970 dma_heap
drwxr-xr-x  3 root root        120 Aug  6 20:59 dri
lrwxrwxrwx  1 root root          13 Feb 14  2019 fd -> /proc/self/fd
crw-rw-rw-  1 root root      1,  7 Aug  6 20:59 full
crw-rw-rw-  1 root root    10, 229 Aug  6 20:59 fuse
crw-rw----  1 root gpio    254,  0 Aug  6 20:59 gpiochip0
crw-rw----  1 root gpio    254,  1 Aug  6 20:59 gpiochip1
crw-rw----  1 root gpio    254,  2 Aug  6 23:30 gpiochip2
crw-rw----  1 root gpio    254,  3 Aug  6 23:29 gpiochip3
crw-rw----  1 root gpio    246,  0 Aug  6 20:59 gpiomem
crw-------  1 root root    10, 183 Aug  6 20:59 hwrng
lrwxrwxrwx  1 root root          12 Feb 14  2019 initctl -> /run/initctl
drwxr-xr-x  2 root root          60 Jan  1  1970 input
crw-r--r--  1 root root      1,  11 Aug  6 20:59 kmsg
lrwxrwxrwx  1 root root          28 Feb 14  2019 log -> /run/systemd/journal/dev-log
brw-rw----  1 root disk      7,  0 Aug  6 20:59 loop0
brw-rw----  1 root disk      7,  1 Aug  6 20:59 loop1
brw-rw----  1 root disk      7,  2 Aug  6 20:59 loop2
brw-rw----  1 root disk      7,  3 Aug  6 20:59 loop3
brw-rw----  1 root disk      7,  4 Aug  6 20:59 loop4
brw-rw----  1 root disk      7,  5 Aug  6 20:59 loop5
brw-rw----  1 root disk      7,  6 Aug  6 20:59 loop6
brw-rw----  1 root disk      7,  7 Aug  6 20:59 loop7
crw-rw----  1 root disk    10, 237 Aug  6 20:59 loop-control
drwxr-xr-x  2 root root          60 Aug  6 20:59 mapper
crw-rw----  1 root video  236,  0 Aug  6 20:59 media0
crw-rw----  1 root video  236,  1 Aug  6 20:59 media1
crw-r-----  1 root kmem      1,  1 Aug  6 20:59 mem
brw-rw----  1 root disk    179,  0 Aug  6 20:59 mmcblk0
brw-rw----  1 root disk    179,  1 Aug  6 20:59 mmcblk0p1
brw-rw----  1 root disk    179,  2 Aug  6 20:59 mmcblk0p2
drwxrwxrwt  2 root root          40 Jan  1  1970 mqueue
lrwxrwxrwx  1 root root          7 Aug  6 23:29 MW -> ttyUSB1
drwxr-xr-x  2 root root          60 Aug  6 20:59 net
crw-rw-rw-  1 root root      1,  3 Aug  6 20:59 null
crw-r-----  1 root kmem      1,  4 Aug  6 20:59 port
crw-------  1 root root    108,  0 Aug  6 20:59 ppp
crw-rw-rw-  1 root tty      5,  2 Aug  6 23:52 ptmx
drwxr-xr-x  2 root root          0 Feb 14  2019 pts
brw-rw----  1 root disk      1,  0 Aug  6 20:59 ram0
brw-rw----  1 root disk      1,  1 Aug  6 20:59 ram1
brw-rw----  1 root disk      1,  10 Aug  6 20:59 ram10
brw-rw----  1 root disk      1,  11 Aug  6 20:59 ram11
brw-rw----  1 root disk      1,  12 Aug  6 20:59 ram12
brw-rw----  1 root disk      1,  13 Aug  6 20:59 ram13
brw-rw----  1 root disk      1,  14 Aug  6 20:59 ram14
brw-rw----  1 root disk      1,  15 Aug  6 20:59 ram15
brw-rw----  1 root disk      1,  2 Aug  6 20:59 ram2
brw-rw----  1 root disk      1,  3 Aug  6 20:59 ram3
brw-rw----  1 root disk      1,  4 Aug  6 20:59 ram4
brw-rw----  1 root disk      1,  5 Aug  6 20:59 ram5
brw-rw----  1 root disk      1,  6 Aug  6 20:59 ram6
brw-rw----  1 root disk      1,  7 Aug  6 20:59 ram7
brw-rw----  1 root disk      1,  8 Aug  6 20:59 ram8
brw-rw----  1 root disk      1,  9 Aug  6 20:59 ram9
crw-rw-rw-  1 root root      1,  8 Aug  6 20:59 random
drwxr-xr-x  2 root root          60 Jan  1  1970 raw
crw-rw-r--  1 root netdev  10, 242 Aug  6 20:59 rfkill
crw-rw----  1 root video  238,  0 Aug  6 20:59 rpivid-h264mem
crw-rw----  1 root video  240,  0 Aug  6 20:59 rpivid-hevcmem
crw-rw----  1 root video  239,  0 Aug  6 20:59 rpivid-intcmem
crw-rw----  1 root video  237,  0 Aug  6 20:59 rpivid-vp9mem
drwxr-xr-x  4 root root          80 Aug  6 23:13 serial
lrwxrwxrwx  1 root root          5 Aug  6 20:59 serial0 -> ttyS0
lrwxrwxrwx  1 root root          7 Aug  6 20:59 serial1 -> ttyAMA0
drwxrwxrwt  2 root root          40 Feb 14  2019 shm
drwxr-xr-x  3 root root        140 Aug  6 20:59 snd
lrwxrwxrwx  1 root root          15 Feb 14  2019 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root          15 Feb 14  2019 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root          15 Feb 14  2019 stdout -> /proc/self/fd/1
crw-rw-rw-  1 root tty      5,  0 Aug  6 20:59 tty
crw--w----  1 root tty      4,  0 Aug  6 20:59 tty0
crw-------  1 pi  tty      4,  1 Aug  6 20:59 tty1
crw--w----  1 root tty      4,  10 Aug  6 20:59 tty10
crw--w----  1 root tty      4,  11 Aug  6 20:59 tty11
crw--w----  1 root tty      4,  12 Aug  6 20:59 tty12
crw--w----  1 root tty      4,  13 Aug  6 20:59 tty13
crw--w----  1 root tty      4,  14 Aug  6 20:59 tty14
crw--w----  1 root tty      4,  15 Aug  6 20:59 tty15
crw--w----  1 root tty      4,  16 Aug  6 20:59 tty16
crw--w----  1 root tty      4,  17 Aug  6 20:59 tty17
crw--w----  1 root tty      4,  18 Aug  6 20:59 tty18
crw--w----  1 root tty      4,  19 Aug  6 20:59 tty19
crw--w----  1 root tty      4,  2 Aug  6 20:59 tty2
crw--w----  1 root tty      4,  20 Aug  6 20:59 tty20
crw--w----  1 root tty      4,  21 Aug  6 20:59 tty21
crw--w----  1 root tty      4,  22 Aug  6 20:59 tty22
crw--w----  1 root tty      4,  23 Aug  6 20:59 tty23
crw--w----  1 root tty      4,  24 Aug  6 20:59 tty24
crw--w----  1 root tty      4,  25 Aug  6 20:59 tty25
crw--w----  1 root tty      4,  26 Aug  6 20:59 tty26
crw--w----  1 root tty      4,  27 Aug  6 20:59 tty27
crw--w----  1 root tty      4,  28 Aug  6 20:59 tty28
crw--w----  1 root tty      4,  29 Aug  6 20:59 tty29
crw--w----  1 root tty      4,  3 Aug  6 20:59 tty3
crw--w----  1 root tty      4,  30 Aug  6 20:59 tty30
crw--w----  1 root tty      4,  31 Aug  6 20:59 tty31
crw--w----  1 root tty      4,  32 Aug  6 20:59 tty32
crw--w----  1 root tty      4,  33 Aug  6 20:59 tty33
crw--w----  1 root tty      4,  34 Aug  6 20:59 tty34
crw--w----  1 root tty      4,  35 Aug  6 20:59 tty35
crw--w----  1 root tty      4,  36 Aug  6 20:59 tty36
crw--w----  1 root tty      4,  37 Aug  6 20:59 tty37
crw--w----  1 root tty      4,  38 Aug  6 20:59 tty38
crw--w----  1 root tty      4,  39 Aug  6 20:59 tty39
crw--w----  1 root tty      4,  4 Aug  6 20:59 tty4
crw--w----  1 root tty      4,  40 Aug  6 20:59 tty40
crw--w----  1 root tty      4,  41 Aug  6 20:59 tty41
crw--w----  1 root tty      4,  42 Aug  6 20:59 tty42
crw--w----  1 root tty      4,  43 Aug  6 20:59 tty43
crw--w----  1 root tty      4,  44 Aug  6 20:59 tty44
crw--w----  1 root tty      4,  45 Aug  6 20:59 tty45
crw--w----  1 root tty      4,  46 Aug  6 20:59 tty46
crw--w----  1 root tty      4,  47 Aug  6 20:59 tty47
crw--w----  1 root tty      4,  48 Aug  6 20:59 tty48
crw--w----  1 root tty      4,  49 Aug  6 20:59 tty49
crw--w----  1 root tty      4,  5 Aug  6 20:59 tty5
crw--w----  1 root tty      4,  50 Aug  6 20:59 tty50
crw--w----  1 root tty      4,  51 Aug  6 20:59 tty51
crw--w----  1 root tty      4,  52 Aug  6 20:59 tty52
crw--w----  1 root tty      4,  53 Aug  6 20:59 tty53
crw--w----  1 root tty      4,  54 Aug  6 20:59 tty54
crw--w----  1 root tty      4,  55 Aug  6 20:59 tty55
crw--w----  1 root tty      4,  56 Aug  6 20:59 tty56
crw--w----  1 root tty      4,  57 Aug  6 20:59 tty57
crw--w----  1 root tty      4,  58 Aug  6 20:59 tty58
crw--w----  1 root tty      4,  59 Aug  6 20:59 tty59
crw--w----  1 root tty      4,  6 Aug  6 20:59 tty6
crw--w----  1 root tty      4,  60 Aug  6 20:59 tty60
crw--w----  1 root tty      4,  61 Aug  6 20:59 tty61
crw--w----  1 root tty      4,  62 Aug  6 20:59 tty62
crw--w----  1 root tty      4,  63 Aug  6 20:59 tty63
crw--w----  1 root tty      4,  7 Aug  6 20:59 tty7
crw--w----  1 root tty      4,  8 Aug  6 20:59 tty8
crw--w----  1 root tty      4,  9 Aug  6 20:59 tty9
crw-rw----  1 root dialout 204,  64 Aug  6 20:59 ttyAMA0
crw-------  1 root root      5,  3 Aug  6 20:59 ttyprintk
crwxrwxrwx  1 root dialout  4,  64 Aug  6 20:59 ttyS0
crwxrwxrwx  1 root dialout 188,  0 Aug  6 23:30 ttyUSB0
crwxrwxrwx  1 root dialout 188,  1 Aug  6 23:29 ttyUSB1
crw-------  1 root root    10, 239 Aug  6 20:59 uhid
crw-------  1 root root    10, 223 Aug  6 20:59 uinput
crw-rw-rw-  1 root root      1,  9 Aug  6 20:59 urandom
drwxr-xr-x  3 root root          60 Aug  6 20:59 v4l
crw-rw----  1 root video  242,  0 Aug  6 20:59 vchiq
crw-rw----  1 root video  247,  0 Aug  6 20:59 vcio
crw-------  1 root root    248,  0 Aug  6 20:59 vc-mem
crw-rw----  1 root tty      7,  0 Aug  6 20:59 vcs
crw-rw----  1 root tty      7,  1 Aug  6 20:59 vcs1
crw-rw----  1 root tty      7,  2 Aug  6 20:59 vcs2
crw-rw----  1 root tty      7,  3 Aug  6 20:59 vcs3
crw-rw----  1 root tty      7,  4 Aug  6 20:59 vcs4
crw-rw----  1 root tty      7,  5 Aug  6 20:59 vcs5
crw-rw----  1 root tty      7,  6 Aug  6 20:59 vcs6
crw-rw----  1 root tty      7,  7 Aug  6 20:59 vcs7
crw-rw----  1 root tty      7, 128 Aug  6 20:59 vcsa
crw-rw----  1 root tty      7, 129 Aug  6 20:59 vcsa1
crw-rw----  1 root tty      7, 130 Aug  6 20:59 vcsa2
crw-rw----  1 root tty      7, 131 Aug  6 20:59 vcsa3
crw-rw----  1 root tty      7, 132 Aug  6 20:59 vcsa4
crw-rw----  1 root tty      7, 133 Aug  6 20:59 vcsa5
crw-rw----  1 root tty      7, 134 Aug  6 20:59 vcsa6
crw-rw----  1 root tty      7, 135 Aug  6 20:59 vcsa7
crw-rw----  1 root video    10,  61 Aug  6 20:59 vcsm-cma
crw-rw----  1 root tty      7,  64 Aug  6 20:59 vcsu
crw-rw----  1 root tty      7,  65 Aug  6 20:59 vcsu1
crw-rw----  1 root tty      7,  66 Aug  6 20:59 vcsu2
crw-rw----  1 root tty      7,  67 Aug  6 20:59 vcsu3
crw-rw----  1 root tty      7,  68 Aug  6 20:59 vcsu4
crw-rw----  1 root tty      7,  69 Aug  6 20:59 vcsu5
crw-rw----  1 root tty      7,  70 Aug  6 20:59 vcsu6
crw-rw----  1 root tty      7,  71 Aug  6 20:59 vcsu7
crw-------  1 root root    10,  63 Aug  6 20:59 vga_arbiter
crw-------  1 root root    10, 137 Aug  6 20:59 vhci
crw-rw----  1 root video    81,  8 Aug  6 20:59 video0
crw-rw----  1 root video    81,  0 Aug  6 20:59 video10
crw-rw----  1 root video    81,  1 Aug  6 20:59 video11
crw-rw----  1 root video    81,  5 Aug  6 20:59 video12
crw-rw----  1 root video    81,  2 Aug  6 20:59 video13
crw-rw----  1 root video    81,  3 Aug  6 20:59 video14
crw-rw----  1 root video    81,  4 Aug  6 20:59 video15
crw-rw----  1 root video    81,  6 Aug  6 20:59 video16
crw-rw----  1 root video    81,  7 Aug  6 20:59 video18
crw-------  1 root root    10, 130 Aug  6 20:59 watchdog
crw-------  1 root root    250,  0 Aug  6 20:59 watchdog0
lrwxrwxrwx  1 root root          7 Aug  6 23:30 ydlidar -> ttyUSB0
crw-rw-rw-  1 root root      1,  5 Aug  6 20:59 zero

ttyUSB2가 생성되지 않고 있습니다.
ahrs와 MW가 동일한 포트(ttyUSB1)을 점유하고 있습니다.
또한 여기서는 ydlidar -> ttyUSB0라고 되어있는 것을 확인할 수 있었습니다.



3. 하지만 lsusb를 통해 확인해본 결과 ydlidar가 인식이 안되고 있습니다.
아래는 lsusb 명령어를 입력했을 떄의 결과입니다.
pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

USB 포트에 연결된 장치들을 모두 제거한 후 하나씩 끼워가며 확인해본 결과 MW와 IMU는 정상적으로 인식되었습니다.

3-1) 모든 usb 장치를 제거하고 MW만 연결하였을 때,
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

3-2) 모든 usb 장치를 제거하고 IMU만 연결하였을 때,
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

3-3) 모든 usb 장치를 제거하고 YDLIDAR만 연결하였을 때의 결과입니다.
pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

하지만 ydlidar는 연결을 하든, 해제를 하든 lsusb를 입력했을 때 출력되는 결과가 모두 동일했습니다.
따라서 라이다 USB 장치가 인식되고 있지 않는다고 결론 내리게 되었습니다.



4. 아래의 결과와 같이 /dev/serial/by-id에도 YDLIDAR에 해당하는 별도의 링크가 없었습니다.
pi@raspberrypi:~ $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Aug  6 23:29 usb-FTDI_FT232R_USB_UART_A5079RRD-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Aug  6 23:30 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_1234-if00-port0 -> ../../ttyUSB0



5.(참고사항) 이전에 작업을 할 때 ydlidar로 인한 오류가 발생해 rules 파일을 아래와 같이 수정해서 해결하였습니다.
bringup하는 과정에서 오류가 발생했었고, rules 파일 수정을 통해 에러 없이 실행할 수 있었습니다.
또한 teleop를 통해 키보드로 ros를 조종하는 것도 가능했습니다.
# YDLIDAR (소문자 통일 권고)
KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="1234", MODE="0777", SYMLINK+="ydlidar"
# AHRS
KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A5079RRD", MODE="0777", SYMLINK+="ahrs"
# MotorDriver (MW) - 대문자 사용해야 할 수도 있음, 팀 컨벤션 확인 요망
KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0777", SYMLINK+="MW"
# Bluetooth (BT)
KERNEL=="ttyS*", MODE="0777", SYMLINK+="BT"



6.(참고사항) dmesg 실행 결과도 함께 첨부합니다.
pi@raspberrypi:~ $ dmesg | tail -30
[ 2055.177949] usb 1-1.3: cp210x converter now attached to ttyUSB0
[ 3556.640404] usb 1-1.2: USB disconnect, device number 7
[ 3556.641480] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[ 3556.641599] ftdi_sio 1-1.2:1.0: device disconnected
[ 3658.542990] usb 1-1.3: USB disconnect, device number 8
[ 3658.543796] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 3658.544195] cp210x 1-1.3:1.0: device disconnected
[ 3664.544938] usb 1-1.3: new full-speed USB device number 9 using xhci_hcd
[ 3664.682215] usb 1-1.3: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 3664.682236] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3664.682254] usb 1-1.3: Product: CP2102N USB to UART Bridge Controller
[ 3664.682272] usb 1-1.3: Manufacturer: Silicon Labs
[ 3664.682289] usb 1-1.3: SerialNumber: 1234
[ 3664.693439] cp210x 1-1.3:1.0: cp210x converter detected
[ 3664.703366] usb 1-1.3: cp210x converter now attached to ttyUSB0
[ 3700.547993] usb 1-1.3: USB disconnect, device number 9
[ 3700.548808] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 3700.549184] cp210x 1-1.3:1.0: device disconnected
[ 3704.655237] usb 1-1.1: new full-speed USB device number 10 using xhci_hcd
[ 3704.801452] usb 1-1.1: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[ 3704.801474] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3704.801493] usb 1-1.1: Product: FT232R USB UART
[ 3704.801510] usb 1-1.1: Manufacturer: FTDI
[ 3704.801526] usb 1-1.1: SerialNumber: A5079RRD
[ 3704.808207] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[ 3704.808381] usb 1-1.1: Detected FT232RL
[ 3704.812430] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 4014.105825] usb 1-1.1: USB disconnect, device number 10
[ 4014.106962] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 4014.107078] ftdi_sio 1-1.1:1.0: device disconnected


위와 같은 확인 과정을 거친 결과, YDLIDAR의 USB 인식에 문제가 있다고 판단하게 되었습니다.
라이다로는 X4 (파란색)을 사용하고 있습니다.

---

(참고사항)
라이다의 선 연결을 바꿔보았었습니다.
첨부된 사진의 상태로 있을 때는 라즈베리파이의 전원을 켜도 라이다가 회전하지 않기에(초록색 LED는 들어옵니다)
X4 Pro의 배선과 동일하게 맞추기 위해 빨간 선을 검은 선 옆으로 옮겨보았습니다.
이때 라이다의 회전은 정상적으로 동작했으나, USB 인식 문제는 동일했습니다.
이후 인터넷을 찾아본 결과 X4는 X4 프로와 빨간 선의 위치가 다른 것을 알게 되어 다시 첨부된 사진과 같은 위치로 옮겨놓았습니다.(현재 상태)
그 결과, 현재는 라이다가 회전하지도 않으며 USB 인식도 되지 않는 상태입니다.
라이다 선 연결 위치가 첨부된 사진의 상태가 맞는 것인지도 여쭤보고 싶습니다.

댓글목록

profile_image

최고관리자님의 댓글

최고관리자 작성일

안녕하세요.

아이디어 로봇입니다.

우선 AHRS의 USB가 YDLIDAR로 연결되고 USB1에 MW와 AHRS가 같이 잡히는 것은 AHRS의 rules 설정이 잘못되어 발생하는 것으로 예상됩니다.
teleop는 MW(모터 드라이버)만 연결되어 있어도 정상 작동합니다.

AHRS만 연결하신 상태로 udevadm 명령어로 idVendor, idProduct, serial 값을 다시 확인하여 rules를 수정하여 주세요.

YDLIDAR의 인식 문제는 빨간선을 옆으로 옮겨서 발생한 것으로 예상됩니다.
X4 라이다는 X4PRO 라이다와는 다르게 라이다 프로그램이 실행되지 않으면 회전하지 않습니다.

일반적으로 빨간선은 전원입니다.
전원을 잘못된 위치에 연결하게 되면 회로가 파손될 가능성이 높습니다.
우선 YDLIDAR의 라이다 테스트 프로그램으로 PC에 연결하시어 확인하여 보시고 연결되지 않는다면 교체하셔야 할 것 같습니다.

그리고 rules파일에 주석으로 작성하신 SYMLINK 대문자, 소문자 작성 관련하여
SYMLINK는 rules로 연결된 USB의 이름을 지정하는 것입니다.
launch 혹은 node에서 SYMLINK을 통해 해당 USB에 연결하여 센서 혹은 모터 드라이버에 연결을 진행하게 됩니다.
launch, node 파일에서 연결되는 이름과 rules 이름을 같게 만들어 주시면 됩니다.
(예시 AHRS node 파일 : char *port = "/dev/AHRS"; , AHRS rulse : SYMLINK+="AHRS")

profile_image

오오잉님의 댓글의 댓글

오오잉 작성일

YDLIDAR 선 배치에 대해 추가 질문이 있습니다.
처음 제품을 받았을 때는 첨부된 사진과 같이 빨간 선이 왼쪽에서 두 번째 단자에 연결되어 있었습니다.
하지만 usb 연결을 했을 때 라이다가 회전하지 않았습니다.
빨간 선을 검은 색 선이 연결된 단자 바로 옆으로 옮기자 라이다가 회전하기 시작했습니다.
하지만 잘못된 연결이었음을 깨닫고 다시 왼쪽에서 두 번째 단자로 옮긴 현재는 라이다가 회전하지 않습니다.
라이더의 빨간 선은 말씀해주신 것처럼 왼쪽에서 두 번째 단자에 연결한 채로 테스트 진행하면 될까요?

말씀해주신 다른 사항들은 점검 및 적용해보고 계속 문제가 발생하면 추가 문의 드리도록 하겠습니다.
긴 글 읽어주셔서 감사합니다.

profile_image

최고관리자님의 댓글의 댓글

최고관리자 작성일

선 배치는 왼쪽에서 두 번째, 해당 라이다를 처음 받으셨을 때 배선으로 연결하셔서 테스트 진행하여 주시면 됩니다.

회원로그인

회원가입