Go to Post I'm now convinced that the entire 2015 season was an elaborate ploy by FIRST to get teams to stop complaining about bumpers. - Joe G. [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
  #16   Spotlight this post!  
Unread 02-05-2010, 03:47
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Feedback Thread: WPILib

Quote:
Originally Posted by Radical Pi View Post
I've seen nothing like this. On our bot we were running without a jag for a while (thanks to the ID reset bug) while the code was still trying to communicate with it which would surely drop packets. Using C++ w/ black jag bridge.
I have seen this only when using Java.

Instead of a C++ assert that prints on the debug, the java implementation uses an unchecked exception.

Seeing as the exception doesn't have a compile time warning, it is easy to overlook.
If not handled, the exception will kill the main thread thus the bot, which means that one jag failure results in a dead bot.
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
  #17   Spotlight this post!  
Unread 07-05-2010, 20:56
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Feedback Thread: WPILib

Several things I'd like integrated into the WPI library:
  1. In "Driver Station Communication.vi", when Analog Input 8 is opened, endorse the refnum registries by setting it as "battery voltage" on the analog inputs. Perhaps even make a "battery voltage" VI that provides the voltage pre-scaled.
  2. Make the Accelerometer VIs polymorphic to chose between the analog accelerometer and the I2C accelerometer.
  3. Create an option on the refnum registries to get the whole array of items in that registry. While I could just open it up and modify it, I'd like it included in the WPI library by default, so I can create VIs that use this capability, and distribute them to others.
  4. I'd also like a square wave signal generator for the digital outputs (done with the FPGA). Perhaps the inputs would be "period", "duty cycle", "# of cycles" OR "on period", "off period", "total time". Even if only two outputs per module can be used for this, I think it would be an excellent feature to encourage custom electronics.

I think all of these things would be pretty simple to implement. I can provide examples if my descriptions are unclear.
__________________
-- Marshal Horn
  #18   Spotlight this post!  
Unread 09-05-2010, 03:39
FRC4ME FRC4ME is offline
Registered User
FRC #0339
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Fredericksburg, VA
Posts: 324
FRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant future
Re: Feedback Thread: WPILib

Quote:
Originally Posted by biojae View Post
I have seen this only when using Java.

Instead of a C++ assert that prints on the debug, the java implementation uses an unchecked exception.

Seeing as the exception doesn't have a compile time warning, it is easy to overlook.
If not handled, the exception will kill the main thread thus the bot, which means that one jag failure results in a dead bot.
Yeah. I actually like the Java WPILib's more frequent use of exceptions (so long as they're only used to indicate exceptional situations), but that particular one should probably be checked.
__________________
Go directly to queue. Do not pass pit.
  #19   Spotlight this post!  
Unread 09-05-2010, 22:49
virtuald's Avatar
virtuald virtuald is online now
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,087
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: Feedback Thread: WPILib

One thing that particularly annoys me in C++ (but I realize isn't exactly a WPILib problem) is that calling assert() doesn't trigger a breakpoint in the debugger at all -- which really, that is the whole *point* of assert().
__________________
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
  #20   Spotlight this post!  
Unread 22-05-2010, 21:31
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Feedback Thread: WPILib

How about more use of the semaphore notification lists (in Axis camera, they "fire an event" when a new image is received)
some areas where that would be nice:
DS new Data
DS send data (dashboard)
limit switch/digital input

It would be helpful if there was a class for these semaphore events (how about SemaphoreEvent?).


It would also be nice if the simple robot (which need a better name, IMO) was threaded, and you could tell it to kill auto if it is taking too long:
Code:
class myrobot:public betternameforsimplerobot
{
//..
myrobot()
{
     this->killAutoifItRunsTooLong=true
}

void Auto()
{
while(true)
{
printf("Bwa ha ha! You are stuck in an infinite loop!");
}
}
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #21   Spotlight this post!  
Unread 07-07-2010, 14:43
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Feedback Thread: WPILib

Well, I just thought of another thing I'd like to be able to do:
The FPGA is capable of reading inputs at a much faster rate than the processor. Why not leverage this so that the FPGA can be used for short periods of high-speed data collection on the Analog inputs?
Say you configure the sample rate and the number of samples in begin.vi, and then you just use a VI to trigger the collection?
__________________
-- Marshal Horn
  #22   Spotlight this post!  
Unread 07-07-2010, 15:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Feedback Thread: WPILib

Quote:
Originally Posted by kamocat View Post
Well, I just thought of another thing I'd like to be able to do:
The FPGA is capable of reading inputs at a much faster rate than the processor. Why not leverage this so that the FPGA can be used for short periods of high-speed data collection on the Analog inputs?
Say you configure the sample rate and the number of samples in begin.vi, and then you just use a VI to trigger the collection?
The FPGA can't collect analog samples any faster than the ADC can digitize them.

~
  #23   Spotlight this post!  
Unread 07-07-2010, 15:55
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Feedback Thread: WPILib

Quote:
Originally Posted by kamocat View Post
Well, I just thought of another thing I'd like to be able to do:
The FPGA is capable of reading inputs at a much faster rate than the processor. Why not leverage this so that the FPGA can be used for short periods of high-speed data collection on the Analog inputs?
Say you configure the sample rate and the number of samples in begin.vi, and then you just use a VI to trigger the collection?
Have you looked at the DMA examples?
  #24   Spotlight this post!  
Unread 07-07-2010, 19:14
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Feedback Thread: WPILib

No, I don't know what DMA is. I'll look into those now.

How about a boolean latch function? I think this might be possible with the "time since last pulse" counter, but that would require storing how long ago the last pulse was. A latch function might be configurable for "a pulse at least this length" so it could be used on things like switches. (In this past year, it could be used for a kicker passing by a switch to determine if it is at or past the frame perimeter.)
__________________
-- Marshal Horn
  #25   Spotlight this post!  
Unread 07-07-2010, 19:27
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Feedback Thread: WPILib

Quote:
Originally Posted by kamocat View Post
How about a boolean latch function? I think this might be possible with the "time since last pulse" counter, but that would require storing how long ago the last pulse was. A latch function might be configurable for "a pulse at least this length" so it could be used on things like switches. (In this past year, it could be used for a kicker passing by a switch to determine if it is at or past the frame perimeter.)
How about an interrupt (Utilities->Interrupts). You can configure it on a rising or falling pulse (although not on a pulse width). You might even be able to cascade it with a counter to give you what you want.
  #26   Spotlight this post!  
Unread 07-07-2010, 21:06
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Feedback Thread: WPILib

Quote:
Originally Posted by kamocat View Post
How about a boolean latch function? I think this might be possible with the "time since last pulse" counter, but that would require storing how long ago the last pulse was. A latch function might be configurable for "a pulse at least this length" so it could be used on things like switches. (In this past year, it could be used for a kicker passing by a switch to determine if it is at or past the frame perimeter.)
You can use digital filtering to ensure the pulse is at least "x" long. Then you can use an event counter to count each one or an interrupt as Joe suggested. The counter could handle more than one event before being read by your code. The interrupt will give you the time the event happened, but not handle more than one without overwriting the older event. With DMA, you could get both the time and more than one, but there is only one DMA resource available.

-Joe
  #27   Spotlight this post!  
Unread 11-07-2010, 02:09
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: Feedback Thread: WPILib

Quote:
Originally Posted by biojae View Post
I have seen this only when using Java.

Instead of a C++ assert that prints on the debug, the java implementation uses an unchecked exception.

Seeing as the exception doesn't have a compile time warning, it is easy to overlook.
If not handled, the exception will kill the main thread thus the bot, which means that one jag failure results in a dead bot.
Since MARC I have created a modified version of the code, to fix this. If you are planning on attending IRI, you may want it.
http://www.chiefdelphi.com/forums/sh...ad.php?t=86289
  #28   Spotlight this post!  
Unread 19-07-2010, 03:38
spartango spartango is offline
Registered User
FRC #0192 (GRT)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Palo Alto, CA
Posts: 43
spartango is an unknown quantity at this point
Re: Feedback Thread: WPILib

If there was one part of the WPILib that bothered me, it was that when it got ported to the java platform, it didn't get redesigned to match java paradigms and features. As an example, it doesnt use OOP or exceptions as effectively as it might.

The bigger, and more interesting, feature that seems to be wholly missing from the WPILib is events & asynchronous action. In my experience, these are particularly useful, if not essential, in robotics & other realtime applications...

Case in point, see TinyOS, the embedded development platform where EVERYTHING is event based and asynchronous. The iOS platform also actively demonstrates this system effectiveness.
Developers from my team implemented and successfully used our own event models in java, and I would encourage you to look at their work in improving the WPILib.
http://code.google.com/p/grtframework
  #29   Spotlight this post!  
Unread 15-08-2010, 02:47
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Feedback Thread: WPILib

In the LabVIEW version, I'd like the refnum registries more tightly integrated with the act of opening and closing references for diagnostic purposes, so that when a reference is opened twice, the second time it will state for what purpose that channel was originally opened.
I realize that it's only as good as the naming, but I think it's a good attempt to aid in diagnostics and troubleshooting.
(For that matter, it'd be neat to automatically start the execution trace tool when the watchdog starts timing out in Teleop. However, I think that could impact the performance of the user code.)

But more about the refnum registries:
There are some things that should not require a name, because there cannot be more than one of them. Here's a list:
  • Robot Drive
  • Watchdog
  • DMA
  • Air Compressor
In these instances, the name is just another source of error with no benefit. In fact, with these items you should not have to wire to them at all; they can retrieve the single item from the registry.
__________________
-- Marshal Horn

Last edited by kamocat : 15-08-2010 at 03:02.
  #30   Spotlight this post!  
Unread 15-08-2010, 14:24
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Feedback Thread: WPILib

Quote:
Originally Posted by kamocat View Post
There are some things that should not require a name, because there cannot be more than one of them. Here's a list:
  • Robot Drive
  • Watchdog
  • DMA
  • Air Compressor
Any time you have more than one motor powering the same mechanism, a "Drive" is useful. The TechnoKats 2009 robot's propeller was driven by two CIM motors, and about halfway through the build someone pointed out that the program would look simpler if we replaced the pair of motor control blocks with a single Drive block in a few places.

There is only one watchdog and only one DMA resource available to the user, but keeping the general scheme intact and avoiding special cases seems worthwhile.

The robot rules customarily permit only one air compressor. The software support is not that limited; you can define as many as you want until you run out of relay outputs.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feedback Thread: Driver Station and Dashboard Greg McKaskle FRC Control System 10 13-10-2010 23:26
WPILib in Dev C++ mikelowry C/C++ 2 22-09-2009 10:41
Importing WPILib? lingomaniac88 C/C++ 1 12-01-2009 20:39
Using WPILib RyanW Programming 1 19-01-2008 17:15


All times are GMT -5. The time now is 10:52.

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