Hey there! My team is using pathweaver to build trajectories. It’s works pretty and nice when we just need to run a path, however, we want stop the robot to shoot cargos and then continue the autonomous routine. We have tried to set this:
public class AutonomousTrajectoryBuilder extends SequentialCommandGroup {
public AutonomousTrajectoryBuilder(Intake intake, Buffer buffer, Shooter shooter, TrajectoryBuilder trajectoryBuilder) {
super.addCommands(
//doesn't work two run() methods on a SequentialCommandGroup
trajectoryBuilder.run("reverse"),
new ShootAutonomous(3, intake, buffer, shooter),
trajectoryBuilder.run("straight")
//the parameter in method run() is the name of the pathweaver .json
);
}
}
But, when we run it, “reverse” path goes for a second straight and then go reverse. The “straight” goes a second reverse and then go straight". It works but it is not accurate. Looks like an error on odometry, but it didn’t find out.
Here is the class TrajectoryBuilder, which has all the logic to build our pathweaver trajectory.
If someone help me to set multiple pathweaver paths on SequentialCommandGroup I would be pleasureeee