Skip to content

Program Drivetrain subsystem autonomous related code #3

@moreheadm

Description

@moreheadm

In addition to the methods and function mentioned in Issue 1, one or two members should work on adding some basic code to the Drivetrain class for autonomous related functions. Methods needed include:

driveDistance(double inches)
driveTime(double seconds) // this one is not as important
turnLeft(double degrees)
turnRight(double degrees)

The turnLeft and turnRight methods will require a gyro (which measures turning angle), and driveDistance will require an encoder (which measures shaft rotation). We have a gyro and encoders on last year's robot. However, the gyro is not very good, and one of the encoders is broken. Therefore, I would recommend buying new encoders and a new gyro.

For a gyro, I would recommend the Pigeon IMU (the only other option is the NavX, but it is more expensive). However, since we already have an inferior but working gyro, we can use that for testing.

For encoders, we already have one working E4T encoder, so one option would be to buy another. However, last year, the E4T that we used broke. The SRX magnetic encoders are more sturdy and known to be slightly more accurate. They also sell replaceable cases, so you can replace the case instead of the whole thing if the case breaks, so they might be cheaper/easier in the long run. However, they may be slightly harder to mount to the gearbox we have (which are the EVO shifters from Andymark); there should be instructions on this somewhere. Contact me if you have questions about this.

Note that the SRX magnetic encoder is also available from Andymark, and the Pigeon IMU and the SRX magnetic encoder are also available from Cross the Road Electronics. Also, you will also have to buy breakouts if you buy the magnetic encoders.

I want to stress: it is the responsibility of the programming team to make sure the items they need get ordered. Also, the programming team will also have to be able to figure out some mechanical things (like which sensors can be mounted easily). Don't just shore these responsibilities off to people from other teams; make sure they happen. I would highly recommend having one or two people (separate from the one or two people working on the programming) assigned to thinking about the considerations above, doing some research, potentially talking to Jason and people from other teams, figuring out which sensors we will get, and making sure they get purchased.

Any relevant questions and discussions should be included here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions