Autonomous (Iterative)

Heres what I want the robot to do (we’re coding using the holonomic vi) (we need it to read 3 true false switches (1 for each section of the field) (the only difference is the time for steps 3&7)
1.Drive robot forward (for a short time) (0 degrees)
2.Release a solenoid.
3.Run 2 motors (separate from the holonomic drive and hooked up to spike relays for a short time) (+1 value)
4.Drive robot left (for a short time) (270 degrees)
5.Drive robot forward (for a short time) (0 degrees)
6.Release a solenoid.
7.Run 2 motors (separate from the holonomic drive and hooked up to spike relays for a short time) (+1 value)
8.Drive robot left (for a short time) (270 degrees)
9.Drive robot forward (for a short time) (0 degrees)
10.Release a solenoid
11.Stop all motors and end autonomous mode

Questions
1.Ideas on if it can be done in the required 15 sec.
2.If someone can post an example picture (in labview) or talk me through making it

The name of the forum makes it sound like you want to do this using the Iterative callback style of autonomous. Unless you really know what you are doing, I’d actually suggest doing it in the Independent VI.

I’ve made some suggestions below marked with **s.
Greg McKaskle

Heres what I want the robot to do (we’re coding using the holonomic vi) (we need it to read 3 true false switches (1 for each section of the field) (the only difference is the time for steps 3&7)
1.Drive robot forward (for a short time) (0 degrees)
** Call the Drive VI to set the motor speeds. Wire the error I/O to a Wait and Feed VI with the seconds that you want the motors at that speed. If you have encoders or other, more reliable method, you can wire the error I/O to a loop that sleeps for a millisecond or two at a time and polls the encoder.
2.Release a solenoid.
** Wire the error I/O from the Wait and Feed to the Set Solenoid. It seems like you also want to set the Drive motors to 0 here. Again, use the error I/O for sequencing.
3.Run 2 motors (separate from the holonomic drive and hooked up to spike relays for a short time) (+1 value)
** Use the error I/O to sequence and Motor Set Speed to rearm.
4.Drive robot left (for a short time) (270 degrees)
** Repeat the pattern of setting Drive speeds, then Wait and Feed.
5.Drive robot forward (for a short time) (0 degrees)
6.Release a solenoid.
7.Run 2 motors (separate from the holonomic drive and hooked up to spike relays for a short time) (+1 value)
8.Drive robot left (for a short time) (270 degrees)
9.Drive robot forward (for a short time) (0 degrees)
10.Release a solenoid
11.Stop all motors and end autonomous mode

Questions
1.Ideas on if it can be done in the required 15 sec.
** My recommendation is to try and drive it with a joystick. If a decent driver can’t do it, then I doubt the computer can. The computer may ultimately be more consistent, but it is unlikely to be faster, more adaptive, or better at driving. This also helps to figure out the speeds and times that make sense. In fact, you may wish to plot or record the joystick values as the driver does the task. You may choose to simplify the values, but in fact ramping up the speed or other subtleties may turn out to be quite important for consistent driving. Better to mimic those in the SW after you know what they are than try to code them in blindly.
2.If someone can post an example picture (in labview) or talk me through making it

** I’ve attached a picture of the first few steps. I’d also also highly recommend making some of these tasks into higher level subVIs – things like ramping up speed or going in a particular direction for time could easily be parameterized into reusable blocks.

Good luck with Auto.
Greg McKaskle





Thanks I’ll test the code on the robot if it works I’ll spotlight your post, if not thanks anyways

How would someone go about recording and plotting the joystick outputs. My team has been working to try and figure this out. If you could provide us with an example, that would be incredibly helpful.
Thanks.

What I meant in the post above was to connect the independent axes of the joystick to a cluster and connect that to a strip chart on the panel. It is also possible to add them to an array and store them in memory.

Greg McKaskle

I am absolutely confused about autonomous and i have no idea where to start with the autonomous. I know what i want to do just not how to implement it. I’ve searched through these forums for autonomous and there aren’t any posts.

I would suggest doing step by step and asking detailed questions. Begin by turning some motors on for a period of time, then off again. Do this on blocks at first, experiment, and ask questions if you se something you do not understand.

Greg McKaskle