Robot not moving during pathweaver auton routine in Simulation

I haven’t found anyone with this exact problem yet so I’ll try to be as specific as I can, this is the link to my code: GitHub - Wing57/Immo

I created a set of paths using pathweaver that were then put in the output folder of my deploy thing under src/main for my project. I created a sequential command group autonomous command which just ran paths1-4 in succesion however when I press autonomous it does not do anything at all.

It will reset its position so that it starts exactly where I told it to start with the initial trajectory but afterwards it will not move. This at the very least tells me that resetOdometry() works but I have also tested all the other odometry features, encoder/gyro readings and confirmed that everything is correct.

If anybody has faced similar issues or has any ideas as to what could be causing this please share, I’ll take anything atp

I have faced the exact same issue. I have a hacky way to solve it.

Fix 1:
For me, if I click autonomous in glass, the robot resets the position but doesn’t do anything else. If I click teleoperated, and then auto… It works.

Fix 2:
I added a “.with interrupt behavior(Command.interruptBehavior.kCancelIncoming)” to the end of the autonomous command.

Some how this works, but I think it’s hacky.

I logged the drivetrain subsystem current command and it seems stuck in default command.

I see that its also stuck in default command which I assume is related to the issue.

Where would I add this in my code? I dont see the option for withinterruptbehavior and all that stuff that follows

Line 50 in robot container, I think

Yeah i think its there, how were you able to put Command.interruptBehavior.kCancelIncoming? I dont see any options after Command.

Sorry if these questions seem dumb

not dumb at all… you mispelled the command:

…I also led you astray a little.

Screenshot (1432)

Do you think it only works with pathplanner? Honestly I was getting ready to try and switch over anyways…

oh, hmmm this is awkward… this may be 2023 behavior. Im lost what to suggest next.

Its ok im thankful that you even helped this much, for now it seems like I’ll try using pathplanner or maybe even porting this code into 2023 wpilib since I only imported the code for our regional robot into 2023 and this was still being done with the 2022 framework.

my code is running pathplanner fyi with the same issue here.

Interrupt behavior is part of 2023.

This bug being in both 2022 and 2023 is rather suspicious, due to the post-2022 InterruptBehavior refactor.
However, I’m a bit surprised that these reports are popping up only now, if this bug has been there for a while.

I’ll investigate. If anyone already has a minimal reproducing sample, or has already debugged and narrowed it down, let me know.

I’ve investigated the issue you faced, the auto command was interrupted by a command triggered by exiting disabled (once that command ended, the default command was correctly scheduled).
This doesn’t look to be the case with OP, now investigating.

The commands work properly in OP’s code.

The cause of the issue they encountered is CANSparkMax.get() not returning values that were set by methods other than set(double) – this is a known bug in 2022 REVLib.

1 Like

Is there a known fix or is it taken care of it in 2023?

1 Like

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