acmerobotics / MeepMeep

8 stars 7 forks source link

Feature Request - Reuse meep meeep TrajectoryActionBuilder code into our code #5

Open rh0dium opened 7 months ago

rh0dium commented 7 months ago

Could you provide an example to allow us to reuse the code from meep to our automous. Currently we are copying and pasting but surely there has to be a better way. The challenge is that your abstraction of bot.getDrive() won't allow us to nicely use this in our own internal auto routines.

Thoughts?

rbrott commented 7 months ago

There are many ways to go about sharing code. One simple approach is a function like

TrajectoryActionBuilder addTrajectorySegment(TrajectoryActionBuilder tab) {
    return tab.splineTo(...); // etc.
}