![]() |
RobotPy 2010.beta2
I've just released a new version of RobotPy (Python for FRC), 2010.beta2. The RobotPy site has moved to FIRST Forge at the encouragement of Brad Miller at WPI; please update your bookmarks. The new location is:
http://firstforge.wpi.edu/sf/projects/robotpy Major changes from 2010.beta1 release:
The wiki pages at FIRST Forge contain the most recent documentation. In the coming weeks I plan to work on improving the documentation further; currently it mostly describes the differences between the C++ WPILib and the Python version. I expect to complete translation of 294's 2010 robot program to Python on Wednesday. When I post it for download I will also make an announcement here. |
Re: RobotPy 2010.beta2
I have a complete robot program already coded up, all it needs are comments
|
Re: RobotPy 2010.beta2
Good job robototes!
|
Re: RobotPy 2010.beta2
want a copy?
|
Re: RobotPy 2010.beta2
If you don't mind :).
|
Re: RobotPy 2010.beta2
well crap.
I accidentally deleted it all, so it looks like i have to remake it :( |
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
i even made a computer testing interface for this one:
http://www.chiefdelphi.com/forums/sh...ad.php?t=87630 too lazy to copy the bbcode |
Re: RobotPy 2010.beta2
i tried installing robotpy today, and it didn't work
|
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
we didn't have netconsole, all we got was watchdog/no code
|
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
How do I do that?
|
Re: RobotPy 2010.beta2
Quote:
Future versions of the Imaging Tool will make it easier to enable the netconsole server portion. It's installed on the cRIO already, just not enabled by default in the C++ version. |
Re: RobotPy 2010.beta2
oh, what port is this on?
|
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
so i listen for a broadcast on port 6666?
how would i do this with netcat? |
Re: RobotPy 2010.beta2
Quote:
Remember that to get anything you need to have the NetConsole server running on the cRIO (by editing ni-rt.ini per the instructions in the above link). Also I've only seen this work over wired connections (on the PC side); wireless to the robot works fine, but the PC has to be hardwired to the router (I think this has to do with it being broadcast instead of unicast). |
Re: RobotPy 2010.beta2
Quote:
UDP 6668 for packets to the cRIO. |
Re: RobotPy 2010.beta2
Quote:
You can then use the script here.... or just run (after compiling ncb.c): Code:
./ncb 6666 &-Joe |
Re: RobotPy 2010.beta2
thanks :)
so i add netconsole.out to the startupdll's? |
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
just confirming
|
Re: RobotPy 2010.beta2
This is great!
I played with RobotPy a little, and here's a problem I encountered. When our code exits due to some error, it waits 5 seconds and then starts our script again, which is how we load new code. However, when it's an actual error, not an intentional interrupt for new code, while we look at the source and fix the problem it keeps on restarting every 5 seconds. Eventually it crashes with some memory error and we have to restart the robot. (I don't have the output in front of me; I'll try and reproduce it so I can post the exact error.) Has anyone else had this issue? How can I prevent it from doing this? |
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
Quote:
How long does a power cycle take for most people? With our LabView code (I don't know if your language makes a difference), it took a minute or two before we got communications after turning the robot on. If the error is happening because the user code is being loaded/unloaded so often, then I can't think of any good fix that doesn't involve fixing the memory error/bug. |
Re: RobotPy 2010.beta2
When there's an error can't it just sit there and wait for you to load new code? Maybe that's something that could be done in robot.py inside of run(), if it catches an exception then checkRestart() continuously.
|
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
Quote:
With regards to reboot time, you don't need to power cycle the whole robot. Clicking the "Reboot Robot..." button on the Driver Station Diagnostics tab only takes 20-30 seconds. Still non-ideal, of course, but much faster than a power cycle (the additional delay is due to the wireless network startup time). |
Re: RobotPy 2010.beta2
Quote:
http://pastebin.com/9bcUEy96 |
Re: RobotPy 2010.beta2
Quote:
http://pastebin.com/9bcUEy96 |
Re: RobotPy 2010.beta2
Quote:
http://pastebin.com/9bcUEy96 |
Re: RobotPy 2010.beta2
Quote:
Quote:
Quote:
Quote:
|
Re: RobotPy 2010.beta2
Quote:
|
Re: RobotPy 2010.beta2
Quote:
If so, that could work! Something like this (if done away from user code in boot.py) http://pastebin.com/iqZjYni0 Though, that requires that the user have a CheckRestart function. EDIT: Also need a wait in that snippet in the loop so that it doesn't take up all the cpu. |
Re: RobotPy 2010.beta2
What about instead of a joystick press, just listen on a socket for some string? It's easy enough to write a script to connect to that socket and send it.
|
Re: RobotPy 2010.beta2
Quote:
Note that the latest code (I don't recall if 2010.beta2 did this, but it's in the current repo) implements the 5 second restart loop entirely in Python (in boot.py). If boot.py exits the C++ level terminates as well. So it's easy enough to customize the restart behavior however you like. |
Re: RobotPy 2010.beta2
Quote:
-Joe |
| All times are GMT -5. The time now is 00:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi