amhsrobotics4681 / 2020-First-Rise

File Repoitory for 2020 First Robotics 4681 Team
1 stars 0 forks source link

Limelight #10

Open sprice134 opened 4 years ago

sprice134 commented 4 years ago

DOCUMENTATION https://docs.limelightvision.io/en/latest/getting_started.html USEFUL SAMPLE CODE https://docs.limelightvision.io/en/latest/cs_drive_to_goal_2019.html

cmarley3-14 commented 4 years ago

will need to sort out controller buttons for pipelines, or something to switch where necessary. honestly, just point a camera at the floor and drive. NetworkTableInstance.getDefault().getTable("limelight").getEntry("pipeline").setNumber(<value>);

sprice134 commented 4 years ago

https://docs.limelightvision.io/en/latest/crosshair_calibration.html For dual crosshair to allow us to go from any range of values. A of the crosshair is at 8 feet (10 with a 2 feet margin of error) and B of the crosshair is at the back of the no contact zone. The robot will line up rotationally, get a distance to calculate the angle, and as long as we have a Y-axis that exists in between point A and Point B, we will be lined up and can shoot

sprice134 commented 4 years ago

Also, for the veneno code, we also don't need to neccesarily do: if (autoTimer > 670) { if (m_gyro.getAngle() > 20) { // will use limelight target exists boolean m_drive.arcadeDrive(1.0, 0); } else { Update_Limelight_Tracking(); // need to tune above gyro code : check drift } if (!aligning) m_ball.resetShooter(); Since we are doing proportion controlled driving, the farther off we are the faster we will turn We can just set it that if tv == 0, turn at 1, otherwise align the way it already does