Konfiguracija robota

Konfiguriranje vizijskega senzorja v VEXcode IQ

Vizijski senzor vašemu robotu omogoča zaznavanje barv v okolici in odzivanje nanje. Z vgrajeno kamero in vgrajeno obdelavo podatkov vizijski senzor prepozna in sledi barvnim podpisom, ki so določene barve, ki jih konfigurirate za svoj projekt.

Ko so barvni podpisi konfigurirani, lahko senzor poroča podatke, kot so položaj, velikost in število ujemajočih se predmetov v vidnem polju.

Pomembno: Vizijski senzor je mogoče konfigurirati samo ob aktivni internetni povezavi.

Povezava z vizijskim pripomočkom

A device selection screen in VEXcode IQ showing a grid of icons representing available devices. The Vision Sensor icon is highlighted with a white border in the lower center of the grid. Other device icons include Controller, Drivetrain 2-Motor, Drivetrain 4-Motor, Motor Group, Motor, Bumper, Distance (1st gen), Distance (2nd gen), TouchLED, Color, Optical, Gyro, and Pneumatic. The screen header reads Select a device, and there are buttons labeled Cancel and Done at the bottom.

Za začetek konfiguriranja vizijskega senzorja ga najprej dodajte kot napravo v oknu naprav.

The Vision Sensor Settings panel in VEXcode V5 with the sensor labeled as Vision1. A large Vision Sensor icon is displayed, and beneath it, a blue button labeled Open Utility is highlighted with a white border. Below is a configuration text area for pasting sensor data, and buttons labeled Clear Config, Paste Config, Delete, Cancel, and Done.

Izberite Open Utility, da začnete konfigurirati barvne podpise.

The Vision Sensor Utility interface shows a grid of colorful calibration squares on the left and a list of Signature slots on the right, labeled SIG_1 through SIG_7. Each signature has buttons for Set and Clear. The brightness slider at the top is set to 50. A Copy Config button appears at the bottom.

Izberite ikono kamere v zgornjem levem kotu okna, da povežete vizijski senzor.

A close-up of the back of a VEX Vision Sensor showing its ports. The USB port is on the left and is illuminated with a yellow light, indicating the sensor is connected. The sensor also has two other ports for connecting to the V5 Brain.

Vizijski senzor povežite z računalnikom prek priključka micro-USB.

A browser prompt from vision.vexcode.cloud asking to connect to a Vision Sensor. The device name Vision Sensor is highlighted in a blue selection box. Buttons labeled Connect and Cancel are shown at the bottom of the prompt.

V pogovornem oknu naprave izberite vizijski senzor. Tukaj je prikazano vmesnik sistema Windows kot referenca.

Opomba: Vizijskega senzorja ni mogoče konfigurirati z vizijskim pripomočkom, medtem ko je priključen na Brain IQ (1. generacija) ali (2. generacija).

The live preview feed from the Vision Sensor Utility showing a red cube centered in a white environment. The interface displays a Brightness slider set to 50 at the top and configuration controls for SIG_1 through SIG_7 on the right side. The Clear All button appears below the signature slots.

Ko je senzor povezan, vizijski senzor prikaže sliko, posneto ob vzpostavitvi povezave, ikona kamere v zgornjem desnem kotu pa se obarva zeleno.

Konfiguriranje barvnega podpisa

A dim Vision Sensor preview showing a barely visible red cube due to low lighting. The brightness control at the top is set to 50. The object is mostly in shadow, with the background appearing dark purple.

Za posodobitev slike, prikazane v vizijskem pripomočku, izberite zeleno ikono kamere.

Nizka svetlost

The Vision Sensor preview showing a red cube with brightness set to 10. The scene appears underexposed but more visible than the previous image. The cube is centered in a curved white backdrop and is tilted slightly to the right.

Visoka svetlost

The Vision Sensor preview with brightness increased to 150. The red cube is centered and brightly lit, but the image appears overexposed with washed-out colors. Details of the cube are difficult to discern due to the intensity of the lighting.

Za spreminjanje svetlosti slik, ki jih posname vizijski senzor, uporabite drsnik za svetlost na vrhu vizijskega pripomočka.

Kazalec miške postavite nad enobarvni predmet, nato pa izberite in povlecite čez želeno barvo, da jo konfigurirate, kot je prikazano v tem videoposnetku. Opomba: Pazite, da ostanete znotraj meja barve, ki jo želite izbrati. V nasprotnem primeru lahko pomotoma zajamete barve iz ozadja, kar lahko moti zaznavanje vizijskega senzorja.

The Vision Sensor preview with a red cube outlined in a red detection box. The brightness is low, and the image is dark. On the right side, the SIG_1 slot has its Set button highlighted, indicating it is active for signature training.

Gumb Set se obarva zeleno. Izberite ga, da shranite barvo.

The Vision Sensor preview showing a red cube being tracked. A white bounding box and crosshair overlay surround the object, labeled RED_BOX. The coordinates CX 147, CY 142, width 94, and height 96 are displayed in white text above the object. On the right, the RED_BOX signature is listed and selected among other SIG entries.

Ko je barvni podpis nastavljen, se okoli vseh barv, ki se ujemajo s tem podpisom, prikaže okvir za zaznavanje. Za več informacij o lastnostih predmetov in načinu programiranja z njimi obiščite spletišče API Reference za IQ (2. generacija) ali IQ (1. generacija).

Barvni podpis lahko tudi preimenujete s klikom na ime (privzeto je prvo ime SIG_1). S klikom zunaj besedilnega polja se ime shrani.

Izberite ikono puščic poleg barvnega podpisa, da prilagodite njegovo toleranco, kot je prikazano v tem videoposnetku. Povečanje tolerance omogoča prepoznavanje širšega razpona podobnih odtenkov kot istega barvnega podpisa, kar je koristno v razmerah z nestalno osvetlitvijo — na primer pri sencah ali bleščanju. Zmanjšanje tolerance naredi senzor bolj selektiven, tako da prepozna le barve, ki so zelo blizu izvirnemu podpisu.

Konfiguriranje barvne kode

The Vision Sensor preview shows two tracked objects labeled RED_BOX and BLUE_BOX, each with a bounding box and crosshair overlay. The red box is on the left with coordinates CX 73, CY 137, width 90, and height 90. The blue box is on the right with coordinates CX 191, CY 140, width 94, and height 92. On the right side, the signature list includes RED_BOX and BLUE_BOX. The Codes tab at the bottom is highlighted.

Barvna koda je kombinacija barvnih podpisov, ki tvorijo vodoravni vzorec. Ko imate konfigurirane barvne podpise, izberite zavihek Codes, da začnete konfigurirati barvne kode.

The Codes tab is now active. The same red and blue cubes are detected on the left, with RED_BOX and BLUE_BOX labels. On the right panel, the top row shows a grouped code with both names: RED_BOX, BLUE_BOX. Below it are empty code input fields labeled Enter Code.

V desno besedilno polje vnesite imena barvnih podpisov, ki jih želite vključiti v barvno kodo, v ustreznem vrstnem redu, ločena z vejicami.

Na primer, za ustvarjanje vzorca Rdeča, ki ji sledi Modra, vnesite RED_BOX,BLUE_BOX. Za ustvarjanje vzorca Modra, ki ji sledi Rdeča, vnesite BLUE_BOX,RED_BOX.

The Vision Sensor preview again shows the red and blue cubes side by side. A custom label, BOX_CODE, is shown in the top-right corner of the code list, grouping RED_BOX and BLUE_BOX under one entry. The grouped entry appears on the same row as the cube names.

Barvni podpis preimenujete s klikom v levo besedilno polje.

The Vision Sensor preview shows a single large white bounding box combining both the red and blue cubes. The text at the top reads CX 128, CY 134, width 220, height 108, Sig 12 Ang=-1, indicating the combined object signature. The Codes panel on the right shows BOX_CODE as the identifier, with RED_BOX and BLUE_BOX listed as component elements.

Ko je ime nove barvne kode shranjeno, se prikaže na zaslonu.

Barvne kode imajo edinstveno lastnost, ki jo je mogoče uporabiti z njihovimi predmeti — kot (Angle). Za več informacij o tej lastnosti obiščite spletišče API Reference za IQ (2. generacija) ali IQ (1. generacija).

Shranjevanje konfiguracije vizijskega senzorja

The Vision Sensor utility interface shows a live preview with two objects detected and labeled as RED_BOX and BLUE_BOX. Their bounding boxes are displayed with crosshairs, and coordinate data is shown for each. Below the preview, a JSON configuration snippet for RED_BOX is visible, including brightness, signature name, and color parameters. A blue button labeled Copy Config is highlighted at the bottom.

Ko so vsi barvni podpisi in barvne kode nastavljeni, izberite Copy Config in se vrnite v VEXcode.

The Vision Sensor Settings screen with a blue button that is labeled Paste Config and is highlighted.

V VEXcode izberite Paste Config.

The same Vision Sensor Settings screen, now with the configuration JSON pasted into the text field. The JSON includes brightness and RED_BOX signature parameters. The Done button at the bottom right is highlighted, indicating the configuration is ready to be applied.

Nato izberite Done, da shranite konfiguracijo vizijskega senzorja in začnete programirati z njim v VEXcode IQ.

Spletna trgovina

Potrebujete dodatne dele?

Originalni VEX deli, razširitveni seti in kompleti — vse za vaš naslednji robotski projekt na trgovina.robotech.si.

Pripravil RoboTech STEM Center
Stopite v stik

Imate
vprašanje?

Pišite nam — odgovorimo v najkrajšem možnem času.

Vaši podatki so varni in zaupni.