|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Changing autonomous routes through driver's station software
We're a second year team with a single programmer and no strong Labview mentor. Our programmer is sure that he can make some software switches in driver's station and choose one of them after we have placed our robot on the field and it will affect how our autonomous works. I don't think the driver's station can communicate with the robot until teleop, and the only way to change routes in autonomous is through a switch hardwired to the robot that would allow you to tell the autonomous code which routine to run. Any help sorting this out would be greatly appreciated.
|
|
#2
|
||||
|
||||
|
Re: Changing autonomous routes through driver's station software
During Autonomous, the robot still communicates with the computer, reporting that it is in Autonomous state and reading joystick values, if you tell it to. This does not mean that you cannot still control the robot's movements. You can use a switch or a potentiometer in your control system to tell Labview what autonomous instructions to run, just like using a joystick in teleop. The only thing is, you have to have this switch set correctly before the match starts so that you don't have to touch the controls. The robot will start autonomous, read the switch, then run the program without you touching anything. This is how some teams were able to make one autonomous program with instructions for two or more different starting positions in last year's game.
Definitely possible and a good way to be flexible and work with your alliance! Happy building! BTW: The robot is in communications with the computer from the time you see a camera input, until you unplug your driver station from the FMS. |
|
#3
|
||||
|
||||
|
Re: Changing autonomous routes through driver's station software
You can set up multiple autonomous modes using the Digital Inputs on your driver station, shown below.
![]() The example autonomous mode already has the Digital Inputs in the code, you just have to make the case structure, and then have your autonomous code in there. ![]() The switches just have to be set before the match starts. Hope this helps. |
|
#4
|
|||
|
|||
|
Thanks for the quick, and great, responses. I will let our programmer know that he's the man!
|
|
#5
|
|||
|
|||
|
Re: Changing autonomous routes through driver's station software
To add to this. The information above is correct. The I/O values on that tab will mirror the Cypress settings with a Cypress is plugged in, but are inputs when no Cypress board is used. These virtual I/O values are transmitted to the robot and I believe they are latched during auto. So set them during disabled period before the match starts.
The other approach is to use network tables or smart dashboard variables. This is somewhat more flexible, but not necessarily better. Greg McKaskle |
|
#6
|
||||
|
||||
|
Re: Changing autonomous routes through driver's station software
We use the analog slider, but i couldn't tell you how they worked (I don't know how they work in the code)
|
|
#7
|
|||
|
|||
|
Re: Changing autonomous routes through driver's station software
Quote:
We had a problem last year when our autonomous code was looking for a motor speed from the DS via an SD call. In testing, autonomous worked fine. On the field, it never did anything. Maybe I just answered my own question. Does the DS data get sent in autonomous, while the SD data is not? Tim Jordan |
|
#8
|
|||
|
|||
|
Re: Changing autonomous routes through driver's station software
Smart Dashboard (SD) is entirely independent of the DS and field modes. It will operate from the time the client(s) and server init until they shutdown. It operates between dashboard and robot and the DS in not an SD client.
The DS and robot are in constant communication during disable, auto, and tele. But during auto, the joystick data will not make its way to the user code, and neither will the Cypress I/O. The joystick and Cypress data will be the last packet received during disable. Greg McKaskle |
|
#9
|
|||
|
|||
|
Re: Changing autonomous routes through driver's station software
Ah, just dug up the code. We were looking for the throttle position from one of the joysticks.
Thanks Greg! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|