Go to Post There is a really bad trap most people fall into, when presented with data they tend to trust it. This is dangerous. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-05-2011, 19:34
Nickle Nickle is offline
Registered User
FRC #0348
 
Join Date: Dec 2010
Location: Norwell, Mass.
Posts: 6
Nickle is an unknown quantity at this point
No Robot Code

My team is elavuating using RobotPy for next year and is planning on using it for a post season event. We are using RobotPy version 2011.2 and version 29 of the cRIO. The code runs in the net console but the driver station says no robot code.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-05-2011, 02:05
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,043
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: No Robot Code

Quote:
Originally Posted by Nickle View Post
My team is elavuating using RobotPy for next year and is planning on using it for a post season event. We are using RobotPy version 2011.2 and version 29 of the cRIO. The code runs in the net console but the driver station says no robot code.
What do you mean when you say "runs in the net console"?
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread 08-05-2011, 18:59
Nickle Nickle is offline
Registered User
FRC #0348
 
Join Date: Dec 2010
Location: Norwell, Mass.
Posts: 6
Nickle is an unknown quantity at this point
Re: No Robot Code

It basically shows the output of the code and tells if there are any errors.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-05-2011, 00:12
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: No Robot Code

Can you copy and paste the NetConsole output here and your robot.py as well? I suspect what is happening if you don't have any errors is that your code is exiting near-immediately (e.g. your robot.py's run() function returns). There should either be a while 1: loop in either run() or one of the functions it calls (such as the SimpleRobot.StartCompetition() function).
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote
  #5   Spotlight this post!  
Unread 09-05-2011, 17:59
Nickle Nickle is offline
Registered User
FRC #0348
 
Join Date: Dec 2010
Location: Norwell, Mass.
Posts: 6
Nickle is an unknown quantity at this point
Re: No Robot Code

Here's a copy of my robot.py sorry but I can't get the NetConsole output until tomorrow.
[code]
import wpilib

lstick = wpilib.Joystick(1)
ljag = wpilib.CANJaguar(3)
rstick = wpilib.Joystick(2)
rjag = wpilib.CANJaguar(4)

def disabled(): pass

def autonomous(): pass

def teleop():
dog = wpilib.GetWatchdog()
dog.SetEnabled(True)
dog.SetExpiration(0.25)

while wpilib.IsOperatorControl() and wpilib.IsEnabled():
dog.Feed()
checkRestart()



def run():
"""Main loop"""
while 1:
if wpilib.IsDisabled():
print("Running disabled()")
disabled()
while wpilib.IsDisabled():
wpilib.Wait(0.01)
elif wpilib.IsAutonomous():
print("Running autonomous()")
autonomous()
while wpilib.IsAutonomous() and wpilib.IsEnabled():
wpilib.Wait(0.01)
else:
print("Running teleop()")
teleop()
while wpilib.IsOperatorControl() and wpilib.IsEnabled():
wpilib.Wait(0.01)
[\code]
Reply With Quote
  #6   Spotlight this post!  
Unread 10-05-2011, 01:06
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: No Robot Code

Quote:
Originally Posted by Nickle View Post
Code:
    while wpilib.IsOperatorControl() and wpilib.IsEnabled():
        dog.Feed()
        checkRestart()
I don't see checkRestart() defined... are you sure your code isn't raising an exception here and dying?
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote
  #7   Spotlight this post!  
Unread 25-06-2011, 04:12
Joe G.'s Avatar
Joe G. Joe G. is offline
Taking a few years (mostly) off
AKA: Josepher
no team (Formerly 1687, 5400)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2007
Location: Worcester, MA
Posts: 1,445
Joe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond repute
Send a message via AIM to Joe G.
Re: No Robot Code

^reported, sig spam. Still, its nice to see them ask detailed, relevant, well-worded questions.
__________________
FIRST is not about doing what you can with what you know. It is about doing what you thought impossible, with what you were inspired to become.

2007-2010: Student, FRC 1687, Highlander Robotics
2012-2014: Technical Mentor, FRC 1687, Highlander Robotics
2015-2016: Lead Mentor, FRC 5400, Team WARP
2016-???: Volunteer and freelance mentor-for-hire
Reply With Quote
Reply


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 06:26.

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