Cov txheej txheem:
- Kauj Ruam 1: Txhim Kho Bootstrap Dependencies thiab Rub Tawm Pob
- Kauj Ruam 2: Kho Cov Teeb Meem
- Kauj Ruam 3: Tsim thiab Tau Txais Kev Txhim Kho
- Kauj Ruam 4: Nruab RPLIDAR ROS Pob
- Kauj Ruam 5: Teeb ROS kom khiav ntawm Ntau Lub Tshuab
- Kauj ruam 6: Ua tiav
Video: ROS Melodic ntawm Raspberry Pi 4 [Debian Buster] + RPLIDAR A1M8: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Kab lus no yuav npog cov txheej txheem ntawm kev txhim kho 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 sau tsab xov xwm no), tsis muaj cov khoom tsim ua ntej ROS los teeb tsa nrog apt-tau, uas yog txoj hauv kev zoo dua ntawm kev teeb tsa. Yog li peb yuav tsum tsim nws los ntawm qhov chaw. Ntseeg kuv, nws tsis txaus ntshai li nws lub suab. Cov txheej txheem tau piav qhia hauv qhov kev qhia ua haujlwm no, tab sis txhawm rau tsim ROS Melodic ntawm Raspberry Pi peb yuav tsum tau hloov kho ob peb yam.
Yog tias koj tseem ntshai, ntawm no yog daim duab funny uas * yuav * pab koj so. Thov ua tawm tswv yim yog tias qib ntawm kev so so tau txaus. Yog tsis yog, nws yuav raug hloov nrog daim duab ntawm tus miv lom zem.
Lub Ib Hlis 2020 EDIT: Txij li nws tau ib nrab xyoo txij li kuv tshaj tawm tsab xov xwm no tej zaum yuav muaj qee qhov kev hloov pauv rau ROS lossis Buster. Kuv tau ua daim duab rau Raspberry Pi 4 ib pliag dhau los, tom qab sau cov lus qhia no. Ib tus neeg pab txhawb nqa tau xa nws mus rau Google Drive
Plaub Hlis 2020 Kho: Kuv tau pom lub sijhawm tsis ntev los no rov ua ROS Melodic teeb tsa ntawm cov duab Raspbian tshiab tshaj plaws los ntawm nom Raspberry Pi site. Kuv tau kho cov lus qhia no kom haum. Kuv kuj tsim thiab qhia tawm cov duab huv, nrawm:
Raspbian Buster Lite 2020-02-13 Tso nrog ROS Melodic Bare-bone Xav tau 8 GB SD card
Raspbian Buster nrog desktop 2020-02-13 Tso nrog ROS Melodic Desktop Xav tau 16 GB SD card
Tej zaum nws yuav yog txoj hauv kev nrawm tshaj plaws kom ua rau koj lub system nce thiab ua haujlwm. Yog tias koj xav sau ROS koj tus kheej, txuas ntxiv nyeem kab lus.
Kauj Ruam 1: Txhim Kho Bootstrap Dependencies thiab Rub Tawm Pob
Cia peb pib los ntawm teeb tsa cov chaw cia khoom thiab teeb tsa qhov tsim nyog vam khom
sudo sh -c 'echo "deb https://packages.ros.org/ros/ubuntu $ (lsb_release -sc) main"> /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp: //keyserver.ubuntu.com: 80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-tau hloov tshiab
sudo apt-tau nruab -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
Tom qab ntawv pib rosdep thiab hloov kho nws
sudo rosdep pib
rosdep hloov tshiab
Thaum qhov no ua tiav cia tsim qhov chaw ua haujlwm tshwj xeeb catkin rau tsim ROS thiab txav mus rau phau ntawv ntawd.
mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws
Tam sim no koj muaj ob txoj kev xaiv:
ROS -Comm: (Bare Bones) kev teeb tsa - teeb tsa qhov no yog tias koj paub nrog ROS thiab paub tias koj tab tom ua dab tsi thiab pob ntawv twg koj xav tau. Yog tias koj xav tau pob khoom tsis suav nrog hauv ROS-Comm, koj yuav tsum tau suav sau los ntawm qhov chaw ib yam.
Nruab Desktop: suav nrog GUI cov cuab yeej, xws li rqt, rviz, thiab cov tsev qiv ntawv neeg hlau-generic. Tej zaum yuav yog qhov kev xaiv zoo dua rau cov pib rau ROS.
Kuv yuav mus nrog txhim kho Desktop Install here.
rosinstall_generator desktop --rosdistro melodic --deps --wet-only --tar> melodic-desktop-wet.rosinstall
wstool init -j8 src melodic-desktop-wet.rosinstall
Cov lus txib yuav siv ob peb feeb txhawm rau rub tawm tag nrho cov pob khoom ROS rau hauv src nplaub tshev.
Yog tias wstool init tsis ua lossis raug cuam tshuam, koj tuaj yeem rov pib rub tawm los ntawm kev khiav:
wstool hloov tshiab -j4 -t src
Kauj Ruam 2: Kho Cov Teeb Meem
Plaub Hlis 2020 EDIT: Hla cov kauj ruam no, zoo li txhua qhov teeb meem tau raug kho tam sim no
Cia peb nruab qhov sib xws ntawm Assimp (Qhib Cov Khoom Qiv Khoom Qiv) los txhim kho collada_urdf qhov teeb meem vam khom.
mkdir -p ~/ros_catkin_ws/external_src
cd ~/ros_catkin_ws/external_src
wget https://sourceforge.net/projects/assimp/files/assi… -O assimp-3.1.1_no_test_models.zip
unzip assimp-3.1.1_no_test_models.zip
cd cov-3.1.1
cmak ua.
ua
sudo ua kom nruab
Cia peb tseem nruab OGRE rau rviz
sudo apt-tau nruab libogre-1.9-dev
Lub Ib Hlis 2020 Hloov Kho tshiab: Cov teeb meem nrog libbost twb tau raug kho los ntawm ROS cov tsim tawm, koj tuaj yeem hla ntu no
/// hla /// Thaum kawg peb yuav tau kho cov teeb meem nrog libboost. Kuv siv qhov kev daws teeb meem los ntawm kab ntawv no ntawm stackoverflow:
Qhov ua yuam kev thaum muab tso ua ke yog tshwm sim los ntawm 'boost:: posix_time:: milliseconds' ua haujlwm uas nyob rau hauv qhov kev txhawb nqa tshiab uas lees txais tsuas yog kev sib cav sib cav, tab sis cov ntawv ua haujlwm hauv ROS, muab nws ntab rau ntau qhov chaw. Koj tuaj yeem sau txhua cov ntaub ntawv siv qhov haujlwm ntawd (! hauv ros_catkin_ws nplaub tshev!):
nrhiav -type f -print0 | xargs -0 grep 'boost:: posix_time:: milliseconds' | txiav -d: -f1 | laj -u
Qhib lawv hauv koj cov ntawv sau thiab tshawb rau 'boost:: posix_time:: milliseconds' ua haujlwm hu.
thiab hloov hu zoo li no:
txhawb:: posix_time:: milliseconds (loop_duration.toSec () * 1000.0f));
nrog:
txhawb:: posix_time:: milliseconds (int (loop_duration.toSec () * 1000.0f))));
thiab cov no:
txhawb:: posix_time:: milliseconds (1000.0f)
nrog:
boost:: posix_time:: milliseconds (1000)
Kuv pom zoo kom koj siv nano text editor, uas yooj yim dua VIM;) Ctrl+O tau txuag, Ctrl+X tab tom tawm thiab Ctrl+W tab tom tshawb nrhiav.
/// txuas ntxiv_ los ntawm no ///
Kauj Ruam 3: Tsim thiab Tau Txais Kev Txhim Kho
Tom ntej no peb siv cov cuab yeej rosdep rau kev txhim kho tag nrho cov seem ntawm kev vam khom:
rosdep nruab --from-paths src --ignore-src --rosdistro melodic -y
Thaum nws tau ua tiav rub tawm cov pob thiab daws qhov kev vam khom koj tau npaj tsim cov pob catkin. (Khiav qhov lus txib no los ntawm daim ntawv ros_catkin_ws)
sudo./src/catkin/bin/catkin_make_isolated -install -DCMAKE_BUILD_TYPE = Tso tawm -install -space/opt/ros/melodic -j2
Yog tias cov txheej txheem muab tso ua ke khov heev (yuav zoo li, yog tias koj teeb tsa lub desktop version), koj yuav tsum nce qhov chaw sib pauv. Los ntawm lub neej ntawd nws yog 100 MB, sim nce nws mus rau 2048 MB.
Hmoov zoo! Cov txheej txheem suav sau tag nrho yuav siv sijhawm li 1 teev (tsawg dua rau Bare-bone version), yog li mus ua qee yam tshuaj yej.
Tam sim no ROS Melodic yuav tsum tau teeb tsa ntawm koj li Raspberry Pi 4. Peb yuav muab qhov kev teeb tsa tshiab nrog cov lus txib hauv qab no:
ncha "qhov chaw /opt/ros/melodic/setup.bash" >> ~/.bashrc
Qhib lub plhaub tshiab rau kev hloov pauv kom siv tau. Sim tso tawm roscore los tshuaj xyuas yog tias txhua yam ua tiav.
Kauj Ruam 4: Nruab RPLIDAR ROS Pob
Cia peb tsim chaw ua haujlwm sib cais rau lwm pob, uas tsis yog ib feem ntawm ROS tseem ceeb.
Los ntawm koj lub tsev nplaub tshev ua:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
thiab muab nws rau bashrc:
ncha "qhov chaw $ HOME/catkin_ws/devel/setup.bash" >> ~/.bashrc
Okay, peb tau npaj los pib txhim kho RPLIDAR ROS pob.
cd csy
sudo git clone
cd ua..
catkin_make
Tos kom cov ntawv sau ua ke kom tiav. Sim pib lub pob kom pom tias kev sib sau ua tiav:
roslaunch rplidar_ros rplidar.launch
Yog tias nws tsis tso tawm ib qho yuam kev, ua kev seev cev ua kev lom zem sai (*yeem).
Tam sim no tsuas yog qhov kawg uas ploj lawm - txij li koj yuav zaum khiav Raspberry Pi 4 nyob rau hauv hom tsis muaj lub taub hau, peb tsis tuaj yeem pom cov lus hauv qab. Rau qhov ntawd peb yuav xav teeb tsa ROS kom khiav ntawm ntau lub tshuab.
Kauj Ruam 5: Teeb ROS kom khiav ntawm Ntau Lub Tshuab
Rau ntu no koj yuav xav tau lub khoos phis tawj Ubuntu 18.04 nrog ROS Melodic teeb tsa. Txij li nws yog Ubuntu ROS tuaj yeem yooj yim teeb tsa siv apt-tau raws li tau piav qhia hauv qhov kev qhia no.
Tom qab koj tau ua haujlwm ROS teeb tsa ob qho tib si ntawm Raspberry Pi thiab koj lub tshuab desktop, txheeb xyuas IP chaw nyob ntawm ob lub tshuab. Lawv yuav tsum nyob hauv tib lub network!
Khiav roscore ntawm koj lub khoos phis tawj desktop thiab xa ROS_MASTER_URI
roscore
export ROS_MASTER_URI = https:// [koj-desktop-machine-ip]: 11311
Tom ntej ntawm Raspberry PI ua
export ROS_MASTER_URI = https:// [koj-desktop-machine-ip]: 11311
export ROS_IP = [koj-raspberry-pi-ip]
thiab tso tawm RPILIDAR cov ntaub ntawv tso tawm
roslaunch rplidar_ros rplidar.launch
Yog tias nws pib ua tiav, txheeb xyuas cov ncauj lus tam sim no ntawm koj lub tshuab desktop nrog cov npe rostopic
Yog tias koj tuaj yeem pom / luam theej duab, txhua yam ua haujlwm raws li nws xav kom ua haujlwm. Tom qab ntawd tso RVIZ ntawm koj lub tshuab desktop, ntxiv Laser Scan cov lus thiab xaiv /luam theej duab. Koj kuj tseem yuav tsum hloov pauv cov duab thav duab rau /laser.
Voila!
Kauj ruam 6: Ua tiav
Phau ntawv qhia no tuaj yeem yog thawj kauj ruam ntawm kev tsim koj lub ROS neeg hlau nyob rau sab saum toj ntawm Raspberry Pi tshiab 4. Peb tau teeb tsa ROS Melodic thiab npaj qhov kev teeb tsa rau kev ua haujlwm tsis muaj lub taub hau thiab txuas rau peb lub tshuab desktop dhau wireless network rau kev tswj chaw taws teeb.
Cov kauj ruam tom ntej yog nyob ntawm seb hom neeg hlau twg koj xav tsim. Koj tuaj yeem ntxiv cov motors thiab encoders rau odometry, lub koob yees duab tso suab rau Visual SLAM thiab txhua yam ntawm lwm yam uas zoo siab thiab muaj txiaj ntsig.
Kho vajtse rau kab lus no tau ua siab zoo muab los ntawm Seeed studio. Txheeb xyuas Raspberry Pi 4, RPLIDAR A1M8 thiab lwm yam khoom siv kho vajtse rau cov neeg tsim khoom ntawm Seeed studio khw!
Ntxiv rau kuv ntawm LinkedIn yog tias koj muaj lus nug thiab sau npe yuav rau kuv tus YouTube channel kom tau txais kev ceeb toom txog cov haujlwm txaus nyiam uas cuam tshuam nrog kev kawm tshuab thiab neeg hlau.
Pom zoo:
Pib Nrog Tus Nqi RPLIDAR Tus Nqi Uas Siv Jetson Nano: 5 Kauj Ruam
Pib Nrog Tus Nqi RPLIDAR Tus Nqi Qis Siv Jetson Nano: Lub ntsiab lus luv luvLight Detection and Ranging (LiDAR) ua haujlwm zoo ib yam li ultrasonic rangefinders nrog laser pulse yog siv lub suab tsis. Yandex, Uber, Waymo thiab lwm yam tab tom nqis peev ntau hauv LiDAR thev naus laus zis rau lawv lub tsheb loj
Yuav Siv RPLIDAR 360 ° Laser Scanner Nrog Arduino: 3 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Siv RPLIDAR 360 ° Laser Scanner Nrog Arduino: Kuv yog tus kiv cua loj ntawm kev tsim cov neeg hlau sumo thiab kuv ib txwm saib xyuas cov cuab yeej tshiab nthuav thiab cov ntaub ntawv siv los tsim kom zoo dua, sai dua, ntse neeg hlau. Kuv pom tawm txog RPLIDAR A1 uas koj tuaj yeem tau txais rau $ 99 ntawm DFROBOT.com. Kuv tau hais tias kuv xav tau
Kev Tiv Thaiv Chav: Lub Platform rau Kawm ROS Kev Nkag Mus Nrog Roomba, Raspberry Pi thiab RPLIDAR: 9 Kauj Ruam (nrog Duab)
Kev Tiv Thaiv Chav: Lub Platform rau Kawm ROS Kev Nkag Mus Nrog Roomba, Raspberry Pi thiab RPLIDAR: Qhov no yog dab tsi? &Quot; Roomblock " yog lub platform neeg hlau suav nrog Roomba, Raspberry Pi 2, lub laser sensor (RPLIDAR) thiab lub roj teeb txawb. Lub thav duab thav duab tuaj yeem tsim los ntawm 3D tshuab luam ntawv. ROS kev qhia ua haujlwm pab ua daim ntawv qhia chav thiab siv kuv