the commands that i use in my robot does not finish, so i have use this combination of sequential and parallel command groups with a waitcommand in the middle.
i dont have access to my robot now, so i cannot test on my robot
return new SequentialCommandGroup(
new InstantCommand(() -> swerveSubsystem.resetOdometry(trajectory1.getInitialPose())),
new ParallelCommandGroup(
new MoveArmCmd(ArmSubsystem,-19.8),
new SequentialCommandGroup(
new WaitCommand(1.5),
new ParallelCommandGroup(
esquentarShooter,
new SequentialCommandGroup(
new WaitCommand(2),
new ParallelCommandGroup(
lancar,
new WaitCommand(2),
new ParallelCommandGroup(
parar,
new MoveArmCmd(ArmSubsystem,0))))))));/*