Go to Post what is FIRST?...It's about innovation, hard work, inspiration, teaching, learning, experiment, strategy, competition, meeting new people, being inspired, aiming high and changing paradigms...Really, FIRST is what you make of it. - jarowe [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 21-01-2013, 04:46
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
NetConole replacement

I have written a net console replacement. This is a Windows console app (i.e. run in a CMD window) called netterm (attached here). One of the advantages of this program is the support for ANSI font color.
http://en.wikipedia.org/wiki/ANSI_escape_code

Our robot code has macros printing "Info", "Warning" or "Error" messages. Info lines are green, Warning lines are yellow and Error lines are red. When debugging the robot code, we found that debug spews are sometimes too chatty especially when using the CANJaguar class. Sometimes, our debug messages got drowned in the ocean of messages. Having different colors help us to spot important messages our code printed out. Another useful option is the ability to save the debug session into a log file.

For syntax on how to use this tool, type "netterm /help". The first time you run this tool, you need to provide your team number. For example,
netterm /team=492

The program will save this info into the registry so the next time you run it, you just simply type:
netterm

Don't worry about the other options. For FRC application, all options should have the correct default values. The options are for communicating with other applications.

Since the app monitors UDP port 6666, when running the first time, Windows Firewall will prompt you for permission to monitor network ports.
Attached Files
File Type: zip NetTermTool.zip (12.5 KB, 27 views)
__________________

Last edited by mikets : 21-01-2013 at 04:54.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2013, 15:46
arthurlockman's Avatar
arthurlockman arthurlockman is offline
Team Captain
FRC #0172 (Northern Force)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Gorham, ME
Posts: 29
arthurlockman is an unknown quantity at this point
Send a message via AIM to arthurlockman
Re: NetConole replacement

Is there any chance we could see the source for this? I'd like to build it for mac too!
__________________
--
Arthur Lockman
Twitter: @arthurlockman
a.rthr.me
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2013, 16:16
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: NetConole replacement

You can access the source here.
http://proj.titanrobotics.net/hg/Frc...4b6846/NetTerm
But what operating system are you running on the mac? This is written as a Windows console app. So it will take some effort to port to the mac OS.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2013, 22:53
arthurlockman's Avatar
arthurlockman arthurlockman is offline
Team Captain
FRC #0172 (Northern Force)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Gorham, ME
Posts: 29
arthurlockman is an unknown quantity at this point
Send a message via AIM to arthurlockman
Quote:
Originally Posted by mikets View Post
You can access the source here.
http://proj.titanrobotics.net/hg/Frc...4b6846/NetTerm
But what operating system are you running on the mac? This is written as a Windows console app. So it will take some effort to port to the mac OS.
I'm running Mountain Lion. Actually, I was able to get your EXE to run in the mac command line with Wine. I'll probably stick with that, instead of porting it. Maybe porting will be my offseason project.
__________________
--
Arthur Lockman
Twitter: @arthurlockman
a.rthr.me
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2013, 22:42
nightpool's Avatar
nightpool nightpool is offline
robotRectifier
AKA: Evan
no team (formerly of CORE 2062)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Waukesha, WI
Posts: 81
nightpool is on a distinguished road
Re: NetConole replacement

The RoboPy guys have a python-based replacement (though not supporting color afiak)
You can find it at https://github.com/rbmj/netconsole and it should run cross-platform fairly gracefully. You need python (Not any of the robot stuff, just python) installed on your computer to run it, but it supports any robot language that uses NetConsole.
__________________
Proud alum of CORE 2062.
www.core2062.com
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2013, 18:04
jtechau jtechau is offline
Registered User
AKA: Jeff Techau
FRC #1388 (Eagle Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Arroyo Grande, CA
Posts: 21
jtechau is just really nicejtechau is just really nicejtechau is just really nicejtechau is just really nice
Re: NetConole replacement

Hey, that's a pretty neat app. I like it.

Perhaps you can help with a problem we have. Some text is not transmitted from the cRIO to NetConsole. This is intermittent. For example, we print a small amount of info just after the robot boots, via printf's in RobotInit(). Sometimes the info is printed, sometimes not, and sometimes part of it is printed. More often than not, none or only part of the info is printed.

We also experience dropped characters when typing in the console. The cRIO recognizes what we've typed, but doesn't always display all of the characters.

I was hoping that NetTerm would fare better, but NetTerm seems to have the same issue. So I assume the issue is on the cRIO side or in the communication path. Any ideas?
Reply With Quote
  #7   Spotlight this post!  
Unread 11-02-2013, 19:14
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: NetConole replacement

Both netterm and netconsole use UDP. By definition, unlike TCP, UDP doesn't guarantee no packet loss. So if you overwhelm the network with packets, it is possible to lose some. It is just the nature of UDP for higher performance. Netterm allows you to switch to TCP but communication protocol must be agreed on both sides. So if you want to use TCP, both side must be using TCP. Unfortunately, the cRIO side is designed to use UDP only. So this doesn't help you. In any case, if you overwhelm the network with packets, you should reconsider how you do printf's. Printing lots of stuff in a tight robot loop is normally discouraged. This will drastically slow down your robot and may cause the "Watchdog not fed" warning so the robot may hesitate. If you want to see the value of some variables, there are many alternatives than using plain printf's in a loop. If you really want to do printf's in a loop. Do it once every 10 or 20 loops or so. You can also use the SmartDashboard to monitor variables.
EDIT: After reading your post again, you seem to have a network dropout issue. You may want to reposition the wireless router on the robot. If the network drops out intermittenly, UDP will also drop packets.
__________________

Last edited by mikets : 11-02-2013 at 19:18.
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 18:25.

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