![]() |
Problem Loading Java Code
I'm experimenting with Java as a potential platform for programming in '10, but I've run into a block. Here's where I got:
Re-imaged my cRIO - however during re-imaging I just realized that I did NOT check “Format Controller” - anyone know if this is potentially the source of my problems? Tried to load code. What happens when I load code is that it goes through the first few dozen steps, then gets to "rebooting your cRIO" and seems to get stuck (I've left it for 20+ minutes, came back, found no difference). The "Getting Started With Java" pdf doesn't really give any troubleshooting - it just says press the run button to load code. Any ideas? (Yes I will be following several other routes to get this fixed including contacting a local beta team; I wanted to get this post out there to see what came up.) |
Re: Problem Loading Java Code
I did the same thing. Re-run the new imaging tool and select Fromat controller.
The other issue I had was that I needed to set the team number in netbeans. You can find it in the Tools>Options>Misc.>FRC tab. I still haven't gotten the debugger working, but I have our 2009 ported to Java and running perfectly on our old robot. |
Re: Problem Loading Java Code
When you say you did the same thing - do you mean that you had the same problem and that selecting "Format Controller" fixed it?
-P |
Re: Problem Loading Java Code
Quote:
|
Re: Problem Loading Java Code
Thanks, awesome, I'll definitely do that then. It was my next step. Shame I couldn't get Chief Delphi and be on site at the same time =(.
|
Re: Problem Loading Java Code
Does any one know if their is a place to download the 2009 Crio Imaging tool?( I Am not sure where our teams copy of the 2009 software CD's are). Any help would be appropriated!
|
Re: Problem Loading Java Code
Quote:
|
Re: Problem Loading Java Code
According to the Getting Started With Java pdf you need the old software
"Choose a Windows installation that has the 2009 FRC Software already installed on it. If you do not have one, then follow the instructions from last year’s set of DVDs to create one." I personally do not care if I have the old software installed or not just as long as I can Image the Crio for Java. |
Re: Problem Loading Java Code
We have also been running into errors when we try to load code onto the cRIO. We have made attempts on two different platforms, both of which have resulted in error.
On a mac, we run through rebooting and to the point where the cRIO is starting up again but the deployment hangs indefinitely on the line "in static method #3 of com.sun.squawk.VM(bci=6)". Additionally, on a windows computer, we do not make it to the point in which the code is downloaded. Here are the last few lines before the error: Quote:
On a side note, we are fairly sure we have reimaged the cRIO correctly as we have done it multiple times with the format controller button selected. Also, someone previously mentioned that they had forgotten to set their team number in tools/options/frc configuration, but we have done so correctly. |
Re: Problem Loading Java Code
Quote:
Is it set to Java Technology? What firewall(s) are you using? Can you try with them disabled? |
Re: Problem Loading Java Code
Quote:
As far as the firewalls go, I know that on the Windows computer (the one that did not make it as far as the mac in the code deployment), we were asked by XP during one of the deployment attempts to verify that we wanted netbeans to have permission to do whatever it was doing at the time. We said to allow netbeans to continue. |
Re: Problem Loading Java Code
Quote:
|
Re: Problem Loading Java Code
Firewall issues can definitely affect code downloading on both Mac and Windows. The SDK uses a Java-based ftp client that most firewalls don't know about. It may be possible to set up a firewall permission for the Java.exe application.
|
Re: Problem Loading Java Code
New update:
Of note: though I disabled WatchDog in the code, it still says "System: Watchdog" below the team number. I'm starting to get pretty stumped. EDIT: It also tells me when I'm loading code: [cRIO] Information: No user-supplied RobotMain() Is this possibly a problem? OK so, now I have a slightly different problem: I fixed the aforementioned issue (thanks to all who confirmed that that's what it was) and have (as far as I know) successfully loaded code onto the robot. However, there's a minor issue: nothing happens. I'm still working on troubleshooting this issue, and I'm not by any means tapped out, but if anyone has any suggestions, I would very much appreciate them. A few facts: 1. I have communication established between robot and DS. 2. The code is supposed to be tank-drive - I essentially copied the code in the doc. 3. Nothing happens when I activate the joysticks. EDIT: One problem was that I had two projects running. One was blank and selected as the main project; the other had the code in it and was NOT selected as the main project. However fixing this did NOT solve the problem (frowny face). Here's my code: Code:
/*----------------------------------------------------------------------------*/ |
Re: Problem Loading Java Code
Quote:
Quote:
EDIT: The next step would be to zip up the entire project directory, and post a complete copy of the build output. Maybe then we'll find something that's causing your issue. |
Re: Problem Loading Java Code
Quote:
for instance you could try Code:
|
Re: Problem Loading Java Code
I know that we declare what port to use for the power distribution block thru out our code for example
Code:
drivetrain = new RobotDrive(1, 2); |
Re: Problem Loading Java Code
Quote:
The code you posted is creating a RobotDrive using Jaguar controllers on PWMs 1 and 2 on the default digital sidecar (CRIO slot 4). If you want to use different PWM outputs you could modify it like so: Code:
drivetrain = new RobotDrive(3, 4); //Uses PWM outputs 3 and 4. |
Re: Problem Loading Java Code
Trevor,
Your solution trouble-shoots the joystick/jaguar issue, not whether operatorControl() is being called. I might give that a try, but I'm reasonably certain I don't have 2 joysticks failing spontaneously, or 2 jaguars etc. Ehaskins, Got a reply on official FIRST forums (this does not mean it's correct of course) that the RobotMain() function is not the problem (and boy do I hate the casing of that method name - why did they make it look like a constructor?) At the moment I'm most interested in examining the WatchDog angle - does anyone fully understand this and could explain to the unenlightened? |
Re: Problem Loading Java Code
Are you getting any text output at all to indicate that the autonomous() or operatorControl() methods are being called? Some more print statements can help here...
|
Re: Problem Loading Java Code
I am having the exact same problem with our robot. I download the code to the robot, but when I try to run it it just says watchdog where it usually says enabled. I put a print statement in the autonomous() and operatorControl() methods and it printed to the screen, so it's to that part. Then I made it print something if the trigger was pressed on the joystick and that worked too. Please help.
|
Re: Problem Loading Java Code
I figured out the problem, I disabled the watchdog in the wrong part of the code. In the getting started PDF file, it said to put it in the constructor, but that doesn't work, you have to put it in the operator control method. Hope this helps anyone else who might have this problem.
|
Re: Problem Loading Java Code
What is the fix for the "[cRIO] Information: No user-supplied RobotMain()" problem? We are still stuck with that...
Thank you, Chris |
Re: Problem Loading Java Code
The "[cRIO] Information: No user-supplied RobotMain()" is not an issue. If you look at the simple robot class (the superclass), there is a method called RobtMain() with a print statment that says "Information: No user-supplied RobotMain()". If you don't override it, it will print that on the screen. The comment above the method says you only need to oeverride it if you don't want to use the operatorControl() and autonomous() methods, and just want to program them in manually.
|
Re: Problem Loading Java Code
Java example code is wrong. Disable the watch dog at the top of autonomous and/or operatorControl. The disable of the watchdog in the constructor is cancelled out by code in the startApp method of RobotBase which is called after the instance is created but before autonomous or driverControl is called.
|
| All times are GMT -5. The time now is 11:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi