amhsrobotics4681 / 2020-First-Rise

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

Autonomous Period #4

Open sprice134 opened 4 years ago

sprice134 commented 4 years ago
Screen Shot 2020-01-22 at 7 06 14 PM

Our Robot will stat somewhere on the initiation line. Rules state

Which by my understanding means that we can position it wherever we want and at whatever angle we want so long as we maintain the proper order. The Initiation Line is 10 feet from the wall which ideally we will be able to shoot from. By this, we can line the robot best we can before booting up. And once the autonomous period starts, to auto-line up whatever corrective angle we need. After lining up, and shooting (which will gain us somewhere between 12 and 18 points) then all we need to do is move off of the initiation line to gain the 5 points. Arguably it would be best to just move enough to get off the line and not attempt to navigate the field (to not incite tech foul of 15 points or potentially harming alliance robot) We can build two functions one to move forward and one to move back just enough to get off the line and then sit and wait until autonomous is over (only a couple seconds) and then resume play in teleop. limited movement would be ideal in autonomous

cmarley3-14 commented 4 years ago

So then after we auto-align the angle, we either vary distance to the goal (drive forward/backward), shooting power, or shooting angle?

(which will gain us somewhere between 12 and 18 points)

Very optimistic. Realistically, 0 to 18. :wink: 😋

Team preference should be lining up to the left of the power port, and backing up (easy coding!) after auto. We steal the balls off the blue rendezvous barrier or our trench. Then... skill, practice, and luck.

sprice134 commented 4 years ago

We do not actually need an encoder to modify the angle. If we mount the camera to the targeting system such that when the targeting system angles, the camera moves with it, a simple position will tell us if we are lined up or not. I agree about the gyro/accel that we "need" it but we don't need it for this. Lining up would be done by vision tracking not angle relative to the field and all we need to get the points for moving off of the initiation line is to no longer be in contact with it. That doesn't actually mean a controlled movement. Send current to the motor for 2 seconds and poof we met the requirement.

And come on, if we are being realistic, it is 5-18 points. If we aren't even getting the points for moving off of the line, we didn't do our job properly.

Also, our location in regards to the left middle or right with an alliance is entirely random. We could tell the referee beforehand that we had to be on the one side, but after a couple of matches I see the referee getting mighty displeased

amhsrobotics4681 commented 4 years ago

When we get the time (i.e. friday or saturday)

Add/Change in BallSystem.java

public void ballSystemInit() {
    currentlyShooting = true; // for autonomous purposes --> see Robot.java changes
}

public boolean currentlyShooting() {
    return currentlyShooting;
}

// if we have variable shooting power, this is a modification we can make
public void resetShooter(int distance) {
    double power = FUNCTION(distance); // need to create function to determine this
    m_shooter.set(power);
}

Add/Change in Robot.java

@Override
public void autonomousPeriodic() {
    // align function
    if (aligned)
        m_ball.resetShooter();
    if (!m_ball.currentlyShooting() && getDistance < 180)
        m_drive.arcadeDrive(-1,0); // drive backwards 5 feet ^^^
    m_ball.mainMethod();
}
// Add stuff with the LIDAR sensor
// Also put new DIO in constants for this

Add/Change in Wheel.java

public void rotationControl() {
    if (!status.equals("Rotation")) {// so we don't reset during rotation control

^^^ Between lines 44 and 45

cmarley3-14 commented 4 years ago

Eric and Ben suggest doing an align toggle (which I agree with) (or course, this won't be necessary if we can't vision align...) (just part of an ongoing to do list)