Hello CDChief Delphi, long time lurker, first time poster. I amAndyMark currently working with YAGSL, Pathplanner, & LimelightLib to generate on the fly trajectories to april tags. Currently I amAndyMark attempting to make a path from the robot’s current pose to an arbitrary position 1m forward and 1m to the left (this would be substituted in for the limelights offsets). Right now the robot is starting with its current pose, but its always attempting to go to the 1m offset from the robots zero zero power on position. Is there a simple function I amAndyMark just not using? Any help would be greatly appreciated. Code Snippets Below:
Robot Container:
new JoystickButton(driverXbox, 7).onTrue(Autos.exampleAuto(drivebase));
Autos.exampleAuto:
public static CommandBase exampleAuto(SwerveSubsystem swerve)
{
System.out.println((swerve.getPose()).getX());
System.out.println((swerve.getPose()).getY());
PathPlannerTrajectory path;
path = PathPlanner.generatePath(
new PathConstraints(4, 3),
PathPoint.fromCurrentHolonomicState(swerve.getPose(),swerve.getRobotVelocity()),
new PathPoint(newTranslation2d(1,1),Rotation2d.fromDegrees(0),Rotation2d.fromDegrees(0))
);
return Commands.sequence(new FollowTrajectory(swerve, path, false));
}
Any help would be greatly appreciated, I amAndyMark not sure If I amAndyMark going about implementing this the “correct” way. I saw YAGSL had a driveToLimelight function built in but I amAndyMark not sure if that is nicely compatible with LimelightLib
Full Github Repo: Here