/peariscope

Computer vision project for FIRST Robotics Team #5414 Pearadox.

Primary LanguagePythonMIT LicenseMIT

Peariscope

Peariscope is a computer vision project for FIRST Robotics Team #5414 Pearadox that implements robotic pearception to assist with robot navigation and manipulation.

Hardware

The Peariscope hardware consists of a Raspberry Pi with a MicroSD memory card, a plastic case, a camera module (with a case and flex cable), a LED ring light, a level shifter chip, and a power supply.

Example hardware and circuit diagram can be seen here: Peariscope Hardware

Operating System

The Peariscope runs on a Raspberry Pi using the FRC Raspberry Pi image.

FRC Raspberry Pi documentation is available here: FRC Raspbery Pi

The pre-built FRC Raspberry Pi image is available here: FRC Raspberry Pi Image

Getting Started

  1. Download FRCVision_image-2019.3.1.zip and use Etcher to image a MicroSD card.
    The MicroSD card needs to be at least 4 GB.
  2. Put the MicroSD card in the Pi and apply power.
    The initial boot may take as long as a minute, but later boots will be much faster (20 seconds or less).
  3. Connect the Pi Ethernet to a LAN.

Connecting to the Pi

If the Pi is plugged into the robot radio, we can connect to http://frcvision.local/ using a web browser. Otherwise, we can connect to the IP address of the Pi. Note the Pi boots up read-only by default, so it's necessary to click the "writable" button to make changes.

We can also use PuTTY to login to the Pi via SSH.

  • The login id is: pi
  • The password is: raspberry
  • The Pi boots up read-only by default, so it's necessary to use the rw command to be able to make changes.
  • The ro command sets the Pi back to read-only mode, to protect its memory card from damage during power loss.

Software

The Peariscope software is based on the FRC Vision Example that performs simple streaming of multiple cameras and camera switching. The Peariscope software also holds a custom computer vision algorithm that can be modified, depending on the needs of the team.

The Peariscope computer vision software uses robotpy-score from the RobotPy project.

Illumination

The Peariscope ring light has 16 individually controllable LEDs.

From the /home/pi/peariscope/src folder:
sudo ./ringlight_on.py enables all the lights to a specified color.
sudo ./ringlight_off.py disables all the lights (sets them to black).