FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get generated code running untethered

We need help with our set up.

So far, we’ve configured a simple robot in the Schema Editor with two motors and one servo. We can move both motors and the servo in the Schema Editor with the NXT tethered.

We’ve also defined a robot configuration in the Remote Control Editor (right arcade and buttons two and four to control the servo position). We can run the program (Prototype) and control the robot as configured with the NXT tethered.

We generated a VI using the Remote Control Editor and can run it through the Remote Control Editor (FTC Game).

Our problems start when we try to control the robot untethered via the Field Control System and Samantha. We can connect but when we start a match, both motors run immediately. Curiously one motor stops when we press button 7 and the other when we press button 8! We haven’t modified the generated code and the code looks completely correct. (We’ve been using Labview for FTC and FRC for three years.)

Does anyone have any suggestions on why the generated code is not executing properly? We updated the firmware on the NXT and have the latest versions of Labview and the FTC tool kit.

Thanks.

0 Kudos
Message 1 of 4
(3,972 Views)

It is very hard to troubleshoot without seeing the code, sounds like you are taking the right steps.  One intermediate step you could try is connecting untethered to your robot from the LabVIEW robot project using the Samantha then running your VI from FTC Game in remote control.  This could eliminate the FCS as the possible cause.

-Steve

Mentor

Team 4150

Message 2 of 4
(2,902 Views)

It seems to me the most likely problem is that the FCS is not running the correct Teleop program. Could there be another one on the brick? To ensure that the FCS is running the right program, run the ProgramChooser program. It is very likely already on the brick. When you run it, it will show you a list of all the programs available, and allow you to choose the one that you want to FCS to run when it gets to Teleop mode.

Tony

Message 3 of 4
(2,902 Views)

Hi,

Thanks to Steve_Brooks and imaqmonkey for your suggestions.

Yesterday I was tied up at work all day and couldn't get back to the problem until this morning. I checked and there was only one Teleop program on the NXT and I had selected it with the ProgramChooser. Next, I ran the remote control untethered. I couldn't connect to the NXT using the router unless I used the FCS. But I could direct connect through WiFi between my laptop and the NXT. Using the FTC Game option, I generated a new program and downloaded it which ran correctly. At that point I thought there was a problem with the FCS. But when I used the FCS again today, I couldn't reproduce the problem. Very frustrating but at least everything is working as expected and we can get started adding our programming enhancements.

I'm not sure what happened Wednesday. Either turning everything off, swapping out the batteries and restarting resolved the problem. Or, maybe there was an issue with how we were compiling and deploying the program from within Labview though I can't think of what that would be. Anyway, we're working and thanks again for your help.

0 Kudos
Message 4 of 4
(2,902 Views)