Changes between Initial Version and Version 1 of ControlSystems/SoftwareTeam/Training/AdvancedTraining/FRCVision


Ignore:
Timestamp:
Dec 8, 2019, 10:19:04 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/AdvancedTraining/FRCVision

    v1 v1  
     1FRCVision is a software suite that makes it easier to use a Raspberry Pi to offload vision processing tasks from the RoboRIO.
     2Below is the recommended process for vision development:
     3
     4You will need:
     5  * RoboRIO
     6  * 12V DC power source supplied by robot OR
     7     * 12VDC AC adapter rated for at least 1A
     8     * DC barrel jack pigtail
     9     * RoboRIO power connector
     10  * Raspberry Pi 3B or 3B+
     11  * MicroSD Card at least 4GB (16GB is a common size) from a reputable manufacturer
     12  * Laptop with SD reader/writer or a USB reader/writer for uSD cards
     13  * Raspberry Pi Camera or USB webcam
     14  * 5V/2A micro-USB power supply or a micro-USB cable and a USB 3.0 port on your laptop
     15  * 3x Ethernet cables
     16  * Ethernet Switch
     17Helpful:
     18  * USB cable (A-B)
     19
     20* Download FRCVision [https://github.com/wpilibsuite/FRCVision-pi-gen/releases here]
     21* Follow the instructions [http://wpilib.screenstepslive.com/s/currentCS/m/85074/l/1027253-what-you-need-to-get-the-pi-image-running here] to install the FRCVision image on the microSD card
     22* Connect the camera to the Raspberry Pi
     23* Install the uSD card in the Raspberry Pi
     24
     25By Default, the Raspberry Pi requires a wired Ethernet connection; this is because WiFi is not permitted at competitions.  To connect the Pi, the RoboRIO, and your computer for development, it's easiest to connect everything using wired Ethernet and an Ethernet switch:
     26* Connect the Ethernet Switch to your local area network
     27* Connect the Raspberry Pi Ethernet port to the Ethernet Switch
     28* Connect the RoboRIO Ethernet port to the Ethernet Switch
     29* You may need to configure the RoboRIO for DHCP so it will get an IP address from the local area network rather than using its fixed static IP address of 10.25.37.2
     30   * Connect the USB cable from your laptop to the RoboRIO
     31   * Open a web browser and connect to the RoboRIO at 172.22.11.2  (the IP address assigned to the USB connection)
     32   * Select the Ethernet page and under Configure IPv4 Address select "DHCP or Link Local"
     33   * Before competition or when you are done with development, remember to set it back to Static with IP address 10.25.37.2
     34* Power up the Raspberry Pi and allow time for it to boot (may take 30s or longer)
     35* Try connecting to the Raspberry Pi web server at http://frcvision.local
     36  (if this doesn't work, you're going to have to figure out the IP address
     37  the Pi has been assigned and connect to it directly (e.g. http://172.30.1.25).
     38  You can get the IP address by querying your router if you have access or by
     39  or by connecting a monitor to the Pi HDMI port and a keyboard to a Pi USB port
     40  and logging in (username is 'pi' password is 'raspberry') then use the ipconfig -a
     41  command to see the assigned IP address for the Ethernet port.
     42
     43If all went well, you should be able to download code to your RoboRIO and when you launch the driver station, you will have a new camera choice: 'rPi Camera 0' that is streaming video.  The next step is to start writing java code that runs on the roboRIO, does vision processing, and sends processed results (e.g. coordinates of a target) back to the Rio using Network Tables.  Network Table support is included with FRCVision and you can view an extensive set of variables included by default in the Variables tab of the Smart Dashboard.