Skip to content
CrocoDocs
Starter GuideProgrammingEngineeringDesignPortfolio
Documentation

Introduction

IntroductionBIOBUZZ game overview

Getting started

Getting startedBlocksOnBot JavaAndroid StudioYour first OpModeJava basicsMotors and servosNonblocking codeDebugging robot code

Control systems

Control systemsJoystick mappingField-centric mecanum drivePID controlFeedforwardFlywheel velocity controlSystem identificationMotion profilingKalman filterLow-pass filter

Autonomous

AutonomousTimed and encoder movementOdometryLocalization troubleshootingMotion planningReliable autonomous sequencesPure PursuitSensor fusionAuto to TeleOp handoff

Season topics

Season topicsProjectile mathematicsTurret aimingShooting on the move

Code practices

Code practicesNaming conventionsCode organizationLoop timing and bulk readsFormattingComments and documentationTeam collaboration

Libraries

LibrariesNextFTCFTCLibSolversLibPedro PathingRoad RunnerFTC DashboardMercurial v2Mercurial v1PanelsSloth

Community software

Community softwareBlaze FTCOpenLoopHive Vision

Sensors and vision

Vision overviewVision basicsLimelight 3A
Webcams
REV Color Sensor V3
Limit switches
IMU setup
Starter Guide
Engineering
Design
Portfolio
Appearance
Hardware

Webcams

Choose, mount, configure, and test a USB webcam on an FTC robot

Overview

A webcam sends images to the . A vision program can then look for a color, shape, or AprilTag in those images. The camera alone does not tell the where to drive; your code must interpret what it sees.

A webcam sends frames through USB to the Robot Controller, where a vision processor turns image pixels into a result for the OpMode.

Camera selection

For a , choose a USB Video Class (UVC) compatible webcam. lists Logitech C270, C310, and C920 among cameras it has tested and calibrated. Its webcam reference includes supported resolutions, frame rates, and field of view.

Start with a camera your team already owns if it appears on that list. More pixels are not automatically better: a higher resolution can add processing work, and a wider view makes a distant target smaller in the image. Check what your vision task needs before buying or changing cameras.

Mounting

  • Aim it at the part of the field you need to observe. Test that a target stays in view while the robot turns and approaches it.
  • Keep the camera and USB cable firmly attached. A moving camera changes the relationship between image position and robot position.
  • Keep the lens clear of . Avoid placing it where a game piece can hit it.
  • For distance or pose estimates, measure the camera's position and direction relative to the robot after mounting it. Recheck those measurements whenever you move the camera.

For color detection, test under the lighting you expect at an event. For AprilTag pose, also follow the AprilTag guide for camera calibration and coordinate conventions.

Configuration

  1. Connect the webcam to the Control Hub's USB port, or to a supported powered USB hub when your setup needs one.
  2. In the Robot Controller configuration, add the webcam as a USB device and save the configuration. FIRST's external webcam configuration guide shows the screens.
  3. Give it a clear name, such as Webcam 1. Your code must use that exact name when it looks up the camera.

Camera testing

Use a webcam sample included with the SDK or follow the VisionPortal setup guide. Confirm that the preview shows a live image before adding detection logic.

If you see…Check this first
Camera not foundThe USB connection, active robot configuration, and camera name in code
Black or frozen previewAnother OpMode using the camera, USB power, and whether the camera opened successfully
Detection misses a visible targetFocus, exposure, lighting, resolution, and the processor's settings
Slow robot loopCamera resolution and how much work the vision processor does per frame

Change one thing at a time and test again. That makes it easier to tell which change helped.

Next steps

  • Vision basics explains image coordinates and the steps from pixels to a detection.
  • VisionPortal is the SDK's camera and processor framework.
  • EasyOpenCV is a separate option for custom image pipelines.

Sources

  • Configuring an external webcam with a Control Hub
  • Webcams for VisionPortal
  • FTC SDK

Vision troubleshooting

Diagnose camera and detection problems one step at a time

REV Color Sensor V3

Configure the sensor, read its color values, and test a simple decision

On this page

OverviewCamera selectionMountingConfigurationCamera testingNext stepsSources