Cov txheej txheem:

Virtual Reality Controlled RC Tsheb: 9 Kauj Ruam
Virtual Reality Controlled RC Tsheb: 9 Kauj Ruam

Video: Virtual Reality Controlled RC Tsheb: 9 Kauj Ruam

Video: Virtual Reality Controlled RC Tsheb: 9 Kauj Ruam
Video: The Car Crash That Decapitated Fourteen People | Last Moments 2024, Hlis ntuj nqeg
Anonim
Image
Image

Koj puas tau xav kom poob qis thiab sim ua cov khoom siv zoo li Innerspace lossis Voyage Zoo heev? Zoo, Kuv xav tias qhov no ze li koj tab tom yuav tau txais daim ntawv ceeb toom luv luv!

Nov yog lub suab:

Real-Life cov chaw taws teeb tswj lub tsheb tsav los ntawm Virtual Reality hais kom ua console. Qhov no txhais tau tias koj pluaj ntawm VR Lub Pob Ntseg, Tig lub hloov ntawm lub tsheb RC, tom qab ntawd tuaj yeem tsav los ntawm VR nrog cov vis dis aus nyob ncaj rau koj lub ntsej muag.

Muaj koj yam uas kuv tau siv uas koj tuaj yeem tswj tau ntawm VR Tsheb.

  1. Log
  2. Horn
  3. Teeb

Tag nrho cov no muaj qee qhov khawm lossis qib hauv VR uas koj tuaj yeem tig lossis hloov pauv kom tsav tsheb.

Txog qhov rov ua tiav thiab cov ntaub ntawv ntau ntxiv, txheeb xyuas kuv Github thiab kuv lub vev xaib!

Kauj Ruam 1: Cov Khoom thiab Cov Cuab Yeej

Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej

Neeg kho tshuab:

4 Log Tsav Chassis Cov Khoom

Hluav taws xob:

  • Log Encoder
  • 3S 1300mAh Roj teeb
  • Arduino Ib
  • Arduino Tsav Shield
  • Piezo Electric Buzzer
  • LED me me
  • XT60 Cov Txuas Txuas
  • Boost / Buck Converter

Khoos phis tawj:

  • Txhua lub tshuab computer suav nrog: Raspberry Pi, Jetson Nano, thiab lwm yam.
  • USB Lub Koob Yees Duab (nyiam dua - 180 degree lub koob yees duab)

Cov Cuab Yeej / Ntxiv:

  • Soldering Hlau
  • Qee qhov teeb tsa VR - Kuv muaj Oculus Rift
  • Multimeter

Kauj Ruam 2: Tsim Tsheb

Tsim Tsheb
Tsim Tsheb
Tsim Tsheb
Tsim Tsheb
Tsim Tsheb
Tsim Tsheb

Lub chassis rau lub tsheb yog super yooj yim los tsim. Koj tsuas yog yuav tsum tau xa cov tshuab mus rau lub rooj tsavxwm tseem ceeb ntawm cov tab uas lawv muab rau koj. Tom qab koj tau txuas lub log thiab lub cev muaj zog, koj tseem yuav xav tau qee yam los txuas lub koob yees duab rau sab xub ntiag ntawm lub tsheb.

Kuv siv lub thawv ntawv uas lub koob yees duab tuaj rau nws. Kuv txiav tawm L loj loj thiab txiav lub qhov rau lub koob yees duab txhawm rau txhawm rau txhawm rau txhawm rau. Tom qab ntawd, koj tsuas tuaj yeem ntsaws lub koob yees duab hla, thiab muab qee daim kab xev tso rau tom qab kom nws nyob hauv qhov chaw. Yog tias koj xav tau, koj tseem tuaj yeem tso qhov rau koj lub taub hau tam sim no ib yam nkaus, lossis ua qhov ntawd tom qab thaum ntsuas tawm qhov ntev ntawm xaim.

Koj kuj tseem yuav tsum xa lub log log rau ib qho ntawm lub log. Nws tsis muaj teeb meem dab tsi, Kuv muab tso rau ntawm lub log sab laug tom qab. Koj yuav tsum tau muab lub tshuab nqus hlau tso rau ntawm lub log tiag tiag ntawm lub log, thiab tus lej nkag yuav tsum txuas nrog lub tsheb nyob ib sab ntawm nws. Nws yog qhov zoo nkauj heev, yog li nws tsis tas yuav tsum tau ua ncaj rau nws, tab sis kom ze li sai tau. Kuv tau ruaj ntseg kuv tus lej cim nrog kab xev thiab zip kaw. Tus encoder yog yam peb yuav siv los ntsuas qhov ceev ntawm peb lub tsheb.

Kauj Ruam 3: Cov Hluav Taws Xob Hluav Taws Xob

Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob
Cov Hluav Taws Xob Hluav Taws Xob

Ib feem no yog qhov tsis txaus ntseeg, tab sis tsis nyuaj. Yog tias koj ua raws daim duab, thiab ntsuas txhua yam ua ntej koj txiav koj cov xaim, nws tsis phem heev.

Thaum koj tab tom ua qhov no, koj yuav tsum tau ntsuas koj cov nyiaj hloov pauv kom tso tawm qhov hluav taws xob raug. Raspberry Pi thiab Jetson Nano ob leeg siv 5v hauv, tab sis peb lub roj teeb nyob ntawm 11.1v. Yog li, peb yuav tsum paub tseeb tias peb tsis kib peb cov khoom siv hluav taws xob. Txhawm rau ua qhov no, ntsaws koj lub roj teeb rau sab sab ntawm lub pob hloov pauv. Thaum lub roj teeb ntsaws, siv koj lub ntsuas cua los ntsuas qhov tso tawm sab ntawm tus hloov pauv. Siv lub taub hau me me ntswj taub hau tig lub potientiometer ntawm tus hloov pauv phaus kom txog thaum qhov hluav taws xob tso tawm yog 5v. Thaum cov zis raug lawm, koj yuav tsis tau tig lub potientiometer ntxiv lawm.

Kauj Ruam 4: Txhim Kho Kev Txom Nyem Ntawm Qhov System

Txhim Kho Kev Txom Nyem Ntawm Qhov System
Txhim Kho Kev Txom Nyem Ntawm Qhov System

Tsis ntau dhau los ua ntawm no, tab sis tseem tseem ceeb heev.

Ua ntej, nco ntsoov tias koj txuas rau lub router koj yuav siv yog li nws tuaj yeem txuas ncaj qha txij tam sim no mus.

Tom qab ntawd, qhib lub davhlau ya nyob twg thiab ntaus hauv qab no:

sudo apt hloov tshiab

sudo apt nruab openssh-server

sudo apt install python-pip pip install numpy pip install opencv-python pip install nruab pyzmq

Thaum cov khoom no tau teeb tsa, peb yuav tsum paub tseeb tias, tsis muaj teeb meem dab tsi qhov chaw nres nkoj arduino tau txuas rau, nws ib txwm lees paub. Yog li, peb sau qhov hu ua UDEV cov cai. Cov no yog cov cai rau koj li kev ua haujlwm uas tswj hwm dab tsi tshwm sim thaum koj ntsaws rau hauv. Peb xav txheeb xyuas cov arduino thaum nws txuas nrog, thiab muab nws lub npe kom nkag mus tau los ntawm. Lub npe ntawd yuav yog "arduino_0". Txhawm rau ua qhov no, peb yuav siv tus lej sab hauv ntawm arduino los txheeb xyuas nws.

udevadm cov ntaub ntawv -a -n /dev /ttyUSB1 | grep '{xov tooj}' | cev n1

Qhov no yuav ntuav tawm tus nqi rau tus lej lej, mus tom ntej thiab luam tus nqi ntawd.

Peb yuav tsum tau kho (lossis tsim yog tias nws tsis muaj) cov ntaub ntawv hu ua "99-usb-serial.rules". Cov ntaub ntawv no nyob hauv cov kab ntawv hauv qab no "/etc/udev/rules.d/99-usb-serial.rules". Zoo li kuv tau hais, yog tias cov ntaub ntawv tsis muaj nyob, tsuas yog tsim nws thiab muab tshuaj txhuam hauv kab hauv qab no nrog VALUE_FROM_ABOVE hloov nrog koj tus nqi los ua ntej.

SUBSYSTEM == "tty", ATTRS {serial} == "VALUE_FROM_ABOVE", SYMLINK+= "arduino_0"

Qhov no qhia rau kev ua haujlwm uas thaum twg nws pom tus lej tshwj xeeb no hu rau nws arduino_0.

Qhov kawg ua ntawm no yog rub lub pushArucoVideoPullCommands.py thiab muab tso rau qhov chaw yooj yim. Kuv xav qhia cov npe hauv tsev rau koj cov neeg siv, vim qhov ntawd yog qhov uas peb yuav xaus thaum peb SSH rau hauv cov kab ke tom qab.

Kauj Ruam 5: Teeb IP Chaw Nyob

Teeb Static IP Chaw Nyob
Teeb Static IP Chaw Nyob

Tam sim no yog ib feem uas txhua tus nyiam, IP chaw nyob. Txhawm rau txoj haujlwm no ua haujlwm, txoj cai xav paub yuav xa cov duab thiab tswj cov lus txib mus rau qhov twg, thiab qhov ntawd txhais tau tias peb cov cuab yeej xav tau IP zoo li qub.

Muaj ntau txoj hauv kev los teeb tsa koj lub cuab yeej IP zoo li qub, tab sis, vim tias peb muaj lub router txuas peb lub chaw nres tsheb hauv av thiab teeb tsa kab ke, peb tuaj yeem siv nws los muab cov IP chaw tshwj xeeb rau peb yooj yim heev.

Nkag mus rau koj tus router ntu kev tswj hwm, feem ntau (rau feem ntau routers) qhov no yog ua los ntawm kev qhib lub vev xaib thiab mus rau "192.168.1.1". Nws yuav nug koj kom nkag mus rau hauv, thiab tus qauv siv tus username thiab password rau feem ntau routers yog "admin".

Thaum muaj, mus rau qee yam uas hais txog 'DHCP Server'. Qhov no yog txheej txheem uas ua haujlwm ntawm koj lub router thiab taug qab cov khoom siv txuas nrog nws li cas los ntawm lawv MAC Chaw Nyob, uas ib txwm nyob tas li. Peb xav xaiv cov cuab yeej uas peb saib xyuas txog, lub computer chaw nres tsheb hauv av thiab cov kab ke ua haujlwm, thiab ntxiv lawv rau hauv seem cov neeg siv khoom tshwj xeeb.

Nco ntsoov tias koj teeb tsa Tus Txheej Txheem Tus IP rau 192.168.1.122 Lub chaw nres tsheb hauv av tus IP tuaj yeem teeb tsa rau ib yam twg.

Kauj ruam 6: Upload Code rau Arduino

Upload Code rau Arduino
Upload Code rau Arduino

Txhawm rau xa cov cai arduino, peb yuav tsum xub nruab ib lub tsev qiv ntawv los ua haujlwm nrog lub cav thaiv.

Ntawm koj Arduino IDE, mus rau Sketch-> Suav nrog Tsev Kawm Ntawv-> Tswj Cov Tsev Qiv Ntawv … Tom qab ntawd, tshawb rau Adafruit Motor Shield Library. Nruab lub tsev qiv ntawv no, tom qab ntawd xa cov cai rau koj li arduino, tsis muaj dab tsi ntxiv uas yuav tsum tau ua.

Kauj Ruam 7: Txuas Circuitry & Computer rau Tsheb

Txuas Circuitry & Computer rau Tsheb
Txuas Circuitry & Computer rau Tsheb

Tam sim no tau tsim lub Circuit Court, Nws yog lub sijhawm los muab txhua yam tso rau hauv lub tsheb. Kuv yuav tsis dag, ntau yam ntawm cov khoom no tsuas yog tuav nrog daim kab xev vim tias qhov ntawd yog qhov yooj yim rau kuv los npuaj ua ke nrawm heev. Uas tau hais tias, tau teeb tsa lub qhov mounting raws li pom hauv daim duab saum toj no.

Feem ntau ntawm txhua yam zoo nkauj yooj yim tsuas yog cia zaum qee qhov nyob saum lub tsheb, yog li, tsis txhob txhawj yog tias tsis muaj chaw ntau.

Kauj Ruam 8: Teeb VR Ib puag ncig

Teeb VR Ib puag ncig
Teeb VR Ib puag ncig

Tshooj lus no yuav saib qhov sib txawv me ntsis nyob ntawm seb yam teeb tsa VR koj tau ua mus li cas. Txawm li cas los xij, Kuv siv SteamVR los tsim cov software no, yog li koj yuav xav tau qhov ntawd teeb tsa.

Tsuav koj siv SteamVR, cov kev tswj hwm yuav tsum hloov pauv rau cov tswj sib txawv. Kuv tau teeb tsa cov kev tswj hwm rau "Ua" tsis tas khawm, yog li, hauv kev xav, nws yuav hloov pauv rau txhua tus.

Koj tsuas yog yuav tsum rub tawm thiab unzip cov ntaub ntawv nrog tsim kev sib koom ntiaj teb thiab npaj kom khiav VR_Bot.exe.

Kauj Ruam 9: Khiav Nws Ua Ke

Khiav Nws Ua Ke
Khiav Nws Ua Ke
Khiav Nws Ua Ke
Khiav Nws Ua Ke

Yog li, tam sim no peb tau teeb tsa lub tsheb, thiab cov chaw nres tsheb hauv av tau sib txuas thiab npaj mus, peb yuav ua li cas thiaj khiav tus tub phem no? Zoo, los ntawm Chaw Nres Nkoj qhov pom, txhua yam koj yuav tsum ua nws khiav VR_Bot.exe cov ntaub ntawv peb tau pom los ntawm ua ntej.

Nyob rau tib lub sijhawm, koj yuav tsum tau ntsaws lub roj teeb rau hauv Embedded System, thiab kom nws cia li pib khau raj thiab txuas rau koj lub router. Thaum nws tau khau raj, SSH rau hauv nws. Txhawm rau nkag mus rau qhov no, koj yuav xav tau qee yam ntawm lub davhlau ya nyob twg hauv qhov chaw nres tsheb hauv av, Kuv pom zoo GitBash.

SSH sawv rau Kev Ruaj Ntseg Plhaub thiab nws yog cov txheej txheem rau kev nkag mus rau cov chaw nyob deb kom ruaj ntseg. Hauv peb qhov xwm txheej, nws yuav ua rau peb nkag mus rau Embedded System los ntawm Chaw Nres Tsheb. Nyem qhov no kom paub ntau ntxiv.

Koj yuav tsum paub lub npe siv uas koj teeb tsa koj cov kab ke nrog. Rau raspberry pi lub npe siv tsis raug yog 'pi' thiab lo lus zais 'raspberry'.

Thaum ntsia, qhib lub davhlau ya nyob twg thiab ntaus hauv qab no:

ssh {Embedded System's username}@192.168.1.122

Qhov no yuav qhib lub davhlau ya nyob twg hauv Qhov System Embedded.

Ib zaug muaj, koj tsuas yog yuav tsum ua kab lus nab nab peb tau theej ua ntej lawm.

nab hab sej /path/to/pushArucoVideoPullCommands.py

Tom qab koj ua qhov ntawd, Cov Txheej Txheem Txheej Txheem yuav pib tso tawm cov duab thiab tau txais cov lus txib mus thiab los ntawm chaw nres tsheb hauv av.

Tom qab ntawd koj zoo los pib tsav tsheb thiab muaj kev lom zem!

Pom zoo: