Difference between revisions of "FTC:Software"

From Project Robotica
Jump to navigation Jump to search
Tag: Reverted
Tag: Manual revert
Line 46: Line 46:
OnBot Java is a method of programming in which a team connects to a robot controller through direct wifi to edit their program. This direct connection means that a team doesn’t have to redownload the new code between each change as they are directly changing the code on the robot controller itself. This is very convenient and can speed up the programming process. However, this limits the ability to use version control software such as Git (e.g. GitHub, GitLab, or BitBucket) to store versions of the code in the cloud. This has some risk; if the robot controller is damaged or lost, then you are unable to recover the code.
OnBot Java is a method of programming in which a team connects to a robot controller through direct wifi to edit their program. This direct connection means that a team doesn’t have to redownload the new code between each change as they are directly changing the code on the robot controller itself. This is very convenient and can speed up the programming process. However, this limits the ability to use version control software such as Git (e.g. GitHub, GitLab, or BitBucket) to store versions of the code in the cloud. This has some risk; if the robot controller is damaged or lost, then you are unable to recover the code.


[[file:OnBot.jpg|500px]]
[[file:onbot.jpg|500px]]


Above: Screenshot from OnBot Java
Above: Screenshot from OnBot Java

Revision as of 20:05, 11 August 2021

Software is one of two main components(the other being Hardware) of creating a robot for competition. In FIRST Tech Challenge, teams must program a 30-second fully autonomous period as well as driver controls for the 2-minute driver-controlled period. These can both be programmed using one of three different applications on a Windows or Mac system. Teams will usually edit their code before a tournament, but adjustments are also often made during tournaments using a laptop.

Programming Software

Teams have three options for programming software that they can use to adjust or create new code. These programs are Blocks Programming Tool, OnBot Java, and Android Studio. The primary differences between these programs are the programming interface and how accessible each one is.

Blocks Programming Tool Onbot Java Android Studio
Difficulty to use/learn Simpler(Simular to Scratch) More difficult (Must know Java) More difficult (Must know Java, can use Bit software)
Coding Structure Block Based Text based Text based
Individual Benefits User friendly Quicker (Program directly on robot controller) Used in real software development industry
Code Location Directly on the robot controller Directly on the robot controller On a computer and gets uploaded to the robot controller

Blocks Programming Tool

“A user-friendly, graphical tool for programming a competition robot. The Blocks Programming tool is the fastest and easiest way to get started with programming.” [1]

The Blocks Programming Tool is a program that allows users to edit code using a block-based editor and is considered the easiest program to learn. Its block-based programming is very similar to Scratch, making it very familiar to many programmers who have used Scratch in the past. Unfortunately, code made with Blocks Programming tool is programmed directly onto the robot controller. This means that you can’t upload to a cloud such as Bit, which can be very useful, and it also means that if the robot controller is lost or damaged, teams won’t be able to recover the code.

BlocksProgramming.png

Above: Screenshot showing basic movement in Blocks Programming Tool

OnBot Java

“An easy-to-use, browser-based Java development tool. OnBot Java lets users program in Java without the need for installing Android Studio.” [1]

OnBot Java is a method of programming in which a team connects to a robot controller through direct wifi to edit their program. This direct connection means that a team doesn’t have to redownload the new code between each change as they are directly changing the code on the robot controller itself. This is very convenient and can speed up the programming process. However, this limits the ability to use version control software such as Git (e.g. GitHub, GitLab, or BitBucket) to store versions of the code in the cloud. This has some risk; if the robot controller is damaged or lost, then you are unable to recover the code.

Onbot.jpg

Above: Screenshot from OnBot Java

Android Studio

“Android Studio is an integrated development tool that lets teams create Java (text-based) programs for their competition robots. Android Studio offers great flexibility when writing a program for a competition robot.” [1]

Android Studio is a program that allows users to edit code in a text-based editor. Since it is used by real developers in the software industry, it is preferable for team members who are interested in software development as a career. It also allows for more flexibility in coordination with version control programs such as git to store the code in the cloud, allowing teammates to edit and commit the code from different locations. If you already have experience working with Java or are willing to learn, this is the recommended software choice.

0j7hk.jpg

Above: Screenshot of a basic teleop in Android Studio

Version Control

When writing programs, it is a good idea to back up work so that you can revert to old versions if necessary. This can be completed with a versioncontrol (also known as source code control) application called git. This is useful because it gives you the ability to view your past work or revert changes if something goes wrong. It also allows for multiple projects to be worked on without interfering with each other. This feature is called 'branches'. Android Studio works as a user interface for git, but teams could also use an application like Sourcetree to manage their source code.

Additional Resources

References

  1. 1.0 1.1 1.2 "FTC Programming Recourses". firstinspires.org. Retrieved 29 July 2021.