-
Notifications
You must be signed in to change notification settings - Fork 0
Auton Documentation
Limelight Interface IP Address
NOTE: In order to use the 3D feature, the resolution must be set to 960x720p. *
- Hue: 60 - 85
- Saturation: 70 - 255
- Value: 70 - 255
- Area: 0.0018 - 100
- 10 - 100
- 0.00 - 200
- Erosion Steps: 0
- Dilation Steps: 0
The PID control drive is set up to read the horizontal target angle (tx) value to calculate the speed of the motors using a PID.
The target area (ta) value is used to determine distance based on the area percentage the target fills on the screen
During auton, this command is used to move the robot into scoring/intake position at the load station, rocket, and cargo ship.
In order to read the horizontal target angle (tx) and the target area (ta) values from Network Tables, the entry must be recieved in the code.
Example:
double ta = NetworkTableInstance.getDefault().getTable("limelight").getEntry("ta").getDouble(0);
double tx = NetworkTableInstance.getDefault().getTable("limelight").getEntry("tx").getDouble(0);
In order to read the new 3D values from Networktables:
- Create a double array with 6 elements
- Set the array equal to the values from NetworkTables ```java NetworkTableInstance.getDefault().getTable("limelight").getEntry("camtran").getDoubleArray(limelightValues); ```
- Set the robot up in the ideal scoring position
- Turn on the limelight
- You May have to move the robot straight back until it sees the full target
- Go to the output tab on the limelight interface, and select the “offset X” option
- After you have done this, exit the output tab
- NOTE: do not select this option again if the limelight does not see a target as it will reset the offset
- If the robot slows down in the middle of the curve, lower the acceleration
- Turn right is a positive Y, or angle value
- Turn left is a negative Y, or angle value
- 2o Milliseconds time step causes the robot to react differently to max velocity, acceleration, and jerk values
- Be advised, running multiple trajectories (one after the other) could cause:
- The robot to take off forward at full speed (1.0 power)
- To fix this, we reset the encoders multiple times (before the command starts and after it ends)
- The robot to take off forward at full speed (1.0 power)
- Be advised, running multiple trajectories (one after the other) could cause:
- Right Load to Right Rocket Far Hatch:
- Horizontal: 243.84 feet
- Vertical: 9.19
- Total Distance: 244.01 in
- Right Load to Right Rocket Near Hatch:
- Horizontal: 214.57 in
- Vertical: 9.19 in
- Total Distance: 214.77
- Right Load to Right Rocket Center Cargo:
- Horizontal: 229.13 in
- Vertical: 0 in
- Total Distance: 229.13 in
- Building a Trajectory file from Jaci Nonsense's pathfinder requires the following:
NOTE: these values will only be updated if the variables are being set periodically to the values in Network Tables.
In order to offset the limelight calculations to adjust for the left/right offset of the camera on the robot:
The "tl" value in NetworkTables, is the latency of the limelight camera. This value can be used to check to see if the limelight is posting values to NetworkTables. The value will be constantly changing in the event values are being posted to NetworkTables