Cov txheej txheem:
- Kauj Ruam 1: Kauj Ruam 1: Cov Ntaub Ntawv Xav Tau
- Kauj Ruam 2: Kauj Ruam 2: Teeb/Tau Txais Code rau Roomba
- Kauj Ruam 3: Kauj Ruam 3: Teeb Tsa Cliff Sensors/LED Teeb
- Kauj Ruam 4: Kauj Ruam 4: Txheeb Xyuas Cov Teeb Meem
- Kauj Ruam 5: Kauj Ruam 5: Plotting
Video: Roomba MATLAB Project: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Txoj phiaj xwm tam sim no uas NASA muaj rau Mars rover yog rau nws los ua cov ntaub ntawv khaws cia thiab ncig ib puag ncig Mars, khaws cov av ntawm cov av coj rov qab los rau ntiaj teb kom cov kws tshawb fawb pom tau tias puas muaj ib lub neej yav dhau los hauv ntiaj chaw. Ib qho ntxiv, lub rover xa rov qab cov duab rau cov kws tshawb fawb, kom lawv tuaj yeem pab tshawb nrhiav lub rover thiab kho txhua yam teeb meem uas nws yuav muaj.
Peb pab pawg neeg lub tswv yim rau peb txoj haujlwm yog rau lub rover ua tib yam li NASA lub rover uas yuav tawm hauv ntiaj teb xyoo 2020, tab sis rau nws kuj tseem yuav qhia tawm thaj chaw thaj av. Roomba yuav tuaj yeem hnov pob tsuas thiab nres nws tus kheej ua ntej nws ntog tawm, thiab tom qab ntawd rov qab, tig, thiab hloov nws txoj hauv kev kom nws yuav tsis poob thiab raug puas tsuaj. Peb lwm lub tswv yim sib koom ua ke rau hauv peb txoj haujlwm yog rau chav tsev kom tuaj yeem tawm tswv yim tawm thaj chaw nws pom, thiab qhia cov phiaj xwm txhua lub sij hawm lub voj tiav thiab nws txoj haujlwm tau ua tiav.
Cov lus qhia no yog rau lwm tus neeg uas xav tsim tib hom lej rau lawv chav nyob.
Kauj Ruam 1: Kauj Ruam 1: Cov Ntaub Ntawv Xav Tau
Koj yuav xav tau:
- Ib chav
- MATLAB
- Cov ntaub ntawv no los khiav lub roomba
- Ib qho chaw tiaj
- Ib lub rooj saum npoo los ua tus "pob tsuas"
Kauj Ruam 2: Kauj Ruam 2: Teeb/Tau Txais Code rau Roomba
Koj lub vijtsam yuav zoo li qhov no thaum koj nkag cov ntaub ntawv.
Kauj Ruam 3: Kauj Ruam 3: Teeb Tsa Cliff Sensors/LED Teeb
Txoj cai no yuav qhia rau koj chav nyob raws nraim li cas lub kaum sab xis tig, txheeb xyuas cov ntaub ntawv roj teeb, qhia rau koj chav nyob sai npaum li cas mus, thiab tshuaj xyuas ib tus neeg los ntawm chav roomba lub koob yees duab. Nws kuj tseem yuav ceeb toom yog tias nws txheeb xyuas tus neeg, thiab nres nws tus kheej ua ntej tawm ntawm lub pob tsuas.
% sim rob.setLEDDigits ('') x = 0; y = 0; tau = 0; kev khuam siab = ; voj voog = 1; AngCorr = @(x) x + 3.059.*X.^0.4205; %Muaj nuj nqi los kho cov ces kaum thaum rob.getBatteryInfo.percent> 15 rob.setLEDDigits ('') rob.setDriveVelocity (0.1) %Mus %Txheeb Rau Tus Neeg yog AA_checkperson (rob) rob.beep kawg %Txheeb Cliff Sensor yog AA_cliffcheck (rob) rob.stop rob.setLEDDigits ('Cliff') ncua (0.5) teeb meem (voj voog) = 2; AA_cliffbeep (rob) %Back Up Thiab Tig rob.moveDistance (-. 15) rob.turnAngle (30) kawg
Kauj Ruam 4: Kauj Ruam 4: Txheeb Xyuas Cov Teeb Meem
Txoj cai no yuav tau txais roomba txhawm rau txheeb xyuas cov khoom nyob ib puag ncig nws, thiab yuav tshuaj xyuas lub pob qhov taub kom paub tseeb tias nws nres ua ntej nws ua rau nws tus kheej puas tsuaj.
%Txheeb Lub Teeb Sensor yog AA_lightcheck (rob) rob.stop rob.setLEDDigits ('Phab Ntsa') ncua (0.5) teeb meem (voj voog) = 1; %Wall AA_wallbeep (rob) %Back Up Thiab Turn rob.moveDistance (-. 15) rob.turnAngle (30) kawg %Txheeb xyuas Bump Sensor yog AA_bumpcheck (rob) rob.stop rob.setLEDDigits ('Wall') ncua (0.5) teeb meem (voj voog) = 1; %Wall AA_wallbeep (rob) %Back Up Thiab Turn rob.moveDistance (-. 15) rob.turnAngle (30) kawg %Yog tias tsis muaj yog kev zam (teeb meem) teeb meem (voj voog) = 0; elseif ntev (teeb meem) <voj voog teeb meem (voj voog) = 0; kawg
Kauj Ruam 5: Kauj Ruam 5: Plotting
Txoj cai no yuav qhia rau koj chav nyob rau phiaj xwm seb nws ntsib dab tsi ntawm nws txoj kev taug. Cov phiaj xwm zoo li qhov no yuav tshwm sim tom qab chav tsev so lawm.
%Tau Txais Txoj Haujlwm d = rob.getDistance; yog cycle == 1 theta (cycle) = 0; x (cycle) = d.*cosd (theta (voj voog))); % tag nrho cov kev ncig mus los hauv x y (cycle) = d.*sind (theta (cycle))); % tag nrho cov kev mus ncig hauv y lwm tus theta (voj voog) = theta (cycle-1) + rob.getAngle; x (cycle) = d.*cosd (theta (cycle)) + x (cycle-1); % tag nrho cov kev ncig mus los hauv x y (cycle) = d.*sind (theta (cycle)).*d + y (cycle-1); %tag nrho cov kev ncig mus ncig hauv y kawg %Kev tawg yog tias rob.getButtons.clean so kawg %Kev nce hauv lub voj voog = voj voog + 1; kawg rob.stop rau kuv = 1: kev hloov pauv yog qhov thaiv (i) == 1 %Cov phiaj xwm phab ntsa (x (i), y (i), 'Marker', 'xwmfab', 'MarkerEdgeColor', 'r') lwm yam kev khuam siab (i) == 2 %Cliff plot (x (i), y (i), 'Marker', 'o', 'MarkerEdgeColor', 'k') end text (.9, 0.9, sprintf ('Square = Wall) nCircle = Cliff '),' Units ',' normalized ') tuav qhov kawg % Teeb meem teeb liab thaum muaj tseeb rob.beep ncua (3) yog rob.getButtons.clean so kawg kawg % catch % rob.stop % kawg
Pom zoo:
MATLAB Tswj Roomba: 5 Kauj Ruam
MATLAB Tswj Roomba: Lub hom phiaj ntawm txoj haujlwm no yog siv MATLAB nrog rau kev hloov kho iRobot programmable neeg hlau. Peb pab pawg sib koom ua ke peb cov txuj ci txhawm rau txhawm rau tsim MATLAB tsab ntawv uas siv ntau lub zog ntawm iRobot, suav nrog cov pob zeb
Mars Roomba Project UTK: 4 Kauj Ruam
Mars Roomba Project UTK: DISCLAIMER: Qhov no tsuas yog ua haujlwm yog tias ROOMBA tau teeb tsa nyob rau hauv txhua txoj kev tshwj xeeb, Txoj kev qhia no tau tsim rau thiab koom nrog kom tau siv los ntawm UNIVERSITY NTAWM TENNESSEE Cov Tub Kawm Ntawv thiab FACULTY sau ntawv thiab
Roomba Project: 5 Kauj Ruam (nrog Duab)
Roomba Project: Cov lus qhia no tau tsim los ua kom tiav txoj haujlwm yuav tsum tau ua ntawm Makecourse ntawm Tsev Kawm Qib Siab South Florida (www.makecourse.com) .Qhov qhia no yuav suav tag nrho cov kauj ruam tsim nyog thiab cov khoom uas yuav tsum tau sib sau ua ke rau kuv Roomba proje
Los ntawm Roomba mus rau Rover Tsuas yog 5 Kauj Ruam!: 5 Kauj Ruam
Los ntawm Roomba mus rau Rover Tsuas yog 5 Kauj Ruam!: Roomba neeg hlau yog txoj kev lom zem thiab yooj yim los ntsaws koj cov ntiv taw hauv ntiaj teb neeg hlau. Hauv Cov Lus Qhia no, peb yuav nthuav qhia yuav ua li cas hloov pauv Roomba yooj yim mus rau hauv kev tswj hwm lub zog uas ib txhij tshuaj xyuas nws ib puag ncig.Parts List1.) MATLAB2.) Roomb
Roomba Nrog MATLAB: 4 Kauj Ruam (nrog Duab)
Roomba Nrog MATLAB: Txoj haujlwm no siv MATLAB thiab iRobot Create2 programmable robot. Los ntawm kev tso peb qhov kev paub ntawm MATLAB rau qhov kev sim, peb muaj peev xwm tsim qhov Tsim2 los txhais cov duab thiab kuaj pom cov cim. Kev ua haujlwm ntawm tus neeg hlau nyob ntawm qhov feem ntau ntawm