2017년 8월 19일 토요일

FTC App Inventor


National Resources

Sample Robots. 
 FIRST has published instructions for 

⦁ a simple K9 robot that is compatible with the new technology.
⦁ a PushBot that uses the new technology
  ⚬ Getting Started
  ⚬ Building the Robot
  ⚬ OpModes and Electronics
  ⚬ Wiring the Robot

Software
Information on FTC App Inventor from Tom Eng at FIRST


The files for running the App Inventor, locally on your own computer, with the FTC Design components are available for download. App Inventor is a visual design tool that lets you create Android apps very quickly and intuitively. This version of the App Inventor is designed to run locally on your laptop, using some software known as VirtualBox (available for FREE from Oracle). This allows you to use the App Inventor, even if you do not have an Internet connection.

The files are located at the following URL: Welcome to the FTC App Inventor Download Page!

Start with the appropriate installation guide.  You want to read either Windows or Mac version of the FTC Training Manual that explain how to install the App Inventor locally onto your computer.

Then download and read the App Inventor Training Manual after the previously mentioned documents.

IMPORTANT: Please direct all FTC App Inventor questions to the FIRST community (using this App Inventor sub-forum)! Do not expect to receive support from the MIT App Inventor community for FTC App Inventor-related questions. There are some FTC App Inventor experts on this sub-forum to assist you with your questions.

List of FTC-specific software components in App Inventor for FTC

Modern Robotics has posted a diagnostic program called Core Device Discovery that you may find useful.  It communicates directly with the Core modules using a USB port on you Windows or Mac computer.  I noticed two things while downloading and installing the program:

1. Norton antivirus was suspicious of the program because it found the number of Norton users with the file low given that the file was two months old so it quarantined the file. I overrode the quarantine and successfully invoked the application on my Windows 7 laptop.

2. It took a very long time to install the driver after I plugged in the USB cable and turned the robot's power on but it eventually did so successfully.
The application seems to be working fine and should be quite useful.


Online Instruction
In cooperation with FIRSTIntelitek has released a set of online courses that cover FTC App Inventor as well as Java.


Module 2: App Inventor Programming


0. Introduction to Module 2
1. Setting Up App Inventor
2. Working with App Inventor
3. Building a Basic Op Mode App
4. TeleOp
5. Touch Sensor
6. EOPD Stop at Line
7. EOPD Follow Line 

Oregon Resources

Information about FTC App Inventor from Bruce Schafer at ORTOP

Along with the new controller electronics, FIRST has provided two programming environments. One is the powerful Android Studio Java environment. Using this environment involves a fairly complex installation process and becoming familiar with Java line-by-line programming as well as certain aspects of Android programming libraries. 
The other choice is FTC App Inventor, which is based on MIT App Inventor. This environment is a drag-and-drop block programming environment, which has similarities to the LEGO Mindstorms NXT and EV3 programming environments.  Here are some reason to consider using App Inventor:

⦁ Team members already have plenty to learn
  ⚬ Understanding this year’s game
  ⚬ Designing & building a robot using Tetrix
  ⚬ Creating custom parts
  ⚬ New electronics
⦁ Coaches and mentors may not have a programming background
⦁ App Inventor can be a learning step to build skills and confidence

Normally, App Inventor is cloud based, which has some advantages but could be a problem at schools or tournaments where Internet access is limited. In contrast, the current FTC App Inventor beta version can be installed on a laptop and once the installation is complete no Internet connection is required. Note: FTC App Inventor is accessed using a web browser even when though its use does not involve the Internet.  Google Chrome is the recommended browser. Other browsers may not work.
Resoures for Velocity Vortex season:

⦁ Vuforia files
  ⚬ FTC_2016-17.xml
  ⚬ FTC_2016-17.dat

YouTube lessons on using App Inventor to create op modes including one for driving a robot during Teleop Period

Created by Team Total Chaos in Portland, Oregon

YouTube lessons on using App Inventor to create programs for the Autonomous Period
Created by Bruce Schafer, Volunteer Executive Director of ORTOP. 

These lesson use the K9Bot but other designs should work that have a motor on each side that is connected to a wheel and one or more servos.

⦁ 
Lesson 1: Introduction to Autonomous Programming


 Lesson 2: Creating a Linear Op Mode


 Lesson 3: Completing a Linear Op Mode


 Lesson 4: Creating a Loop Op Mode

 Lesson 5: Partial Conclusions and Recommendations

 Lesson 6: Using Motor Encoders
 (uses the version of App Inventor posted on November 5, 20151)

 Lesson 7: Using Color Sensors
 (uses the version of App Inventor posted on November 5, 20151,5)

 Lesson 8: Using Vuforia to find targets
 (uses the version of App Inventor posted in November 20164)

 Lesson 9: Using Vuforia to determine turn angles to targets
 (uses the version of App Inventor posted in November 20164)

Update Oct. 2016: The versions of App Inventor released in Fall 2016 have several changes that affect the lessons above.: 

 It no longer needs calls like WaitOneFullHardwareCycle. In fact, this feature has been removed. The calls to this function described in the videos can be left out. 
 A new feature has been added to FTC App Inventor -- UpdateTelemetry, which is found in the RobotController folder in Blocks mode.  When you create a linear opmode, a call to this procedure must be added at the bottom of any loop containing calls to TelemetryAddNumericData or TelemetryAddTextData. Otherwise, the telemetry will not be transmitted to the Driver Station. 
 You should indicate that you have created an Autonomous OpMode by checking the Autonomous box after selecting your opmode component in Designer Mode.  This will assure the opmode is added to the correct list on your Driver Station.
    Sample project files
    You can download and import these files into FTC App Inventor


     Linear Op Mode that can be used during the autonomous period -- demonstrated in Lesson 1 and described in Lessons 2 and 3 above2
     Loop Op Mode that can be used during autonomous period -- demonstrated in Lesson 1 and described in Lesson 4 above
     Linear Op Mode that uses motor encoders to autonomously drive and turn K9Bot -- demonstrated and described in Lesson 62
     Linear Op Mode that uses color sensor to find blu line after passing red line -- described and demonstrated in Lesson 72,5
     Linear Op Mode that tests color sensor and reports values to drive station while leaving motors off -- used to develop lesson 73
     Linear Op Mode that uses Vuforia to detect which of the four Velocity Vortex targets is in view -- described and demonstrated in lesson 84
     Linear Op Mode that uses Vuforia to detect which target is in view, the x, y & z distances to the center of the target and calculates the turn angle to the center -- described and demonstrated in lesson 94

    Footnotes 

    1. The latest version of App Inventor can be found on the App Inventor Download Page under VirtualBox Applicance Files.

    2. This file was created using the App Inventor available in the fall of 2015. The version of App Inventor released in September 2016 no longer needs calls to WaitForNextHardwareCycle or WaitOneFullHardwareCycle.  In fact, these blocks are no longer available from the menus. If you import the AIA files above, any use of these blocks will be greyed out.  They can be deleted if you are using the current ersion of App Inventor.. You should also add a call to UpdateTelemetry after each sequence of calls to "TelemetryAdd..." as the current version will not transfer the telemetry information to the Driver Station phone until this call is executed.

    3. This file has been updated to conform to the App Inventor used during the 2016-17 season.

    4. Update: A beta of an updated FTC App Inventor was released in late January 2017, which fixes a bug caused the Vuforia images to overflow if loaded more than once. You will find it available for download at https://frc-events.firstinspires.org/FTCImages/2016/beta

    5. The op mode in this video uses a single color sensor, a Modern Robotics Color Sensor, which is connected via an I2C port. I2C is an interface that requires that each device connected to it have a unique address. The default I2C address for the Modern Robotics Color sensor is 3C hexidecimal or 60 decimal, which is what App Inventor assumes if it is not told otherwise. If you use more than one I2C you must assign a different address to each sensor. You can leave one of them at 3C and assign the others a different hexadecimal address using Modern Robotics Core Device Discovery utility. You must then inform App Inventor of your choices using the Set I2C Address to give the address  in decimal of each reassigned color sensor in the initialization part of your op mode.
    If you have questions about FTC App Inventor send email to ftcappinventor@ortop.org


    댓글 없음:

    댓글 쓰기