Cov txheej txheem:
- Kauj Ruam 1: Nruab Ubuntu Desktop 18.04.3 ntawm Raspberry Pi 4 Qauv B
- Kauj Ruam 2: Nyeem Cov Ntaub Ntawv Los Ntawm Koj RPLiDAR
- Kauj Ruam 3: Kev teeb tsa ROS Melodic ntawm Raspberry Pi 4 Qauv B
- Kauj Ruam 4: ROS Kev Cia Siab
- Kauj Ruam 5: Kho Ib puag ncig
- Kauj Ruam 6: Xeem Kev Ua Haujlwm ntawm ROS
- Kauj Ruam 7: Kho Chaw Ua Haujlwm Catkin thiab Pom Cov Ntaub Ntawv
Video: Pib Nrog ROS Melodic ntawm Raspberry Pi 4 Qauv B: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Los ntawm shahizatMy tus kheej lub vev xaib Ua raws ntau los ntawm tus sau:
Txog: Tswj cov tshuab thiab tus kws tshaj lij neeg hlau, [email protected] Ntau Txog shahizat »
Tus Txheej Txheem Neeg Hlau (ROS) yog txheej txheej ntawm cov tsev qiv ntawv software thiab cov cuab yeej siv los tsim cov tshuab neeg hlau thiab cov ntawv thov. Tam sim no qhov kev pabcuam ntev ntawm ROS yog Melodic Morenia. ROS Melodic tau sib xws nrog tsuas yog Ubuntu 18.04 Bionic Beaver. Txawm li cas los xij, nws kuj tseem ua haujlwm ntawm Linux thiab Mac OS X, Android, thiab Windows. Thiab nws tsuas yog txhawb nqa 64-ntsis kev ua haujlwm. Peb yuav tsum teeb tsa 64-ntsis version ntawm Ubuntu ua ntej. Tom qab ntawd peb yuav tuaj yeem teeb tsa ROS. Yog tias koj xav siv 32-ntsis architecture, koj yuav tsum tau teeb tsa ROS los ntawm qhov chaw. Nws tsis nyuaj, tab sis nws yuav siv sijhawm ntev los sau txhua yam.
Hmoov zoo, muaj txoj hauv kev los coj Ubuntu nrov desktop operating system rau koj li Raspberry Pi 4 Model B. Cov ncauj lus kom ntxaws tuaj yeem nrhiav tau ntawm no.
Hauv phau ntawv qhia no, koj yuav kawm paub txuas koj LiDAR rau Raspberry Pi 4 Qauv B siv ROS Melodic nruab nrab ntawm Ubuntu Desktop 18.04.3. Txhua yam koj xav tau yog daim npav microSD tsawg kawg 32GB, nyeem daim npav microSD, Raspberry Pi 4 Qauv B thiab RPLidar A1M8. RPLIDAR yog tus nqi qis LIDAR sensor los ntawm Slamtec haum rau kev siv neeg hlau sab hauv tsev.
Kauj Ruam 1: Nruab Ubuntu Desktop 18.04.3 ntawm Raspberry Pi 4 Qauv B
- Rub tawm cov duab ntawm Ubuntu Server 18.04.3. Nyem qhov no mus rub tawm.
- Nyem daim npav microSD siv Etcher.
- Txuas lub monitor thiab keyboard rau ntawm lub rooj tsavxwm
- Ntxig daim npav microSD rau hauv koj li Raspberry Pi 4
- Fais fab nws
- Default credential to login in yog:
ubuntu login: ubuntu
Lo lus zais: ubuntu
- Koj yuav raug hais kom hloov tus password tsis raug rau lwm yam.
- Hloov kho thiab txhim kho koj li Ubuntu nrog cov pob tshiab kawg los ntawm kev ntaus hauv qab cov lus txib. Qhib lub davhlau ya nyob twg thiab khiav cov lus txib hauv qab no:
sudo apt-tau hloov tshiab
Cov lus txib tom ntej hloov kho cov npe ntawm cov pob khoom muaj thiab lawv cov qauv.
sudo apt-tau hloov tshiab
Kauj Ruam 2: Nyeem Cov Ntaub Ntawv Los Ntawm Koj RPLiDAR
Txuas koj RPLiDAR rau Raspberry Pi 4 Qauv B siv Micro USB Cable. Lub teeb ci ntsuab qhia qhov haujlwm ib txwm ua ntawm lub ntsuas.
Thaum koj tau txuas RPLiDAR rau koj li Raspberry Pi, ntaus kab ntawv hais kom ua hauv qab no txhawm rau txheeb xyuas qhov tso cai:
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 Jan 3 14:59 ttyUSB
Khiav hauv qab cov lus txib kom hloov kev tso cai:
sudo chmod 666 /dev /ttyUSB0
Tam sim no koj muaj peev xwm nyeem thiab sau nrog lub cuab yeej no siv USB chaw nres nkoj.
crw-rw-rw- 1 root dialout 188, 0 Jan 3 14:59 ttyUSB0
Thaum cov kev tso cai tau teeb tsa, koj yuav tsum rub tawm thiab teeb tsa ROS pob khoom.
Kauj Ruam 3: Kev teeb tsa ROS Melodic ntawm Raspberry Pi 4 Qauv B
Tam sim no, peb tau npaj los nruab ROS pob ntawm Ubuntu 18.04 LTS raws li Raspberry Pi 4. Teeb Raspberry Pi kom lees txais software los ntawm packages.ros.org los ntawm kev nkag mus rau cov lus txib hauv qab no hauv 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'
Cov yuam sij hauv qab no yuav tsum tau ntxiv rau Ubuntu ua ntej pib teeb tsa, uas yuav ua kom ntseeg tau tias rub tawm los ntawm kev tso cai rau server. Khiav cov lus txib hauv qab no ntawm lub davhlau ya nyob twg:
sudo apt-key adv --keyserver 'hkp: //keyserver.ubuntu.com: 80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Thiab koj yuav pom cov zis hauv qab no:
Ua tiav: /tmp/apt-key-gpghome.1kWt1g8IvN/gpg.1.sh --keyserver hkp: //keyserver.ubuntu.com: 80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
gpg: qhov tseem ceeb F42ED6FBAB17C654: pej xeem yuam sij "Qhib neeg hlau" ntshuam
gpg: Tag nrho cov lej ua tiav: 1
gpg: ntshuam: 1
Cov kauj ruam tom ntej yog hloov kho cov npe pob khoom los ntawm kev siv cov lus txib hauv qab no:
sudo apt hloov tshiab
Yog tias koj yuav pom qhov yuam kev hauv qab no hauv lub davhlau ya nyob twg:
Nyeem cov npe npe… Ua tiav
E: Tsis tuaj yeem tau txais xauv/var/lib/apt/npe/xauv - qhib (11: Cov peev txheej siv tsis tau ib ntus)
E: Tsis tuaj yeem kaw cov npe/var/lib/apt/npe/
Nws tuaj yeem daws tau los ntawm kev ua raws cov lus txib hauv qab no:
sudo rm/var/lib/apt/lists/lock
Rov ua dua sudo apt hloov kho dua tshiab. Muaj peb daim ntawv npaj ua ntej ntawm ROS koj tuaj yeem xaiv los ntawm. Qhov twg koj xaiv yuav nyob ntawm koj xav tau rau lub khoos phis tawj koj tab tom txhim kho ROS.
- Desktop-Full Install
- Nruab Nruab
- ROS-puag
ROS Desktop Full yog pob ua tiav ntau dua, txawm li cas los xij nws tsis pom zoo rau ib lub tshuab computer xws li Raspberry Pi lossis Nvidia Jetson Nano. Yog li, Desktop install yuav raug teeb tsa. Nws nruab 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. Koj tuaj yeem nruab ROS Melodic Desktop Install los ntawm kev tshaj tawm cov lus txib hauv qab no:
sudo apt nruab ros-melodic-desktop
Tom qab koj ntaus cov lus txib thiab nias Enter, nias Y thiab ntaus Enter thaum nug yog koj xav txuas ntxiv.
Kauj Ruam 4: ROS Kev Cia Siab
RosDep yog cov cuab yeej uas tso cai rau koj yooj yim teeb tsa kev vam khom system.
Txhawm rau pib RosDep siv cov lus txib hauv qab no hauv lub davhlau ya nyob twg:
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
Cov kauj ruam tom ntej los khiav hauv qab cov lus txib:
rosdep hloov tshiab
Koj yuav pom qhov yuam kev hauv qab no hauv davhlau ya nyob twg:
hloov kho cache hauv /home/ubuntu/.ros/rosdep/sources.cache
YOOJ YIM: Tsis yog txhua qhov peev txheej tuaj yeem hloov kho tshiab.
distro/master/rosdep/osx-homebrew.yaml]: (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)]
Khiav dua rosdep hloov tshiab kom txog thaum qhov yuam kev yuav ploj mus. Hauv kuv qhov xwm txheej nws tau ua tiav 3 zaug.
Kauj Ruam 5: Kho Ib puag ncig
Peb muaj ROS thiab kev vam khom ntsia. Cia teeb tsa peb ib puag ncig. ROS tau teeb tsa ntawm/opt/ros/melodic. Txhawm rau kom muaj ROS cov lus txib muaj, nws xav tau los muab cov ntaub ntawv plhaub sab hauv ntawm lub nplaub tshev teeb tsa.
ncha "qhov chaw /opt/ros/melodic/setup.bash" >> ~/.bashrc
Tom qab ntawd khiav cov lus txib hauv qab no hauv davhlau ya nyob twg:
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. Khiav cov lus txib hauv qab no:
rov -d
Yog tias txhua yam raug, peb yuav tau txais lub vijtsam hauv qab no:
suab paj nruag
Tam sim no Raspberry Pi 4 tau npaj ua tiav ROS pob.
Kauj Ruam 6: Xeem Kev Ua Haujlwm ntawm ROS
Cia peb sim qee qhov lus txib ROS kom paub tseeb tias kev teeb tsa tau ua tiav tiav. Peb yuav ua raws cov lus txib hauv qab no los xyuas seb qhov teeb tsa puas raug. Ib txoj hauv kev yooj yim los txheeb xyuas kev ua haujlwm ntawm ROS yog siv lub turtlesim simulator uas yog ib feem ntawm ROS teeb tsa.
Qhib lub davhlau ya nyob twg thiab khiav cov lus txib hauv qab no:
roscore
Yog tias txhua yam mus zoo, koj yuav tau txais cov txiaj ntsig hauv qab no ntawm lub davhlau ya nyob twg tam sim no:
… Nkag mus rau /home/ubuntu/.ros/log/d9439b6c-2e70-11ea-b473-dca6320e071e/
roslaunch-ubuntu-3563.log
Txheeb xyuas phau ntawv teev npe rau kev siv disk. Qhov no yuav siv sijhawm me ntsis.
Nias Ctrl-C los cuam tshuam
Ua tiav tshawb xyuas cov ntaub ntawv siv disk. Kev siv yog <1GB.
pib roslaunch server https:// ubuntu: 37629/
ros_comm version 1.14.3
ZAUM KAWG
========
PARAMETERS
* /rosdistro: suab paj nruag
* /rov qab: 1.14.3
NODES
pib pib tus tswv tshiab
txheej txheem [tus tswv]: pib nrog pid [3574]
ROS_MASTER_URI = https:// ubuntu: 11311/
teeb tsa /run_id rau d9439b6c-2e70-11ea-b473-dca6320e071e
txheej txheem [rosout-1]: pib nrog pid [3585]
pib qhov kev pabcuam tseem ceeb [/rosout]
Pib lub davhlau ya nyob twg tshiab tam sim thiab khiav cov lus txib hauv qab no hauv lub davhlau ya nyob twg:
rosrun turtlesim turtlesim_node
Yog tias txhua yam raug, peb yuav tau txais lub vijtsam hauv qab no:
Nrog koj zoo siab! Peb tau ua tiav nrog ROS teeb tsa.
Kauj Ruam 7: Kho Chaw Ua Haujlwm Catkin thiab Pom Cov Ntaub Ntawv
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.
Nruab qhov kev vam khom hauv qab no. Qhib lub davhlau ya nyob twg tshiab thiab ntaus:
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
Qhov chaw ua haujlwm no tuaj yeem suav nrog txawm tias nws tsis muaj dab tsi.
Mus rau qhov chaw khaws cia ntawm thaj chaw ua haujlwm catkin uas koj nyuam qhuav tsim. Hauv koj lub davhlau ya nyob twg, khiav
cd ~/catkin_ws/src
Clone lub github chaw cia ntawm RPLIDAR ROS pob.
git clone
Thiab ces
cd ~/catkin_ws
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
Txhawm rau pib ROS, khiav cov lus txib hauv qab no hauv lub davhlau ya nyob twg tshiab:
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.
Yog tias koj xav kawm paub ntau ntxiv txog Rviz, nyeem cov ntawv qhia no.
Nws yog rau hnub no! Koj tau ROS Melodic teeb tsa thiab npaj siv! 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:
ROS Melodic ntawm Raspberry Pi 4 [Debian Buster] + RPLIDAR A1M8: 6 Cov Kauj Ruam
ROS Melodic ntawm Raspberry Pi 4 [Debian Buster] + RPLIDAR A1M8: Kab lus no yuav npog cov txheej txheem ntawm kev teeb tsa ROS Melodic Morenia ntawm Raspberry Pi 4 khiav qhov tseeb Debian Buster thiab yuav siv RPLIDAR A1M8 nrog peb teeb tsa li cas. Txij li Debian Buster tau tshaj tawm tsuas yog ob peb lub lis piam dhau los (raws li lub sijhawm
Qauv Cov Qauv Txheej Txheem Nrog Sab Saum: 13 Kauj Ruam (nrog Duab)
Qauv Cov Qauv Txheej Txheem Nrog Sab Saum Automated: Ua qauv qauv tsheb ciav hlau yog qhov haujlwm zoo, siv lub tshuab nws yuav ua rau nws zoo dua! Cia peb saib qee qhov zoo ntawm nws qhov kev siv tshuab: Tus nqi qis: tag nrho cov txheej txheem yog tswj los ntawm Arduino microcontroller, siv L298N mo
RGB-D SLAM Nrog Kinect ntawm Raspberry Pi 4 [Buster] ROS Melodic: 6 Kauj Ruam
RGB-D SLAM Nrog Kinect ntawm Raspberry Pi 4 [Buster] ROS Melodic: Xyoo tas los kuv tau sau ib tsab xov xwm hais txog kev tsim thiab txhim kho ROS Melodic ntawm qhov tshiab (lub sijhawm ntawd) Raspberry Pi nrog Debian Buster OS. Kab lus tau txais kev mloog zoo ob leeg ntawm no ntawm Kev Qhia thiab ntawm lwm lub platform. Kuv zoo siab heev uas kuv pab
Qauv Cov Qauv Txheej Txheem Nrog Kev Soj Ntsuam Ntawm Sab Saum (V2.0): 13 Kauj Ruam (nrog Duab)
Qauv Cov Qauv Txheej Txheem Nrog Kev Siv Hla Dhau Sab (V2.0): Txoj haujlwm no yog hloov kho ntawm ib qho ntawm cov qauv kev tsheb ciav hlau yav dhau los kev ua haujlwm, Tus Qauv Kev Teeb Kev Teeb nrog Automated Siding. Cov ntawv no ntxiv qhov tshwj xeeb ntawm kev sib txuas thiab txiav tawm ntawm lub tsheb ciav hlau nrog cov khoom txav. Kev ua haujlwm ntawm
Nab hab sej rau Tsis Yog-Pib Pib Pib: 7 Kauj Ruam
Nab hab sej rau Tsis -Yog li Pib Pib: Nyob zoo, zaum kawg, yog tias koj tau mob siab rau, peb tau kov ntawm qhov pib ntawm nab nab - luam tawm, thaum thiab rau loops, nkag & tso tawm, yog, thiab pib ntawm easygui. kuj yog kev faib dawb pub dawb ntawm easygui thiab pycal-kuv tus kheej module.this nyeem yuav suav nrog: ntau dua