I have watched countless videos and have gotten the robot to only shift. All it will do is shift forward an inch and move back to the starting position. I have researched this problem and have realized that it could only be going through the first waypoint that my path weaver outputs to WPILIB. If anyone can help I would greatly appreciate it. sorry if the code is somewhat crude, this is only my second year coding in Java.
It looks like your PathweaverTest path has 0s for the x and y tangents. I’ve had issues in the past with loading in paths without any tangent. If that’s the one you’re trying to use, I’d recommend trying it after adding tangents to the waypoints.
The trajectory JSONs (testpath.wpilib.json) should be in the deploy directory, which they seem to be.
I think your issue might be coming not from the path itself but from the way the Ramsete command is set up. Your execute method is constructing a new command every 20ms, not executing it.
To fix that you could extend the RamseteCommand class and override the constructor to create the trajectory. You could also construct the Ramsete command at the beginning in initialize() or the auto command’s constructor, and call ramseteCommand.execute() in your command’s execute method
One other thing I am noticing in your autonomous test command is that you’re never zeroing your robot’s odometry to the start of the path (drive.resetOdometry(path.getInitialPose())) or anywhere else on the field.
Looks to me like in your auto command you creat a new object called command that is tour ramsette command but never call it to excutute that new ramsette command anywhere.
You are creating a command in command. We put our auto routines in sequential and parallel command groups. Create the ramsette command and then add it to the command group. I will post GitHub to our code here shortly