Changes between Version 4 and Version 5 of ControlSystems/SoftwareTeam/Training/GettingStarted/Targeting


Ignore:
Timestamp:
Dec 1, 2019, 3:20:01 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/Targeting

    v4 v5  
    1 OpenCV allows you to do sophisticated processing of the received frames using various algorithms to filter the images, detect edges, and more.  Unfortunately, image processing is very CPU intensive and the RoboRIO is not really up to the task.  The $435 [https://forums.ni.com/t5/FIRST-Robotics-Competition/roboRIO-Details-and-Specifications/ta-p/3494658?profile.language=en RoboRIO] has a 667MHz dual-core processor with 256MB of RAM.  For comparison, a $40 [https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ Raspberry Pi 3B] has a 1.2GHz quad-core processor with 1GB of RAM or nearly 4x the computing power.  If you try to do much video processing using the RoboRIO, it slows to a crawl and can't perform its other robot-control duties well.
     1[https://first.wpi.edu/FRC/roborio/release/docs/java/ OpenCV] allows you to do sophisticated processing of the received frames using various algorithms to filter the images, detect edges, and more.  Unfortunately, image processing is very CPU intensive and the RoboRIO is not really up to the task.  The $435 [https://forums.ni.com/t5/FIRST-Robotics-Competition/roboRIO-Details-and-Specifications/ta-p/3494658?profile.language=en RoboRIO] has a 667MHz dual-core processor with 256MB of RAM.  For comparison, a $40 [https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ Raspberry Pi 3B] has a 1.2GHz quad-core processor with 1GB of RAM or nearly 4x the computing power.  If you try to do much video processing using the RoboRIO, it slows to a crawl and can't perform its other robot-control duties well.
    22
    33For this reason, 2537, and most other teams, don't do much video processing on the RoboRIO, instead doing video processing on a separate platform (e.g. Raspberry Pi) and send the concise results (e.g. target angle) to the RoboRIO.  Choices for video co-processors include:
     
    77* Off-the-shelf solutions: [https://pixycam.com/ PixyCam] ([https://www.amazon.com/gp/product/B07D1CLYD2 $60]), [https://limelightvision.io/ Limelight 2] ($400), etc.
    88
    9 Each method has its advantages; 2537 has traditionally used a Raspberry Pi running custom C++ OpenCV software because Java adds enough overhead that it significantly reduces processing resolution/framerates.  The system is described in detail [VisionFramework here].
     92537 has traditionally used a Raspberry Pi running custom C++ OpenCV software because Java adds enough overhead that it significantly reduces processing resolution/framerates.  The system is described in detail [VisionFramework here].
     10
     11When using a co-processor, there are multiple ways to send the results back to the RoboRIO including:
     12* [https://wpilib.screenstepslive.com/s/currentCS/m/75361/l/843361-what-is-networktables Network Tables]
     13* PWM
     14* Serial communications
     15
     16
     17To learn more about vision processing, see [https://wpilib.screenstepslive.com/s/currentCS/m/vision/l/682117-strategies-for-vision-programming ScreenStepsLive] and [https://www.youtube.com/watch?v=ZNIlhVzC-4g this video] from the RoboJackets