Problem with PathWeaver

We are trying to run set paths with the prebuilt auton code, and it is dumping code like DifferentialDrive not being updated enough. Should I delete the DriveTrain subsystem and drivewithjoysticks. The only reason I have DriveTrainAuton is I did not want to implement methods into my traditional DriveTrain Subsystem, all I am trying to do is run a preset path, the Code doesn’t have to stay the same but all I want to do is run a preset path.

It seems like you’re creating new instances of your drivetrain all over Robot.java (you’re doing this with RobotContainer as well). Try moving them from teleopInit and teleopPeriodic to robotInit.

Also, I dunno if it’s a good practice or not, but our team puts new subsystem definitions inside RobotContainer.java. This way we can set default commands & add button presses from there. This is the example we followed coding our drivebase this year.

When I have a chance with the robot I will change around the code and stop instatiating it in so many places, but I have since I joined the team in 2017 I always called for Subsystems through Robot IE Robot.driveTrain() and if I needed to call for a command I would use the former OI

That makes sense, RobotContainer is basically this year’s OI.java reutilized. lol best of luck, let me know how it turns out.

Your code structure makes very little sense; you are instantiating many copies of objects that should only be instantiated once (e.g. RobotContainer and your subsystem classes), and doing so haphazardly in different parts of your robot code.

I suggest you look at the command-based example projects for an idea of how to structure your robot program; until you fix that, nothing else will work.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.