Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wpi trajectory support #61

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

gnawinganimal
Copy link
Member

Support for WPILib trajectories. Might change later, but this is good for now ™

@gnawinganimal
Copy link
Member Author

gnawinganimal commented Feb 6, 2020

So to use this you would need to make a path follower in your drivetrain.

class Driveytrain : Subsystem("Driveytrain") {
    val follower = follower {
        pose { odometry.getPoseMeters }
        outputVelocity { l, r -> setTargetVelocity(l.m, r.m) }
        trackWidth = 0.0
    }
}

Then you can run a path in a command like this:

doTask {
    val drivetrain = use<Driveytrain>()
    action {
        drivetrain.follower.followPath {
            maxVel = 0.0
            maxAcc = 0.0
            p(0.0, 0.0) ang 0.0
        }
    }
}

@gnawinganimal
Copy link
Member Author

This is wrong I'm going to change it

@mckelveygreg
Copy link
Member

Is this PR still relevant @Jamdan2 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants