FRC 2013 Double Tracking
Anonymous from Canada  [3 posts]
4 years
Hi, I was wondering if I could track two different goals at two different times. For example, if I wanted to track the high goal for a certain amount of time and then I want to switch to tracking the pyramid goal. How would I do that?

Steven Gentner from United States  [1370 posts] 4 years
Assuming you have two techniques where one detects the target and the other the pyramid, you can trigger the detection of those by surrounding each technique with the IF_statement module and based the execution of the included code on a variable. This variable can then be one sent via NetworkTables to turn "on" or "off" a section of the analysis.

For an example, see the attached. Note that you'd need to send


with a value of 1 or 2 from either the SmartDashboard or the CRio. (Note that you can change the /SmartDashboard/" to whatever you want as long as you use it in your code too.)

Note that you will have to change the IP address in the NT module ... wait a bit after you do for things to  connect.

Alternatively if you don't have the CRio around you can use the TableViewer.jar with no hostname to setup a local NT repository which you can use to test this.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index