Cov txheej txheem:

Pib Nrog Tus Nqi RPLIDAR Tus Nqi Uas Siv Jetson Nano: 5 Kauj Ruam
Pib Nrog Tus Nqi RPLIDAR Tus Nqi Uas Siv Jetson Nano: 5 Kauj Ruam

Video: Pib Nrog Tus Nqi RPLIDAR Tus Nqi Uas Siv Jetson Nano: 5 Kauj Ruam

Video: Pib Nrog Tus Nqi RPLIDAR Tus Nqi Uas Siv Jetson Nano: 5 Kauj Ruam
Video: Xav them tus nqi (niam npis vwj) 2024, Hlis ntuj nqeg
Anonim

Los ntawm shahizatMy tus kheej lub vev xaib Ua raws ntau los ntawm tus sau:

Nruab Ubuntu 18.04.4 LTS ntawm Koj Lub Raspberry Pi Board
Nruab Ubuntu 18.04.4 LTS ntawm Koj Lub Raspberry Pi Board
Nruab Ubuntu 18.04.4 LTS ntawm Koj Lub Raspberry Pi Board
Nruab Ubuntu 18.04.4 LTS ntawm Koj Lub Raspberry Pi Board
Pib Nrog ROS Melodic ntawm Raspberry Pi 4 Qauv B
Pib Nrog ROS Melodic ntawm Raspberry Pi 4 Qauv B
Pib Nrog ROS Melodic ntawm Raspberry Pi 4 Qauv B
Pib Nrog ROS Melodic ntawm Raspberry Pi 4 Qauv B
Kev Paub Hais Lus Siv Google Hais Lus API thiab Python
Kev Paub Hais Lus Siv Google Hais Lus API thiab Python
Kev Paub Hais Lus Siv Google Hais Lus API thiab Python
Kev Paub Hais Lus Siv Google Hais Lus API thiab Python

Txog: Tswj cov tshuab thiab tus kws tshaj lij neeg hlau, [email protected] Ntau Txog shahizat »

Qhia me ntsis

Kev Tshawb Pom Lub Teeb thiab Kev Sib Tw (LiDAR) ua haujlwm zoo ib yam li ultrasonic rangefinders nrog laser mem tes yog siv tsis yog suab nrov. Yandex, Uber, Waymo thiab lwm yam tau nqis peev ntau hauv LiDAR thev naus laus zis rau lawv cov kev pabcuam tsheb loj. Qhov teeb meem tseem ceeb tshaj plaws ntawm LiDAR sensors yog lawv cov nqi siab. Txawm li cas los xij, muaj qhov nce tus naj npawb ntawm cov nqi xaiv qis uas twb muaj nyob hauv khw. Ib qho piv txwv ntawm qhov ntawd yog RPLiDAR A1M8 tsim los ntawm Slamtec nrog nws 360 degree 2D laser scanner (LIDAR) daws teeb meem. Nws tuaj yeem ua 360 degree ntsuas hauv 12-meter ntau thiab siv txog 8,000 qhov kev kuaj ib pliag. Thiab nws muaj rau tsuas yog $ 99 USD.

RPLIDAR yog tus nqi qis LIDAR sensor haum rau sab hauv neeg hlau SLAM (Ib txhij hauv ib puag ncig thiab daim duab qhia chaw) daim ntawv thov. Nws tuaj yeem siv rau hauv lwm daim ntawv thov xws li:

  1. Kev qhia dav hlau dav dav thiab kev hloov chaw
  2. Kev tiv thaiv kev tiv thaiv
  3. Kev txheeb xyuas ib puag ncig thiab ua qauv 3D

Lub hom phiaj ntawm qhov kev qhia no yog siv Robot Operating System (ROS) ntawm NVIDIA Jetson Nano Developer Kit los ntsuas qhov ua tau zoo ntawm tus nqi qis RPLiDAR A1M8 los ntawm Slamtec hauv SLAM teeb meem.

Kauj Ruam 1: Unboxing RPLIDAR A1 Cov Khoom Txhim Kho

Unboxing RPLIDAR A1 Cov Khoom Txhim Kho
Unboxing RPLIDAR A1 Cov Khoom Txhim Kho
Unboxing RPLIDAR A1 Cov Khoom Txhim Kho
Unboxing RPLIDAR A1 Cov Khoom Txhim Kho
Unboxing RPLIDAR A1 Cov Khoom Txhim Kho
Unboxing RPLIDAR A1 Cov Khoom Txhim Kho

RPLIDAR A1 Cov Khoom Txhim Kho muaj:

  • RPLIDAR A1
  • USB Adapter nrog kev sib txuas lus cable
  • Cov ntaub ntawv

Nco tseg: Micro-USB cable tsis suav nrog.

Kauj ruam 2: NVIDIA Jetson Nano Developer Kit

NVIDIA Jetson Nano Developer Kit
NVIDIA Jetson Nano Developer Kit

NVIDIA Jetson Nano yog lub me me, muaj zog thiab tus nqi qis ib lub khoos phis tawj uas muaj peev xwm yuav luag txhua yam hauv lub PC ib leeg muaj peev xwm. Nws tau siv los ntawm 1.4-GHz plaub-core ARM A57 CPU, 128-core Nvidia Maxwell GPU thiab 4 GB ntawm RAM thiab tseem muaj lub zog los khiav ROS thaum khiav Linux kev ua haujlwm.

Kauj ruam 3: Kev npaj

Nco ntsoov tias koj muaj qhov hloov tshiab kawg ntawm JetPack. Koj tuaj yeem rub tawm qhov hloov tshiab kawg los ntawm lub vev xaib raug cai ntawm Nvidia. Kuv twb tau tshaj tawm phau ntawv qhia pib sai sai no. Txheeb nws tawm.

Tom qab teeb tsa OS, peb yuav tshuaj xyuas seb cov tsav tsheb tshiab tau teeb tsa nrog cov lus txib hauv qab no.

sudo apt-tau hloov tshiab

Cov lus txib no hloov kho cov npe ntawm cov pob khoom muaj thiab lawv cov qauv.

sudo apt-tau hloov tshiab

Txuas RPlidar rau USB chaw nres nkoj ntawm koj li NVIDIA Jetson Nano ntawm USB Adapter nrog txuas xov tooj.

Qhib koj lub davhlau ya nyob twg thiab khiav cov lus txib hauv qab no.

ls -l /dev | grep ttyUSB

Cov txiaj ntsig ntawm cov lus txib hauv qab no yuav tsum yog:

crw-rw ---- 1 root dialout 188, 0 Dec 31 20:33 ttyUSB0

Khiav hauv qab cov lus txib kom hloov kev tso cai:

sudo chmod 666 /dev /ttyUSB0

Tam sim no koj tuaj yeem nyeem thiab sau nrog lub cuab yeej no siv qhov chaw nres nkoj. Txheeb xyuas nws ntawm ls -l /dev | grep ttyUSB hais kom ua.

crw-rw-rw- 1 root dialout 188, 0 Dec 31 20:33 ttyUSB0

Kauj Ruam 4: Kev teeb tsa ROS ntawm Jetson Nano

Tam sim no, peb tau npaj los nruab ROS pob ntawm Ubuntu 18.04 LTS raws li Jetson Nano. Teeb Jetson Nano kom lees txais software los ntawm packages.ros.org los ntawm kev nkag mus rau cov lus txib hauv qab no ntawm lub davhlau ya nyob twg:

sudo sh -c 'echo "deb https://packages.ros.org/ros/ubuntu $ (lsb_release -sc) main"> /etc/apt/sources.list.d/ros-latest.list'

Ntxiv tus yuam sij tshiab apt:

sudo apt-key adv --keyserver 'hkp: //keyserver.ubuntu.com: 80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Thiab koj yuav pom cov zis hauv qab no:

Kev ua: /tmp/apt-key-gpghome.kbHNkEyTKo/gpg.1.sh --keyserver hkp: //keyserver.ubuntu.com: 80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654gpg: qhov tseem ceeb F42ED6FBAB17

gpg: Tag nrho cov lej ua tiav: 1

gpg: ntshuam: 1

Hloov kho koj cov npe khoom los ntawm cov lus txib hauv qab no:

sudo apt hloov tshiab

Tam sim no, qhov hloov tshiab kawg ntawm ROS yog Melodic Morenia. Cov lus txib hauv qab no teeb tsa tag nrho cov software, cov cuab yeej, cov txheej txheem, thiab cov neeg ua haujlwm simulators rau ROS, suav nrog kev txhawb nqa rau rqt, rviz thiab lwm yam khoom siv muaj txiaj ntsig neeg hlau. Tom qab koj ntaus cov lus txib thiab nias Enter, nias Y thiab ntaus Enter thaum nug yog koj xav txuas ntxiv.

sudo apt nruab ros-melodic-desktop

Nws kav ntev txog 15-20 feeb kom rub tawm thiab ua tiav kev ua tiav cov lus txib, yog li xav tias so kom so.

Tam sim no pib rosdep.

sudo rosdep pib

Koj yuav pom cov zis hauv qab no:

Sau /etc/ros/rosdep/sources.list.d/20-default.list

Pom zoo: thov khiav

rosdep hloov tshiab

Tom qab ntawd khiav hauv qab cov lus txib

rosdep hloov tshiab

Koj yuav pom qhov yuam kev hauv qab no ntawm lub davhlau ya nyob twg:

YOOJ YIM: yuam kev thauj cov npe khoom: (https://raw.githubusercontent.com/ros/rosdistro/master/dashing/distribution.yaml)>

Khiav dua rosdep hloov tshiab kom txog thaum qhov yuam kev yuav ploj mus. Hauv kuv qhov xwm txheej nws tau ua tiav 2 zaug.

Teeb tsa ib puag ncig hloov pauv

ncha "qhov chaw /opt/ros/melodic/setup.bash" >> ~/.bashrc

qhov chaw ~/.bashrc

Nov yog theem kawg ntawm txheej txheem teeb tsa. Txheeb xyuas qhov twg ntawm ROS koj tau teeb tsa. Yog tias koj pom koj li ROS version raws li qhov tso tawm, zoo siab koj tau ua tiav ROS.

rov -d

Hauv kuv rooj plaub nws yog:

suab paj nruag

Tam sim no Jetson Nano tau npaj ua tiav ROS pob khoom.

Kauj Ruam 5: Kho Chaw Ua Haujlwm Catkin

Kho qhov Chaw Ua Haujlwm Catkin
Kho qhov Chaw Ua Haujlwm Catkin

Koj yuav tsum tsim thiab teeb tsa chaw ua haujlwm catkin. Chaw ua haujlwm catkin yog cov npe uas koj tuaj yeem tsim lossis hloov kho cov pob catkin uas twb muaj lawm.

Txhim kho cov kev vam khom hauv qab no:

sudo apt-tau nruab cmake python-catkin-pkg nab hab sej-empy nab nab-ntswg python-setuptools libgtest-dev python-rosinstall python-rosinstall-generator python-wstool build-essential git

Tsim cov catkin hauv paus thiab cov ntawv tais ceev tseg:

mkdir -p ~/catkin_ws/src

Hauv koj lub davhlau ya nyob twg, khiav

cd ~/catkin_ws/src

Clone lub github chaw cia ntawm RPLIDAR ROS pob.

git clone

Khiav

cd ua..

Tom qab ntawd, khiav catkin_make txhawm rau suav koj qhov chaw ua haujlwm catkin.

catkin_make

Tom qab ntawd khiav mus rau qhov chaw ib puag ncig nrog koj lub davhlau ya nyob twg tam sim no. Tsis txhob kaw lub davhlau ya nyob twg.

qhov chaw devel/setup.bash

Hauv lub davhlau ya nyob twg tshiab, khiav cov lus txib hauv qab no

roscore

Hauv lub davhlau ya nyob twg uas koj tau txais ib puag ncig, khiav hauv qab cov lus txib

roslaunch rplidar_ros view_rplidar.launch

Ib qho piv txwv ntawm Rviz yuav qhib nrog daim duab qhia chaw ntawm RPLIDAR ib puag ncig.

ROS yog lub hauv paus zoo uas peb tau tsim daim ntawv qhia ncig RPLIDAR. Nws yog cov cuab yeej zoo rau tsim cov software software rau neeg hlau uas tuaj yeem muaj txiaj ntsig zoo rau ntau yam khoom siv kho vajtse, kev teeb tsa tshawb fawb, thiab kev xav tau sijhawm. Txoj haujlwm no tau ua pov thawj tias RPLiDAR tus nqi qis yog kev daws teeb meem tsim nyog rau kev siv SLAM.

Kuv vam tias koj pom phau ntawv qhia no muaj txiaj ntsig thiab ua tsaug rau kev nyeem. Yog tias koj muaj lus nug lossis tswv yim? Tawm lus tawm hauv qab no. Nyob twj ywm!

Pom zoo: