Cov txheej txheem:

2019 FRC Sau Ntawv Qhia Txog Kev Cob Qhia Tsav Tsheb (Java): 5 Kauj Ruam
2019 FRC Sau Ntawv Qhia Txog Kev Cob Qhia Tsav Tsheb (Java): 5 Kauj Ruam

Video: 2019 FRC Sau Ntawv Qhia Txog Kev Cob Qhia Tsav Tsheb (Java): 5 Kauj Ruam

Video: 2019 FRC Sau Ntawv Qhia Txog Kev Cob Qhia Tsav Tsheb (Java): 5 Kauj Ruam
Video: Xia-Reena XIONG (Qhia txog kev npaj ua ntawv Thov VISA tuaj rau teb chaws Mes kas) 2024, Kaum ib hlis
Anonim
2019 FRC Sau Ntawv Qhia Caij Nyoog Yooj Yim (Java)
2019 FRC Sau Ntawv Qhia Caij Nyoog Yooj Yim (Java)

Cov lus qhia no yog hnub tim

Thov khaws qhov muag tawm rau kuv cov lus qhia tom ntej ntawm 2019 lub phiaj xwm tam sim no. Txawm hais tias nws tsis dhau los tseem muaj qee yam uas koj tuaj yeem kawm txog nws zoo li yuav ua li cas thiaj ua tau cov chav kawm thiab sau cov cai yog tib yam.

Cov lus qhia no yuav xav tias koj paub Java yooj yim thiab paub koj txoj hauv kev ib puag ncig tus neeg hlau. Xyoo 2019 lub caij, WPI tab tom hloov nws qhov kev txhawb nqa los ntawm Dab noj hnub mus rau Visual Studio Code IDE txij li peb tau pom qhov no kuv tau ua qhov kev qhia no los pab tib neeg ntawm kuv pab neeg thiab pab lwm pab pawg nrhiav lawv txoj hauv kev thaum siv Visual Studio IDE. Nrog kev tso tawm ntawm 2019 lub caij yog Deep Space themed kuv thiab kuv pab neeg tau npaj thiab tos tsis tau rau qhov kev tso tawm ntawm qhov kev ua si thaum Lub Ib Hlis. Muaj qhov hais ntawd cia peb nkag mus rau hauv CODE!

DISCLAIMER: Qhov VSCode plugin no yog Alpha, thiab nws tau lees tias yuav hloov ua ntej lub caij nyoog raws li kev tawm tswv yim? Ib qho ntxiv, kho dua tshiab los ntawm Alpha los tso tawm yuav xav tau phau ntawv hloov pauv rau kev teeb tsa.

Cov cai no muaj nyob ntawm kuv Github ntawm no.

Kauj ruam 1: Visual Studio Code Install

Nrig txog kev pom Studio Code teeb tsa
Nrig txog kev pom Studio Code teeb tsa
Nrig txog kev pom Studio Code teeb tsa
Nrig txog kev pom Studio Code teeb tsa
Nrig txog kev pom Studio Code teeb tsa
Nrig txog kev pom Studio Code teeb tsa

Thawj kauj ruam yog teeb tsa VSCode koj tuaj yeem rub tawm nws ntawm qhov txuas no.

Thaum cov ntaub ntawv rub tawm nws yog lub sijhawm los khiav lub installer (PS koj yuav xav ntxiv lub desktop duab).

Tom qab khiav VSCode koj yuav tau txais lub qhov rai uas zoo li daim duab 1.

Thaum lub vijtsam zoo li koj yuav tsum tau mus rau qhov txuas ntxiv ntawm sab laug ntawm lub qhov rais thiab tshawb rau "Java Extension Pack" (Daim duab 2) tom qab ntawd nyem nruab (los ntawm txoj kev thaum koj nyem nruab ntau dua li qhov uas yuav nruab).

Tom qab teeb tsa (uas tuaj yeem siv ob peb feeb) koj yuav tsum nyem lub pob rov qab (daim duab 3).

Tom ntej no, koj yuav tsum rub tawm qhov tseeb.vsix tso tawm los ntawm wpilibsuite VSCode GitHub chaw cia khoom los ntawm qhov txuas no.

Tom ntej no, peb yuav tsum rov qab mus rau ntu txuas ntxiv hauv VSCode thiab mus rau peb tus lej thiab mus rau nruab los ntawm VSIX (daim duab 4) tom qab ntawv xaiv VSIX cov ntaub ntawv los ntawm qhov koj rub tawm nws tom qab nws teeb tsa koj yuav rov ua dua VSCode.

Tom qab teeb tsa WPILIB VSIX cov ntaub ntawv koj yuav tsum pom lub logo WPI me me nyob rau sab saum toj sab xis ntawm koj lub qhov rais (Daim duab 5) (yog tias tsis sim rov pib dua VSCode dua lossis rov pib dua koj lub computer).

Kauj Ruam 2: Tsim Txoj Haujlwm Tshiab WPILIB

Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB
Tsim Txoj Haujlwm Tshiab WPILIB

Ua ntej, peb yuav tsum mus rau WPILIB lub logo uas tau hais hauv qib kawg thiab nyem rau nws thiab nqis mus thiab xaiv "Tsim qhov haujlwm tshiab" (koj yuav tau tshawb nrhiav nws). (Duab 1)

Tom qab xaiv koj yuav tsum xaiv "Project template", "Project Language" (qhov no yuav yog java), "A Project Base", "Project Folder", "Project Name". (Duab 2, Duab 3)

Tom qab ntawv nyem "Tsim Txoj Haujlwm", koj yuav xav xaiv "Yog (Qhov rai tam sim no)". (Duab 4)

Kauj Ruam 3: Sau Txoj Cai

Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai

Ua ntej, peb yuav tsum nthuav cov cai pom (Daim duab 1) txhawm rau nrhiav cov subsystems thiab cov lus txib uas peb yuav rho tawm cov lus hais ua piv txwv thiab piv txwv cov kab ke. (Duab 2)

Tom qab tshem tawm cov lus txib thiab cov kab ke peb yuav tsum kho qhov yuam kev uas tshwm sim hauv chav kawm neeg hlau peb yuav ua qhov no los ntawm kev tshem tawm lossis tawm tswv yim kab tawm. (Duab 3)

Tom ntej no, peb yuav xav tsim cov lus txib thiab cov kab ke los ntawm txoj nyem rau ntawm cov ntawv hais kom ua ces nyem tsim cov chav kawm tshiab/hais kom ua koj yuav xav tau xaiv cov lus txib tom qab ntawd nkag mus rau lub npe Kuv hu ua kuv DriveCommand tom qab ntawd ua tib yam rau cov kab ke ຍ່ອຍ cov ntaub ntawv tab sis tsis txhob xaiv cov lus txib koj xaiv subsystem Kuv hu kuv li DriveSub. (Duab 4)

Tom qab tsim ob daim ntawv tshiab peb yuav tsum tau mus rau RobotMap thiab ntxiv plaub qhov sib txawv lawv yuav yog int thiab lawv yuav muaj plaub lub cav tswj lub cev. (Duab 5)

Tom ntej no peb yuav rov qab mus rau DriveSub thiab tsim 4 TalonSRX cov khoom uas muaj npe sib xws nrog 4 lub cav thiab peb xav tau los tsim tus tsim. (Duab 6)

Tom qab ntawd hauv tus tsim peb yuav tsum tsim TalonSRXs nrog cov lej uas muaj nyob hauv RobotMap. (Duab 7)

Tom ntej no, peb tab tom tsim ib txoj hauv kev uas yuav daws txhua yam ntawm peb cov lus teeb tsa zoo li tso zis ntau thiab tso zis tam sim no. (Duab 8)

Tam sim no peb tau npaj los ua txoj hauv kev tsav peb yuav tsum tau theej Chav Kawm Drive uas kuv tau ua uas yuav pab peb. Luam cov ntaub ntawv los ntawm no. (Muab cov ntawv no tso rau hauv daim nplaub tshev tshiab hu ua khoom siv hluav taws xob sab hauv ntawm daim nplaub tshev neeg hlau) (Daim duab 9)

Tom qab peb tau theej cov ntawv ntawd peb tam sim no xav tau los ua Drive cov khoom thiab tsim nws hauv tus tsim. (Duab 10)

Thaum peb muaj peb cov khoom Tsav tsim peb xav tau ib txoj hauv kev rau kev hais kom hu nws yog li peb tsim txoj hauv kev driveArcade nrog ob qhov sib txawv txav thiab tig uas yuav xa los ntawm

Kauj ruam 4: Tsav Command

Tsav Cov Lus txib
Tsav Cov Lus txib
Tsav Cov Lus txib
Tsav Cov Lus txib
Tsav Cov Lus txib
Tsav Cov Lus txib

Tam sim no peb yuav tsum tham txog qhov xav tau. Thaum txoj kev xav tau hu ua nws mus rau lub hauv paus thiab lub subsystem nres tag nrho lwm cov lus txib uas xav tau tib lub subsystem. Yeej, nws hais tias tsuas yog cov khoom no tuaj yeem siv cov txheej txheem hauv lub sijhawm no. Yog li peb yuav tsum xav tau cov cuab yeej driveTrain hauv chav kawm neeg hlau (Thaum koj xa mus rau chav kawm DriveSub koj yuav tsum ib txwm dhau los ntawm cov khoom siv hauv chav kawm neeg hlau). (Duab 1)

Qhov thib ob, peb yuav tsum mus rau chav kawm oi thiab ntxiv cov khoom siv rau pej xeem joystick uas hais txog qhov chaw nres nkoj uas nws tau ntsaws rau ntawm chaw nres tsheb. (Duab 2)

Thaum kawg, peb yuav tsum mus rau DriveCommand thiab hauv txoj kev ua tiav peb yuav tsum tau mus rau chav kawm neeg hlau thiab mus rau driveTrain yam khoom thiab hu nws txoj kev driveArcade hla nws sab laug y axis thiab txoj cai x axis los ntawm tus neeg hlau oi yam khoom. Tom qab ntawd hauv txoj hauv kev cuam tshuam peb yuav tsum hu tus txheej txheem kawg tom qab ntawd hauv txoj hauv kev kawg peb yuav tsum hu rau tus neeg hlau.driveTrain.driveArcade (0, 0) kom paub tseeb tias thaum qhov kev hais kom ua cuam tshuam lossis cov lus txib tau xaus ib qho ntawm kev sib tsoo lossis ntawm qhov yuav tsum tau nres uas nws tsis tsav tsheb. (Duab 3)

Kauj ruam 5: Tso tawm

Thaum kawg xa mus rau tus neeg hlau mus rau wpi logo thiab nyem rau nws thiab tshawb rau kev xa tawm thiab ua raws cov lus qhia.

Pom zoo: