View Full Version : Cannot move robot
Butter's
14-11-2012, 20:44
So, this has been an issue for a month now. The other programmers & myself are looking to switch to Java. We inherited C++ from the old programmer, but we are better in Java. Sadly, we can't get Java or C++ to work. I could care less if C++ works, I'm just looking for help in getting Java to run.
What makes this really annoying is...
Communication is fine.
RobotCode is on the robot (Deploys fine with netbeans).
Code is exact copy from the Java Starting Guide: Github link (https://github.com/RoboWizards/JavaTest/blob/master/src/edu/wpi/first/wpilibj/templates/Team522Robot.java)
Joysticks have a green light & respond on the I/O dashboard.
The jaguars stop blinking when we enable the robot (Which as far as I know means they are functioning).
Running latest netbeans plugins for FRC.
Teleop AND autonomous don't work.
Were not even using wireless, were wired in.
The cRIO is running on 2012_v43, and this is the only thing I'm not sure about (Is this latest?).
Things we have tried...
Restart the robot / change battery.
Re-imaged cRio.
Creating a new java project.
Different Java Code.
Change the joystick ports.
Prevented Windows firewall from blocking communications.
Pinging robot (Which works fine).
And other little things I forgot which we read online.
The only thing I wish to try is seeing if the compressor & piston work. If they do I know this is a jaguar/motor/electrical problem (Which doesn't make any sense, since we have not modified the robot mechanically or electrically sine last competition. And it worked fine then).
I'm literally clueless right now, for those interested, I even took pictures of all of it on my phone:
Link to photos (http://imgur.com/a/8IVXf)
Any help would be awesome right now, I really want to practice with Java before the season starts!
SuperS_5
15-11-2012, 02:54
What are the LEDs on the cRIO doing? Check the cRIO support PDF (http://www.ni.com/pdf/manuals/375770a.pdf) if you don't know what I'm talking about. Page 15 explains some of the different blink codes.
Butter's
15-11-2012, 10:25
We are not having any blink codes on the cRio
SuperS_5
15-11-2012, 18:11
Teleop AND autonomous don't work.
What do you mean by this? The driver station won't engage the tele-op or auto modes, or it engages, but does nothing?
Are there any error messages displayed in the driver station?
Mark McLeod
15-11-2012, 18:33
Verify that you are downloading the program you think you are.
ftp to the cRIO and verify that the date of the Java program matches when you last downloaded it.
It sort of sounds like you're running a default program with different controls in it.
The Jaguars going solid mean they are being instantiated by the code.
Let us know if the Driver Station Diagnostics tab shows any messages.
Butter's
15-11-2012, 18:45
Verify that you are downloading the program you think you are.
ftp to the cRIO and verify that the date of the Java program matches when you last downloaded it.
It sort of sounds like you're running a default program with different controls in it.
The Jaguars going solid mean they are being instantiated by the code.
Let us know if the Driver Station Diagnostics tab shows any messages.
Will try this tomorrow / let you know the results.
What do you mean by this? The driver station won't engage the tele-op or auto modes, or it engages, but does nothing?
Are there any error messages displayed in the driver station?
Another words, I enable the mode via driver station, its on according to the driver station, but isn't doing anything.
Butter's
16-11-2012, 14:07
No error on console, and I was able to FTP into the robot fine. However, which directory is it in on the cRio?
thephpdev
16-11-2012, 23:10
A possible issue would be that your code throws an exception, or another error of sorts. Can you check your console window in netbeans to see if any error messages are being output'ed.
Butter's
17-11-2012, 13:31
No, there is no stack trace. Can someone answer my question still? Where can I locate the code on the cRIO after I FTP in?
Butter's
18-11-2012, 14:53
Huh, my original post didn't go through. Anyway, no stacktrace from netbeans. It builds & deploys fine. Can someone tell me where to look on the cRio? I went in via FTP but I have no idea where the directory is.
Are you enabling the robot on the driver station? It was not enabled in the picture you posted.
Butter's
18-11-2012, 21:18
Yeah we did, the picture of the DS was to show a green light for the robot code & communications.
Is anyone able to answer my question? Where is the code located on the cRIO?
SuperS_5
19-11-2012, 03:44
I just want to confirm that you have the cRIO modules in the correct locations.
The Getting Started PDF (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2012_Assets/Getting%20Started%20with%20the%202012%20FRC%20Cont rol%20System_2.pdf) explains this on page 12. (Just trying to narrow things down)
Butter's
19-11-2012, 10:26
As I said in my original post, the robot worked at our last event, and we have not modified it electrically or mechanically since then.
Also, can someone tell me where the directory is on the cRIO for the code. I was asked to confirm it's there but I'm not sure what directory it's in.
Butter's
20-11-2012, 13:09
Just tested the compressor, doesn't start either. I think the suggestion of default code being on the robot is correct, however, after I FTP in, what directory should I look in?
Joe Ross
21-11-2012, 21:25
No error on console, and I was able to FTP into the robot fine. However, which directory is it in on the cRio?
For java, it's in ni-rt/system/ and called robot.suite
Butter's
21-11-2012, 22:55
Ah, thank you. I'm guessing I should try deleting this file & re-downloading when I get back from break.
Butter's
26-11-2012, 14:17
Just want to quickly add after a few days of debugging the problem was resolved!
Thanks everyone who replied / helped out.
Joe Ross
26-11-2012, 14:50
Just want to quickly add after a few days of debugging the problem was resolved!
What was the solution?
Butter's
26-11-2012, 15:57
It was a mix of problems.
First one I found was when I added the compressor in the code (To test if it was jaguars or something else), I made a typo in the port. So it was (1,1), which resulted on a start up error.
After that I found a robot specific issue I'm too lazy to write about, and I forgot the other one... I guess I was too excited that I fixed it :p
I found a robot specific issue I'm too lazy to write about
Some friendly advice? If you come to CD asking for help, you should be willing to share what you've found when you figure it out. It's considered the courteous thing to do. Others may benefit from your experience.
Butter's
26-11-2012, 17:28
I was hoping it wouldn't be a large deal :/ . I myself only found what the problem was (had to go to class), I didn't fix this exact one. I could ask the guy tomorrow what he did. The most I know was the problem and how I assume he fixed it. Lazy probably wasn't the proper word to explain that.. Sorry!
279 EMPIE
06-12-2012, 13:39
Im not 100% sure but i thought the Jags showed a green Light for Forward, Red Light for Revearse, and a orange Light for nothing because if im right about that your Jags would not be reading anything in the code.
If they are not reading it could be a couple reasons:
1. I would check to make sure you have the ports right Digital Module should be in Slot One or Two not sure which, and on the Side Car the PWM port need to be put in right. In the program your code should have:
public Jaguar Jag1 = new Jaguar(1,(PWM Port Number));
2. There is something wrong with your code and i cant help with out seeing it.
If the Jags are being read by the code and are still not working, make sure that you set Jags. This means you use a paper clip on the jag reset button untill it blinks then you run your robot full speed forward and full speed backwards then it should set it self. <-- this is the way we fixed are robot jags two years ago
279 EMPIE
06-12-2012, 13:42
I should read next time :P ^^^
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.