Version 1 (modified by 6 years ago) (diff) | ,
---|
FRCVision is a software suite that makes it easier to use a Raspberry Pi to offload vision processing tasks from the RoboRIO. Below is the recommended process for vision development:
You will need:
- RoboRIO
- 12V DC power source supplied by robot OR
- 12VDC AC adapter rated for at least 1A
- DC barrel jack pigtail
- RoboRIO power connector
- Raspberry Pi 3B or 3B+
- MicroSD Card at least 4GB (16GB is a common size) from a reputable manufacturer
- Laptop with SD reader/writer or a USB reader/writer for uSD cards
- Raspberry Pi Camera or USB webcam
- 5V/2A micro-USB power supply or a micro-USB cable and a USB 3.0 port on your laptop
- 3x Ethernet cables
- Ethernet Switch
Helpful:
- USB cable (A-B)
- Download FRCVision here
- Follow the instructions here to install the FRCVision image on the microSD card
- Connect the camera to the Raspberry Pi
- Install the uSD card in the Raspberry Pi
By 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:
- Connect the Ethernet Switch to your local area network
- Connect the Raspberry Pi Ethernet port to the Ethernet Switch
- Connect the RoboRIO Ethernet port to the Ethernet Switch
- 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
- Connect the USB cable from your laptop to the RoboRIO
- Open a web browser and connect to the RoboRIO at 172.22.11.2 (the IP address assigned to the USB connection)
- Select the Ethernet page and under Configure IPv4 Address select "DHCP or Link Local"
- Before competition or when you are done with development, remember to set it back to Static with IP address 10.25.37.2
- Power up the Raspberry Pi and allow time for it to boot (may take 30s or longer)
- Try connecting to the Raspberry Pi web server at http://frcvision.local (if this doesn't work, you're going to have to figure out the IP address the Pi has been assigned and connect to it directly (e.g. http://172.30.1.25). You can get the IP address by querying your router if you have access or by or by connecting a monitor to the Pi HDMI port and a keyboard to a Pi USB port and logging in (username is 'pi' password is 'raspberry') then use the ipconfig -a command to see the assigned IP address for the Ethernet port.
If 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.