![]() |
Re: Share you Autonomous
2 Attachment(s)
We used a record and replay system for autonomous this year. Attached are the complete projects for the custom dashboard and robot.
There is a tab on the dashboard for starting and stopping the recording process. It uses the SmartDashboard to communicate between the dashboard and robot. |
Re: Share you Autonomous
Quote:
I forgot to mention the best part is that the script file is just a text file that resides on the cRio. The cRio has a built in ftp server, so you can change these sequences, and re-run without connecting to labview, compiling, etc. The whole process to change the script and ftp to the cRio can be done in about a min. We have done this while queuing for a match. It takes less time to change the auto code, and download, than it takes to charge the pneumatic system. We also have a dashboard selection that chooses between 7 automodes. |
Re: Share you Autonomous
Quote:
Code:
#Load the shooting mechanismInstead you can write your command to tell a different process the same thing, letting the script continue. It then can meet back up with the WAIT_ON_LOAD command to make sure its ready to shoot. In this way, both the driving and the camera code are running in parallel with the code to load the shooter. Essentially you can write your commands to set off a parallel part of the code and continue. If all of the main robot actions are handled in a separate process, this becomes much easier to do (and it carries over to teleop). |
Re: Share you Autonomous
any reason you choose to save it on the crio and not just read it from a laptop?
|
Re: Share you Autonomous
Yes, I don't know how to get the cRio to read a file over the FMS to the driver station. Maybe there is something there already, but I have never tried it.
|
Re: Share you Autonomous
You can implement your own UDP/TCP connection to communicate between the dashboard and the cRIO. We have done this in labview when we needed extra vision processing computing power. Also, the smart dashboard may have similar capabilities.
|
Re: Share you Autonomous
Quote:
|
Re: Share you Autonomous
Quote:
What I was trying to ask is if you could do something like: Code:
if goal is hot: |
Re: Share you Autonomous
Quote:
TwoBallTwoHotGoalCommand Code:
HotGoalFinder finder = new HotGoalFinder();Code:
public class DecisionCommand extends Command {Code:
public interface IProvidesDecision { |
Re: Share you Autonomous
1 Attachment(s)
This isn't our main autonomous (our main autonomous uses vision tracking to detect the hot goal and shoot at it; don't have access to the team's programming computer atm and left my flash drive in it) but it's a 2-ball autonomous VI that wasn't used in the final code. It's pretty basic as it was written in a blank VI and so I didn't get to use global variables or subVIs. See if it helps.
|
Re: Share you Autonomous
Quote:
in twoBallHot.script Code:
SHIFT onCode:
DRIVE_STRAIGHT 75 0Code:
DRIVE_STRAIGHT 75 0 |
Re: Share you Autonomous
Our one ball hot check script was this:
Code:
#One Ball, with Hot Checking |
Re: Share you Autonomous
Quote:
|
Re: Share you Autonomous
Quote:
Here's something you could do if you wanted to be avoid duplicating the end of command conditions in the subsequent if: Code:
class Continuable extends Command{ |
Re: Share you Autonomous
Quote:
|
| All times are GMT -5. The time now is 23:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi