TECompetitionTips

From GT RoboJackets

Jump to: navigation, search

Contents

Tips

DON'T PANIC!!!
The competition is designed to be relatively easy while still offering a challenge. Here are some tips to help you out.

SubVIs

It is strongly encouraged that teams make use of subVIs. Below is ultimately what will happen to your VIs when you don't use subVIs.

Adding some front panel interface

That mess can be cleaned-up by moving some functionality to subVIs. SubVIs are just like subroutines in other languages, are themselves VIs, and can be added to another VI in the same manner that any other function is added. Place the VI on the block diagram, then connect-up its inputs and outputs. Please see Creating and using SubVIs for more information on creating subVIs.

For the competition you could try putting code to check the light sensor and the sonar in separate subVIs that you can include in your main VI

Loops, Loops, Loops

Since your robots will be continuously checking sensors and reacting the the environment loops are going to be very important. But be careful how you use them! For one, outputs that are "tunneled" out of a loop don't have their value set until the loop is stopped (the line connected to the loops stop sign is true). If you need to share data between loops considering using local variables.

Hysteresis

Hysteresis is the idea of having two thresholds for performing an action in response to another variable. For example, in your light sensor subVI you could create hysteresis by asserting that you see a line (maybe by setting a Boolean output high) when you the light value is above one threshold but not de-asserting that output until the value crosses below a lower threshold. In such a manner you trigger for a range of values instead of just one.

Hysteresis will be a great tool to use while programming your bots as it helps to deal with noise and it prevents you from asserting and de-asserting values because of slight changes in the output (something called de-bounce).

Behaviors

As stated in the sessions behaviors are the best way to view this competition. Your robots will need to accomplish several task:

  • Search for cups with sonar (Wander/Search)
  • Push those cup outside the boundary (PushOut)
  • Look for the boundary (AvoidLine)
  • Strategy for blue cups (This one will be up to you guys)

In the simplest case this comes out to three behaviors the robot must be able to perform, Wander/Search, PushOut, and AvoidLine. At any given time the robot will be performing one of those behaviors. You can switch behaviors by looking at sensor data. Within each behavior the robot will perform some action such as backing up and turning (Hint: AvoidLines), or driving in the direction that maximizes the sonar output (Hint: PushOut). What happens in each behavior though is ultimately up to you all.

In general each behavior is best implemented as a subVI and a case structure can be used to switch between (or arbitrate) amongst various behaviors. But be careful of how you handle cases where the sensor select more than one behavior (say you see a line and cup). In those cases you may want to try adding a hierarchy to your behaviors, say making the robot always choose the AvoidLine behavior over PushOut.

Robot Time vs. Human Time

One of the reasons the robots will ultimately conquer the humans is the speed at which their silicon brains can perform task. Keep this in mind when the robot doesn't behave as expected. The robot can react to actions in the world on the scale of 100s of microseconds - a bit faster than humans. For example think about what the robot is thinking when it comes to a line.

Putting it all together

Success in robotics depend heavily on how your put all the parts a of project (sensing, actuation, mechanical robot build) together. Consider thinking first about how the whole system will come together and how each part will interact rather than building up from the components. Robotics requires a deep integration of systems and its therefore advantageous to look at the whole system. Also the KISS principal is in play here. You can make your robot achieve complex behavior by cleverly integrating several simple behaviors. For example, combining relatively straight forward systems for vision, motion control, and actuation in a thoughtful manner can give rise to soccer playing robots.

Lastly

DON'T PANIC!

Links

Personal tools