From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming for autotomous

During the part of the autotomous challenge how are we to tell the robot how to move and function?  How do you tell the robot to move say left but not run into the wall and go straight and maybe look for the sensor mounted in the center of the play area?  We are looking for ideas for the autotomous part of our code.  Thanks

0 Kudos
Message 1 of 2
(4,275 Views)

Terry,

The first place to start is with the Templates and Template Implementation Examples that can be found at C:\Program Files\National Instruments\LabVIEW 2009\examples\FTC Toolkit.  The example FTCAutoEnc.vi is a good place to start when trying to determine how to do dead-reckoning movements.  As far as detecting objects the Sonar sensor is a good choice.  In the code snippet bellow I've shown how we can compare the distance output by this sensor to determine if our motors should keep moving or stop. 

sonar stop.png

More complicated Autonomous programs can make good use of the State Machine Architecture.  In all cases these codes can be easily added into the FTCAutoBasic.vi template in the Flat Frame labeled Autonomous program goes here.

show auto.png

I hope this helps,

Mark

Mark
NI App Software R&D
0 Kudos
Message 2 of 2
(2,796 Views)