No announcement yet.

Stopping Vuforia to improve loop time

  • Filter
  • Time
  • Show
Clear All
new posts

  • Stopping Vuforia to improve loop time

    Iterative opmode. Still on SDK 6.0... same old non-software mentor.

    The kids modified the TFOD recognition example for use their autonomous ring stack identification. And their approach runs entirely in start(). And the end of start() there is a tfod.shutdown().

    But looptimes in autonomous vs teleop strongly suggest vuforia itself is still running, even if tensor flow object detection isn't. And I'd like for them to be able to improve their loop times, since they don't use any of the vision targets on the walls for navigation.

    But the vuforia close() and deactivate() methods do not seem to be public, or they otherwise cannot invoke vuforia.close() or vuforia.deactivate().

    Am I off in the weeds here? Or is this something that should be possible?

    thanks in advance

    Coach Z

  • #2




    • #3
      I don't know whether this will improve your loop time, but here is a way that you can access the close() method of VuforiaLocalizerImpl:

      public class VuforiaLocalizerImplEnhanced extends VuforiaLocalizerImpl {
          public VuforiaLocalizerImplEnhanced(Parameters parameters){ super(parameters); }
          public void close(){ super.close(); }


      • #4
        Accidently posted the above before it was finished. Rather than using Classfactory to get a VuforiaLocalizerImpl object, you can just use the constructor to get a VuforiaLocalizerImplEnhanced object. It has been a long time since we used this class, and our reason for trying it wasn't to improve loop time. We were using a static field to hold our VuforiaLocalizer object and wanted to make sure it was shut down at the end of our op mode. We ultimately decided that this was a fix to a nonexistent problem.