Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Vision Tracking Documentation.

Getting started

1. Grab the image:

  • Tinkerboard Image
    • Make sure you use version 2.0.8! v1.8 doesn't work with some USB cameras (nor the Kinect) due to a kernel problem.
  • Raspberry Pi

2. Flash the image onto a microsd card using etcher: https://etcher.io/

  • You will need to grab the .img file from the zip. The .img file is what you give to etcher.
  • After complete, insert the microSD card and startup the coprocessor. It may take a minute or two.

3. SSH into the Coprocessor

  • On Mac/Linux, use ssh username@hostname
  • On Windows, download puTTY and use that.
  • Tinkerboard:
    • Hostname: tinkerboard, Username: linaro, Password: linaro
  • Raspberry Pi:
    • Hostname: raspberrypi, Username: pi, Password: raspberry

4. Run the following command:

  • wget --no-check-certificate -qO - https://github.com/CurtinFRC/2019-DeepSpace/blob/master/vision/bootstrap.sh?raw=1 | bash

5. Your Coprocessor will now restart

6. Run ./gradlew :vision:deploy (./gradlew :vision:deploy -Praspberry for the Raspberry Pi) to deploy your code!

Competition Code

  • Variables are passed over via NetworkTables to the roborio and in turn can be accessed via shuffleboard
  • These Tables are located in the VisionTracking table, and include HatchTracking & TapeTracking

Variables For Tables -

  • The TapeTracking Table Located in TapeProcessing.cpp includes the following entries:

  • Distance, Angle and Target

  • Distance Includes the Distance in meters

  • Angle Provides the Angle in Degrees

  • And Target Gives the X offset in pixles

  • The HatchTracking Table Located in HatchProcessing.cppincludes the following entries:

  • Hatch X offset Which gives the offset from the X axis

  • Hatch Y offset Which gives the offset from the Y axis

  • Distance can be provided as well via the Hatch Distance But is currently unavailable, and realisticly is not requried

  • Both cameras work off of the same process, and can be switched between either Tape Processing/ Tape Tracking or Hatch Processing/ Hatch Tracking, the exposure for both cameras are lowered to extreme mesures while in Tape Tracking mode. While in Hatch Tracking mode the exposure is increased to a normal level. It is recommended that you provide both camera streams to shuffleboard and leave Hatch Tracking mode on while you drive, giving the drivers extra views.

  • To switch which process is wanted at the time, a boolean is given and named _useTape located in ProcessController.cpp on line 19. and is sent via NetworkTabled to the roborio. The default state is true.

Debug Code

  • Normal Debug should be done before all else, but to take out the bulk processing of the code, both Hatch & Tape processing have a debug line in HatchProcessing.cpp/TapeProcessing.cpp on line 67 & 43 which when put in should give a threshold output, This gives info if the program is getting images and processing them correctly.

Possible Code Implementations

  • The Code still technicaly has ball processing which gives an X and Y offset,
  • But it's not tested and is Not really a priority. You will need to provide the code in main, and set up NetworkTables for it. It can be done... But it's not recommended

Imaging

  • In extreme emergencies when all SD cards have been used in one day and you don't have access to ethernet or monitors ect. And you need fresh files, you can get them off of this repo: https://github.com/CJBuchel/CurtinFRC_TinkerBoard_Image or clone link via https://github.com/CJBuchel/CurtinFRC_TinkerBoard_Image.git Follow the instuctions in the git repo discription and copy those files over to the SD card and deploy your code to it. Jank i know, but it's emergency uses only. i swear :)