My team is planning on implementing path weaver into our robot this year but are quite stumped. I’ve found this example but I’m not sure how I can implement a mechanism moving with it. So say if we had our shooter, the robot will follow the path and then shoot. How would I go about that?
Make the paths, or group of paths, that you want to run before shooting a command, then make a shooting command. Then schedule the commands first with the paths, then shooting. Then add anything you want to happen after the shooting as another command.
See SequentialCommandGroup here for more info.
Your “path(s)” command would have a finished condition of completing all of the time steps for the path(s).
WPILib has a step by step tutorial available.
Thanks! I didn’t think of command groups… I was looking at the WPILIB example and forgot they put their commands straight into the robot container which I don’t do. Thanks for the info!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.