Hey guys,
So I was reading the wpilib documentation on the initialize() method within a command and it stated that the initialize() method will run “immediately before the command is executed for the first time and every subsequent time it is started”. Now when we tested with our robot, it seemed like the initialize() method would only run when the class was instantiated and not every time the command was started. Could anyone please tell me if the initialize() method is supposed to run every time the command is started or is it acting as it should.
Thanks
It should be running every time the command is started - and definitely NOT immediately upon object instantiation. If you post some code and describe your observations in more detail, perhaps we can help to identify the problem.
Thanks for the reply. So we’re actually going to re-write the code for our robot and if we continue to have the same problem I’ll be sure to post here again. Thanks for your help.