Command Based Pathweaver

Hello!

We got Pathweaver working on a test project. But I’ve been unable to find any examples of using the Pathweaver trajectory with other robot commands like arm up, or intake to make a fully functioning autonomous. I’ve been looking, but I’m just unable to find anything. Is it easier than I’m realizing?

Thanks in advance!

You can combine your trajectory command with other commands using command groups

Lots of teams split up their trajectories into multiple parts and then run them one after another with different commands going for each section

See also: this thread

1 Like

More than anything I would suggest to become sufficient at search GitHub for code related to what you want to do. The main way to do this is to 1) login, 2) search for terms specific to your task, e.g. “import edu.wpi.first.math.trajectory.Trajectory;” might lead to auto routines, 3) change to looking in code by clicking code, 4) filter for language or other ways.

Here is one of our autos https://github.com/frc1108/SAM2022/blob/trunk/src/main/java/frc/robot/commands/auto/FourBallShort.java

It is a sequential command group with some parallel static factory methods.

3 Likes

What specifically are you trying to do? Our current 5ball auto is a sequential command group containing parallel deadline groups of ramesete command and run intake so that it runs the intake while we are following a path. We run start shooter with timeout after we have picked up balls. At one point we create another parallel deadline group to follow a path backwards and run out ball run. To finish loading the balls with a timeout and the. Reverse it to pull the balls away from shooter.

Command groups will be your friend here. We have learned this year to keep commands basic and group those commands to do more comped things.

1 Like

Thankfully with all of the resources and advice, we did get our path trajectory running and running multiple paths in a sequence. :slight_smile: thank you!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.