![]() |
What are you doing different from last year?
I was curious what architecture changes veteran LabVIEW teams are planning.
For us, here are the big items:
Anybody else planning on making some big changes? |
Re: What are you doing different from last year?
All of those sound like good enhancements.
I'd also add that the teleop does little beyond calculating and updating set points and updating state machine triggers. If you can build in a logging capability, it will likely pay for itself in understanding how the robot is running. Related to logging, the framework code has a file called Elapsed Times in the Support Code folder. If you place it into your teleop, vision, and other control loops, it will give a very easy way to monitor rates of the robot system. Greg McKaskle |
Re: What are you doing different from last year?
Quote:
|
Re: What are you doing different from last year?
Could you elaborate a bit? I'd like to know how other people are approaching this problem. :)
|
Re: What are you doing different from last year?
Quote:
As for other stuff we'd like to do, we'd also like to have a lot of parameters stored in (INI?) files on the robot for easier loop tuning. Last year, I actually wrote some FTP VIs to update PID constants on the fly, so we might use something to that extent again. As for other stuff, a lot of it isn't really that well fleshed out yet (we have a good idea in our heads, but we haven't written too much code yet). If you have any questions about specific code parts, I'd be happy to answer them as best I can. |
Re: What are you doing different from last year?
It all sounds great!
One thing I've been struggling with is along the lines of saving/updating "ini" files on the robot. Ideally you'd be able to modify key robot parameters from the Driver Station dashboard (so you don't need any additional computers). I've been trying to figure out the best way to do this. My general requirements have been as follows: -No extra computers are needed to make on-the-fly changes -Newer versions of Robot Code (that change the # or type of constants) should not require recompile/redeploy of DS Dashboard code So far, here was what we had come up with: 1) Robot reads constants from XML document on cRIO 2) Robot unflattens from XML, turning it into a typedef for use internally 3) If robot gets a request from DS as to what the current constants are, it flattens the tyepdef to XML and sends it as a string 4) DS can modify the string (typedefs flattened to xml are quite human-readable), and send back a new one (after doing some quick verification to make sure it's still valid) 5) Robot receives the data, saves it, and applies the new constants to the running program Sending XML helps decouple the DS and the Robot, but at the cost of needing to do some kind of XML validation again somewhere. I'm wondering if there is a more elegant way to do this. |
Re: What are you doing different from last year?
|
Re: What are you doing different from last year?
Quote:
My changes as a 3rd year programmer:
|
Re: What are you doing different from last year?
Quote:
One of the things I like about the Flatten/Unflatten from XML is that all my variables are strongly typed in the robot, and I can reuse common names for things like PID gains since their parent typdef has a unique name. In addition, any changes I make to the typedefs themselves are transparent to the flattening process, so I don't need to make additional code changes. Are there similar benefits when using INI? |
Re: What are you doing different from last year?
Quote:
|
Re: What are you doing different from last year?
Quote:
A sample INI File is like this (with two sections, and associated key/value pairs): Code:
[pidConstants]Now, you could also use XML files to the same result, and I certainly won't stop you from doing that, but my personal opinion is that it's best to use an INI file in this situation. Quote:
|
Re: What are you doing different from last year?
Also look in the LabVIEW for FRC 2012 examples. There is a new example to show how the Configuration File API can be used.
|
I prefer ini files more then xml files for settings. I find ini films easier to read in any text editor. This biggest advantage is the free openG ini toolkit. I use a single cluster with all my save data, and just write it into the toolkit VIs. As you cluster evolves, you don't get file mismatch errors. The LabVIEW built in XML primitives will error out in this case. To me this is big, because software always grows and eventually will cause the saved data cluster to change.
|
Re: What are you doing different from last year?
Back to your original question:
All most all of our autonomous routine this year should calls to subvi's. Anything that can possibly be used more then once will be in a subvi so that hopefully easing our debugging, and cutting down repeatedly writing the same task(something we did alot of last year). We are also working with are electrical team to build a test bed with out of just motors and sensors. This way we have a way to make sure all of code works with out having to worry about the mechanical issues. The technical change is to alter the vision code more to increase the speed. Our team has yet to be happy with the speed the vision system runs, but we think it can be slimmed down to run better in telop. |
Re: What are you doing different from last year?
1 Attachment(s)
Quote:
To do this, all you have to do is flatten your data to a string and write that to the INI file, and then read it and unflatten it (just like you would with XML data). The only problem is that you can't read/edit the INI file in a text editor, but that problem is there whenever you use "flatten to string". Attached is some sample code to illustrate what I mean. |
Re: What are you doing different from last year?
Quote:
I didn't see anything in the FRC section that seemed like it. Searching for Configuration found the Write Configuration Settings File and Read Configuration Settings File in Fundamentals\File Input and Output. |
Re: What are you doing different from last year?
Quote:
|
Re: What are you doing different from last year?
Quote:
|
Re: What are you doing different from last year?
Quote:
|
| All times are GMT -5. The time now is 20:48. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi