Go to Post "We used to shut the robot up in a box and send it away from home. Now we just suffocate it." - GaryVoshol [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-02-2014, 19:19
Reed501's Avatar
Reed501 Reed501 is offline
Team Captain
AKA: Reed Schrier
FRC #2637 (Phantom Catz)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Palos Verdes
Posts: 20
Reed501 is an unknown quantity at this point
URGENT: Code not working for various reasons

So this morning's been long, at 9 AM I was told to come in to "fix the code" immediately I came across an error where, even after deploying, the driver station said "No Robot Code".

So I copied last year's code and edited it to this year's code. Then whenever I built the code it would just load the old code and our new code couldn't be built.

Then I made a new project and put the new code in and that gave me the original problem; the last year's code was built again.

After manually editing the old code directly and uploading that on the robot, it seemed as though the code ran only once and didn't loop.

I tried to change the properties and the target file of the project but they didn't help either.
Is there anybody who knows what to check??

Last edited by Reed501 : 01-02-2014 at 19:39.
  #2   Spotlight this post!  
Unread 01-02-2014, 20:06
Reed501's Avatar
Reed501 Reed501 is offline
Team Captain
AKA: Reed Schrier
FRC #2637 (Phantom Catz)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Palos Verdes
Posts: 20
Reed501 is an unknown quantity at this point
[URGENT]"no robot code" on the driver station??[URGENT]

I still have the problems with the robot code.

Whenever I try to deploy the code on cRIO, the driver station says "no robot code" and I cannot use my latest code.
I suppose an older program is still on the robot.

Can anyone help us, this is an URGENT issue!!
  #3   Spotlight this post!  
Unread 01-02-2014, 20:11
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,521
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: [URGENT]"no robot code" on the driver station??[URGENT]

What language are you using?

No code means that your code is not deployed to the robot and that it has no code to run.

Ah, I see that you actually already have a thread on this. Request this post is locked.
  #4   Spotlight this post!  
Unread 01-02-2014, 20:13
apples000's Avatar
apples000 apples000 is offline
Registered User
no team
 
Join Date: Mar 2012
Rookie Year: 2012
Location: United States
Posts: 222
apples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant future
Re: [URGENT]"no robot code" on the driver station??[URGENT]

This is the third time you have posted this. It's really hard for anybody to help you, as this could be caused by a large number of things. Try loading a new default robot project on the robot.
  #5   Spotlight this post!  
Unread 01-02-2014, 23:25
Jarren Harkema's Avatar
Jarren Harkema Jarren Harkema is offline
Dancing Drive Coach
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Sep 2013
Rookie Year: 2013
Location: Michigan
Posts: 165
Jarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to allJarren Harkema is a name known to all
Re: [URGENT]"no robot code" on the driver station??[URGENT]

If I recall correctly, when ever we fully deploy code onto our robot, we have to restart it before the driver station indicates that code is on the robot. We are using labview.
  #6   Spotlight this post!  
Unread 01-02-2014, 23:47
mega900997's Avatar
mega900997 mega900997 is offline
Registered User
FRC #0263 (Sachem Aftershock)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Ronkonkoma
Posts: 58
mega900997 is on a distinguished road
Re: [URGENT]"no robot code" on the driver station??[URGENT]

When you download the code and reboot the cRIO, open up netconsole and look at the output when the cRIO boots up. If there is an error within the code the code will not run, so check the output which will show what the error is. This is what I do whenever it happens to me, and I use C++ as my programming language. It may or may not work for you, but you can try. I'm not sure if netconsole works with the other programming languages.
__________________
2015
Suffield Shakedown Winners & Most Points Scored
South Florida Regional 6th Seed, #5 Alliance Captains, Regional Winners w/ 2383 & 386, Innovation in Control Award
NY Tech Valley Regional 5th Seed, QF, Excellence in Engineering Award
SBPLI Long Island Regional 4th Seed, Finalists

Hopper Division 14th Seed, QF
  #7   Spotlight this post!  
Unread 02-02-2014, 14:39
kghaemi96 kghaemi96 is offline
Driver/Know-it-all/Engineer
AKA: Kevin G
FRC #2637 (Panthers)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2011
Location: California
Posts: 30
kghaemi96 is an unknown quantity at this point
Re: [URGENT]"no robot code" on the driver station??[URGENT]

Quote:
Originally Posted by apples000 View Post
This is the third time you have posted this. It's really hard for anybody to help you, as this could be caused by a large number of things. Try loading a new default robot project on the robot.
I'd like to apologize in behalf of Reed. He was a bit flustered due to the issues we were having yesterday.

A clarification for all of you that are kind enough to help. We programmed in C++. Sadly I have next to no knowledge in programming so there isn't much else I can tell you. All I know is when we use a basic code that we wrote to see if the code was being properly uploaded, everything was good on the Driver Station. We were also able to do the same once adding basic drivetrain code to (coded 6 talons). However our issue came up when we attempted to add pneumatics onto the code. Whenever we tried to activate the compressor there was no signal on sidecar. The solenoids were getting signal though!

Again I would like to sincerely apologize for the minor post spamming, I hope that you guys are able to help.

Thanks,
Kevin
__________________
Why not both? ¿Por qué no los dos?

2011 Las Vegas Regional Semifinalists (5th Alliance Captain)
2012 Las Vegas Regional Semifinalists (2nd Alliance)
2013 Inland Empire Regional Quarterfinalists (7th Alliance)
2014 Central Valley Regional Quarterfinalists/Creativity Award (7th Alliance Captain with 2085 and 5136)
2014 Los Angeles Regional Semifinalists (4th Alliance Captain with 696 and 5102)
  #8   Spotlight this post!  
Unread 02-02-2014, 15:09
GaryVoshol's Avatar
GaryVoshol GaryVoshol is offline
Cogito ergo arbitro
no team
 
Join Date: Aug 2005
Rookie Year: 2000
Location: Royal Oak, MI
Posts: 5,743
GaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond repute
Re: URGENT: Code not working for various reasons

3 threads merged into 1
__________________
(since 2004)
  #9   Spotlight this post!  
Unread 02-02-2014, 15:27
jmartin jmartin is offline
Registered User
AKA: Joseph Martin
FRC #0172 (Northernforce)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Gorham
Posts: 30
jmartin is on a distinguished road
Re: URGENT: Code not working for various reasons

When deploying code from WindRiver, have you gone into Window->Preferences->FIRST Downloader Preferences and made sure the right file is selected? Simply creating a new project or building a different one doesn't change this setting. Also make sure that the project was built -- just deploying code doesn't automatically rebuild for you.
  #10   Spotlight this post!  
Unread 02-02-2014, 21:29
carrud carrud is offline
Registered User
AKA: Clark Rudder
FRC #2637
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Los Angeles Area
Posts: 20
carrud is an unknown quantity at this point
Re: URGENT: Code not working for various reasons

The original problem posted by the OP re: no code was figured out (though Reed may not be fully aware as he was offline today). The problem is as discussed here where code errors/issues are not surfaced when compiling or linking or deploying. They are only surfaced in Netconsole after you deploy and then restart crio (when using WindRiver c++, not sure about elsewhere). So, if you are not paying attention to Netconsole you could be led to believe that you have deployed code, but you haven't. The code seems to get FTPd to crio, but not implemented on crio restart.

This being a "single-mode OS" seems to be the underlying force behind this happening. At least in some cases.

If you run into this kind of problem (where you successfully deploy code, but DriverStation continues to say no robot code) then check Netconsole for hints as to why.

Regards
  #11   Spotlight this post!  
Unread 03-02-2014, 14:10
carrud carrud is offline
Registered User
AKA: Clark Rudder
FRC #2637
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Los Angeles Area
Posts: 20
carrud is an unknown quantity at this point
Re: URGENT: Code not working for various reasons

Unfortunately my previous post was not entirely correct. Although that was a problem we encountered it was not actually the first problem related to the symptom first reported by the OP. The initial problem was that clicking "deploy" resulted in nothing happening. The code was not getting sent to crio. This problem still happens. Although we have messed about and can sometimes circumvent the problem we have not yet figured exactly why it happens.

When we click deploy, the deploy window appears very, very briefly. This is clearly different than when we have a successful deployment where the window appears and shows the progress bar during the activity. Netconsole shows nothing during this time (though I don't know if it is supposed to show anything).
  #12   Spotlight this post!  
Unread 03-02-2014, 14:31
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: URGENT: Code not working for various reasons

Quote:
Originally Posted by carrud View Post
Unfortunately my previous post was not entirely correct. Although that was a problem we encountered it was not actually the first problem related to the symptom first reported by the OP. The initial problem was that clicking "deploy" resulted in nothing happening.
Try turning off the Windoze firewall or create a rule that allows access to a FTP server (which is what really happens when you download code). We have to do this in order to download code.

HTH
__________________
Fast, cheap or working - pick any two!
  #13   Spotlight this post!  
Unread 03-02-2014, 14:49
steinra's Avatar
steinra steinra is offline
(KG7KEO)
AKA: Randy Steiner
FRC #5461 (V.E.R.N.)
Team Role: Coach
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Meridian, Idaho
Posts: 56
steinra is on a distinguished road
Re: URGENT: Code not working for various reasons

I noted in the list of posts here that the cRio may not have been updated to this years image yet? Is that correct?

We had issues with is running by on the format and update image that it had the rebooting crio and did not take any time on the other steps. I know we had struggles with it and had to do the following.

Make sure all network interfaces were disabled, then only use the wired net connection and plug into the bridge/AP. Make sure the firewall is off.

Make sure you can ping the cRio.

open the imaging tool.

See that the cRio is found.

On the 8 slot crio change the switch to safe mode
On the 4 slot do it on the imaging tool.

Make a minor update (change name, change language, add the can) for instance, do not choose format cRio.

Safe mode will prompt to image cRio. Say yes. This should take a little while and not jump right to rebooting crio message.

After it is done turn off the safe mode switch and then in the imaging tool choose to format the cRio with the new image.

Then the code will need to be deployed.

This was the only way we were able to get both cRio's we have to the current software revision.

If you are still having issues with the C++ code deploy then maybe try jumping over to a labview of java code set and see if that will work for something as simple as reading the joystick value. If you can get that to work, then maybe something is incorrect in the WindRiver setup.

Hope this may help.

Randy
__________________
Randy Steiner
2014-2015 FIRST Team 5461 - Coach
2011-2014 FIRST Team 4106 - Head Mentor
2007-2011 FIRST Team 1891 - Mentor
  #14   Spotlight this post!  
Unread 03-02-2014, 14:47
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: URGENT: Code not working for various reasons

Quote:
Originally Posted by carrud View Post
This being a "single-mode OS" seems to be the underlying force behind this happening. At least in some cases.
There is a fundamental misunderstanding in this thread about what "deploying" really means. The transfer is from an FTP client (Windoze) to an FTP server (the robot). The file you are transferring is NOT a fully linked executable. It is code to be dynamically linked and loaded to the VxWorks/FIRST/WPI infrastructure on the robot. So every unknown symbol in the deployed .out file must be satisfied in the text and data segments of the VxWorks/FIRST/WPI/NI code already on the robot (put there when we image the cRIO). This dynamic linking loader is a single pass algorithm, not a dual pass linker like the one we use when combining multiple objects on our development station (where the WindRiver 3.3 is running).

So how does one make sure their code will load and run (2 distinctly different issues)? Most FIRST programmers simply deploy and debug using print/log/smartconsole output. But without using the debugging interface to the robot, you will miss messages about the unresolved symbols and/or tasks getting suspended for various violations (memory access, divide by zero etc). Instead create a target server and load and run your code using the debugging tools and you will see these errors and fix them. FIRST has a tutorial that covers this procedure. NetConsole MIGHT catch them depending on how badly the errors cripple the OS on the robot.

http://wpilib.screenstepslive.com/s/...-robot-program

Many of you might think this is a lame setup. But I remind you this exactly how adding code to the Linux kernel (and many other operating systems) works. WindRiver and VxWorks are not unusual in this respect.

HTH
__________________
Fast, cheap or working - pick any two!

Last edited by wireties : 03-02-2014 at 14:58. Reason: added link to debugging tutorial
  #15   Spotlight this post!  
Unread 01-02-2014, 20:11
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Re: URGENT: Code not working for various reasons

That certainly is an interesting problem.

To make sure my interpretation is correct, the original problem was that the driver station was showing "No Robot Code". In an attempt to remedy this issue, you took your old code and edited it. When you deployed this "edited" code, the driver station recognized that there was code on the robot, however, it was the old "unedited" code.

Then I am a little confused on what came next. You say that you made a new project with the new code and this resulted in the original problem; deploying the program would give the robot the old code. This is confusing to me because you said the original problem was that the driver station not seeing code. So if you could maybe clarify a little on what exactly happened after each action that would be great. Also, maybe some specifications on what language you are using along with whatever else you have even the slightest suspicion of being the root of the problem. These things will really help us help you solve this problem.

Unfortunately, I do not have an exact answer to this. Here is what I would do if I were in your situation. 1) Ensure I am seeing Robot Communication in the driver station (if not there is another problem) 2) Check to make sure I am deploying everything properly from the correct files. 3) Restart both the computer and the robot. 4) Reformat the cRIO 5) Replace the ribbon cable 6) Post my updated findings on CD
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi