(Java) Public xSpeed & ySpeed?

Hello!
Our programming TEAM has been having trouble with creating commands for Pathplanner to follow it’s paths.
To be more specific, we are having trouble making functions that can return chassis speed and set chassis speed, as needed with the pathplanner follow code:

We found the Chassis speed documentation and understand how to implement it, however, we cannot use our xSpeed, ySpeed, and rotation variables outside of our main drive command.

We have a function called “getChassisSpeed,” however, it returns nothing, as we can’t use our speed variables, which are created with our drive command.
(At the top of this screenshot)

How can we create a function to return and set chassis speed for pathplanner following?

1 Like

just initialize the speed variables outside of the drive command so you can use it for other things

1 Like

No idea why I didn’t think of this, thanks /:
Created a new variable in constants.java, and set that variable equal to x/y/rot delivered