Problems Changing the Limelight Pipeline Programmatically.

Hi, we are using limelight this year to target both the vision targets on the switch and the yellow power cubes.

However, we are experiencing a problem switching between different pipelines. Below is the code (Java) we are using in a Limelight Subsystem. We create an instance of the limelight subsystem and have a method to set the Pipeline Number.

private static  NetworkTable table;
table = NetworkTableInstance.getDefault().getTable("limelight");

public void setPipeline(int pipeline) {
		NetworkTableEntry pipelineEntry = table.getEntry("pipeline");

The method above is called in autonomousInit() to set the pipeline to the desired pipeline. When we run the code, we see no effect (the pipeline is not changed). However, when we change the pipeline in the web interface, we see the pipeline change and the desired target is found.

We are running the same code for changing the camMode (“pipeline” is replaced by “camMode”) and this code works fine.

Has anyone else experienced this problem? Are we doing something wrong in changing the pipeline?

We just had a problem with NetworkTables that might be related (was not limelight). We used OutlineViewer to change a variable in our vision server, and it worked exactly as expected. When we tried to have the RoboRio Java code do it, nothing happened.

The full path of the variable was “/SmartDashboard/vision/active_mode”. However, because we coded the path in Java slightly incorrectly (an extra “/” at the start), the Java was actually writing to “/vision/active_mode”.

Not sure how to do it, but try to check the exact, full path of the variable you are setting in Java.

Do you have the web interface open while you are attempting to run your autonomous? Make sure to uncheck the “Ignore NetworkTables pipeline index” checkbox on the web interface if so. Let me know if this helps.


Thanks for your help PRensing and Brandon_Hjelstrom!

We were able to fix the problem. Everything works fine upon initially turning the robot on. However, after code has been pushed without a power cycle, problems begin to occur. After power cycling, everything seems to work again. We are updating the Network Tables properly within our code, although under certain conditions we believe Limelight is unable to see this change. ShuffleBoard reflects these Network Table changes that we make in code, but Limelight is only able to see them after a power cycle. It is, however, interesting that CamMode and LedMode seem to update fine. The Network Tables update fine and the Limelight reflects the new state of these variables with no power cycle necessary.