Skip to content

Latest commit

 

History

History
107 lines (82 loc) · 4.29 KB

README.md

File metadata and controls

107 lines (82 loc) · 4.29 KB

Team 2393 FRC Season 2023

Events, https://frc-events.firstinspires.org/2023/Events/EventList:

RoboRIO2

WPILib documentation describes how to flash the micro-SD card on a laptop. Next, connect the RoboRIO via USB and use the roboRIO Imaging Tool go to Edit Startup Settings, fill out the Team Number box and hit Apply. This failed on the first attempt, and simply worked the second time around.

Profiling

'VisualVM', available from https://visualvm.github.io, allows you to see how much CPU and memory the code is using on the RoboRIO, and where it spends its time.

Assuming you unpacked it to \Users\Public\wpilib, start it from a command prompt to pass the JDK location like this:

cd \Users\Public\wpilib\visualvm\bin
visualvm --jdkhome \Users\Public\wpilib\2022\jdk

In build.gradle, this addition to the FRCJavaArtifact section allows VisualVM to access the JVM running on the robot:

frcJava(getArtifactTypeClass('FRCJavaArtifact')) {
    // Enable VisualVM connection
    jvmArgs.add("-Dcom.sun.management.jmxremote=true")
    jvmArgs.add("-Dcom.sun.management.jmxremote.port=1198")
    jvmArgs.add("-Dcom.sun.management.jmxremote.local.only=false")
    jvmArgs.add("-Dcom.sun.management.jmxremote.ssl=false")
    jvmArgs.add("-Dcom.sun.management.jmxremote.authenticate=false")
    jvmArgs.add("-Djava.rmi.server.hostname=10.23.93.2")     
}

To connect to the program running on the robot:

  • File, Add JMX Connection
  • 'Connection:' 172.22.11.2:1198 respectively 10.23.93.2:1198
  • Check 'Do not require SSL connection'
  • A new entry with a 'pid' should appear under the 'Remote' list. Double-click, then check 'Monitor', 'Sample.. CPU' etc.

Camera Calibration

The AprilTagPoseEstimator needs "focal lengths" and "center" values.

To get them via PhotonVision:

Limelight

Initially, access as http://limelight.local:5801/

"Front" Camera: Set team 2393. Set IP address to static, 10.23.93.11, allowing access as http://10.23.93.11:5801/, and change name to "limelight-front".

Example pipelines are in camera folder: Pipeline 0: Tags (and make that the default)

Initial adjustments of exposure and gain had no effect until toggling the "limelight-front/camMode" entry to 1 and back to 0?!