With the release of the new Command Based library, and the rewrite of key classes, I have become confused on where to place the NetworkTables to call Limelight values. I started by first trying to place all calls into the RobotContainer class under the RobotContainer constructer, but the only thing sent to my smart dashboard was the limelight camera feed, no NeworkTables values like tx were being read.
You want to poll it somewhere where it will be called repeatedly. I recommend putting it in a subsystem, either drivetrain or its own.
Thank you!! Should it be under something such as a limelightPeriodic() method? Do you think it would be beneficial to then put any actions i want to do with the limelight under a command class?
Well what are you doing with it? Is it only tracking and running the drivebase?
Basically just locking onto a target and turning towards it
Then you really only need to get the table entries periodically in one command. My team created a command for this
Please also make sure you only use the leds during tracking.
Thank you so much!
Where would you have put it in the old command framework?
The new framework has a mechanism to do this fairly simply. You can create a Vision subsystem, and subsystems themselves have their own periodic methods that are called. Put all your Limelight processing into that subsystem and publish the Network Tables results on the periodic method from the Subsytem and you should be good to go.
Thank you!
Last year my team did everything with the limelight straight in the Robot Class
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.