Difference between revisions of "Programming"

From FRC11 - Mentor Wiki
Jump to navigation Jump to search
 
(72 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Getting Started ==
 
== Getting Started ==
−
=== The IDE ===
+
* [[Programming MORT U presentation to other subteams]]
−
The Integrated Development Environment (IDE), sometimes known as ''the editor'' is your way of editing and compiling your code. On this project, the default IDE that everyone needs to know is the Eclipse IDE.  It's pretty much the standard IDE that has a wide array of useful features for editing a number of different languages.
 
  
−
Another IDE that the team has enjoyed is IntelliJ IDEA, which has some appreciated features that Eclipse lacks by default, such as integrated version control.  However, that can be remedied by plugins for Eclipse, such as [https://www.eclipse.org/egit/ EGit].
+
* [[Programming - Getting Started | Getting Started - Intros and Installs]]
 +
:* MORT U
 +
:* The IDE
 +
:* Java
 +
:* The RoboRIO
 +
:* WPI Lib
 +
:* LabVIEW and the Driver Station/Classmate
 +
:* Version Control/Configuration Management - with Git
 +
:* Day 1 Installs
  
−
There are [https://www.upgrad.com/blog/intellij-idea-vs-eclipse-the-holy-war/ long standing battles] as to [https://dzone.com/articles/why-idea-better-eclipse which IDE] is [https://dzone.com/articles/i-still-prefer-eclipse-over-intellij-idea better].  However, as most of the tutorials available for FRC are given in Eclipse, everyone needs to know Eclipse.
+
* [[Programming - Getting Started Tutorials | Getting Started Tutorials]]
 +
:* Java - Command Based Programming
 +
:* Python
 +
:* IntelliJ
 +
:* Git
  
−
* [[Installing and Using Eclipse IDE]] (mandatory)
+
== Documents Guides and References ==
 +
[https://mort11.com/mentor.wiki/index.php/Java#Documents.2C_Guides.2C_and_References Java/WPILib/etc Documents, Guides and References]
  
−
* [[Installing and Using IntelliJ IDEA]] (optional)
+
[https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=2ahUKEwiJytKAodDgAhWr7YMKHTHIC-kQFjAAegQIChAC&url=http%3A%2F%2Fwww.ni.com%2Fpdf%2Fmanuals%2F374474a.pdf&usg=AOvVaw1akx_AAD22yWbQns7ZTw5m RoboRIO User Manual]
  
−
=== Java ===
+
[[Field Network Settings]]
−
Java is the language we use primarily to program the FRC robots.  It is a general purpose programming language that can do almost any variety of tasks.  It works hand-in-hand with WPI Lib to control the robot.
 
  
−
See the [[Java]] page to learn more about how we use Java.
+
== Code: Examples, Programming Techniques ==
 +
[[Code | Code Page]]
  
−
=== The RoboRIO ===
+
:Links to Project Code, Example Code, Shared Code, in Gitlab, Github, and elsewhere
−
The RoboRIO is a small embedded computer designed to control all functions on the robot, providing a variety input/output (I/O) facilities.
 
  
−
It is the main device that allows us to interface with the [https://wpilib.screenstepslive.com/s/4485 FRC Field Management System] (FMS, sometimes known as ''The Field''), taking commands such as the ''Start Autonomous'' signal or the ''Start Teleop'' signal. The RoboRIO allows us to read our sensors and control our motors and pneumatics. It can also interface with auxiliary on-board computers, such as the Kangaroo, and communicates with the Driver Station via WiFi, or a laptop for programming via Ethernet.
+
== Programming Languages ==
 +
[[Programming Languages]]
  
−
[http://s7d5.scene7.com/is/image/ni/03251405?$ni-card-md$ Picture of the RoboRIO]
+
:Java, WPI Lib, and Python (Intros, and links to individual pages with more info)
  
−
The RoboRIO includes built-in ports for inter-integrated circuits (I2C), serial peripheral interfaces (SPI), RS232, USB, Ethernet, pulse width modulation (PWM), and relays to quickly connect the common sensors and actuators used in robotics. The controller features LEDs, buttons, an onboard accelerometer, and a custom electronics port. You can use LabVIEW to program the onboard dual-core ARM real-time Cortex‑A9 processor and customizable Xilinx FPGA.
+
== Design ==
 +
[[Software Design | How to Design Software]]
  
−
See more on the [[RoboRIO]] page.
+
Ways to design software, including:
  
−
=== WPI Lib ===
+
* Flow Charts
−
(TBD more on the WPI Lib)
+
* Data Flow Diagrams
 +
* Decomposition
 +
* Pseudocode
 +
* Functional Specification
 +
* Object Oriented Design
  
−
* [http://wpilib.screenstepslive.com/s/4485 Getting started with WPILIB]
+
== Source Control ==
 +
[[Git Basics]]
  
−
=== LabVIEW and the Driver Station/Classmate ===
+
Source Control is all about saving, sharing, and managing your source code, whether working independently, or together. It is a significant element of Configuration Management (CM), and Version Control, which deal with managing changes to a Software System (or other systems of information).
−
(TBD more on the LabVIEW, Dashboard, Driver Station)
 
  
−
=== Version Control ===
+
For example, did we want to run this upcoming event after bringing in Billy's latest efforts on the Nav system? Did he finish it? Test it fully? Did Joey mess it up thinking it was fixed? CM provides a structured approach to approving changes to the software baseline and pulling them into a release of the software.
−
(TBD more on the Version control and Git)
 
  
 +
Source Control is the first step in a good CM process. It makes sure we save our work, gets it backed up in case we lose our hard drive, and share our work with others. It allows us to roll back to a previous version of working code (if something was broken badly), identify changes that were made and when, and who made those changes. It can allow us to make sure we have the latest appropriate code from everyone, but we each have to be responsible for getting the latest code.  We have to take this last step of getting latest to make sure our code works with the latest code, and doesn't break anything.
 +
 +
We use '''Git''' for our source control tool, and use [[Code | '''Gitlab''' and sometimes '''Github''']] to host the repositories and provide a web interface.  Although we can use the command line, and the IDEs (IntelliJ or Visual Studio) can perform Git commands, we also use '''Git Extensions''' or '''TortoiseGit''' as GUI front end for Git, which gives us a very nice interface.
 +
 +
== Task Management ==
 +
[https://trello.com/ Trello]
 +
: We will be using Trello to keep track of all our goals, work, bugs, etc.
 +
 +
:* [https://app.slack.com/client/T076TPBUM/C1ENHDC4B/thread/C1ENHDC4B-1578181500.010400 See programming channel in slack to join]
 +
:* Join the 2020 Programming Board.
 +
 +
[https://kanbanflow.com Kanban Flow]
 +
: This is a web browser based tool that implements a digital Sticky Note Board.  Very simple interface with a lot of power to manage.  Tasks are recorded on stickies and are placed in columns. 
 +
:* The defaults allow placement in ''To-Do'', ''Do Today'', ''In Progress'', and ''Done'', but these are tailorable.
 +
:* Subtasks can be placed right in the notes with checkboxes to indicate completion.
 +
:* Drag and drop stickies into different columns to indicate status.
 +
:* Tasks can be assigned to 1 or more people, can have tags or labels that can be filtered, and can be color coded.
  
 
== Project Documentation ==
 
== Project Documentation ==
−
TBD
+
[[2019 Programming Build Season Installs | Build Season Installs]]
 +
 
 +
[[Programming Project Lifecycle | Project Lifecycle]]
  
 
== Additional Topics ==
 
== Additional Topics ==
  
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
−
|[[Index of all Topics]]
+
|[https://mort11.com/mentor.wiki/index.php/Category:Programming Index of all Topics]
 
|[[Beginner Topics]]
 
|[[Beginner Topics]]
 
|[[Intermediate Topics]]
 
|[[Intermediate Topics]]
 
|[[Advanced Topics]]
 
|[[Advanced Topics]]
 +
|[[Programming Wiki To Do List]]
 
|}
 
|}
−
 
−
'''To be moved'''
 
−
[Needs more hierarchy]
 
−
 
−
* [[FTP/SSH/SCP/PuTTY/Keys]]
 
−
::What they are, how they work, how use them and any FRC11 policies.
 
−
 
−
* Tutorials  (all programmers should walk through this)
 
−
:: * Note: you should look through the code some minor items (imports) are glossed over
 
−
:: * [https://www.youtube.com/playlist?list=PLUSdSy9CkwBIiISFMa_ThWmtFCKtYLUE_  FRC Java Command-based Programming Tutorials]
 
−
 
−
* Languages
 
−
:: * [https://wpilib.screenstepslive.com/s/4485/m/13809 FRC/WPI Java]
 
−
:: * [http://wpilib.screenstepslive.com/s/currentCS/m/java FRC/WPI Java Programming]
 
−
 
−
* [[Shells]]
 
−
:: Cygwin,
 
−
:: Bash and
 
−
:: PowerShell
 
−
 
−
* [[VM technologies]]
 
−
:: Oracle VirtualBox, VMware/Fusion, Parallels, KVM, Xen.
 
−
 
−
* [[Linux distributions]]
 
−
:: Red Hat, Debian, (X/K/L)Ubuntu, LXLE, Mint, Zorin, ChruchBase, Arch(Bang), and 'NI Linux Real-Time' (which is a rip of Red Hat Linux with modifications to preempt kernel functions to make it more realtime).
 
−
 
−
* [[FRC controls systems]]
 
−
:: At least IFI to RoboRio.
 
−
 
−
* [[Networking on the robot]]
 
−
:: For cRio and RoboRIO.
 
−
:: Also communicating with co-processors using UDP or TCP.
 
−
:: Plus mDNS.
 
−
 
−
* [[I/O from WPIlib for debugging to Drivers Station (DS) and the DS logs.]]
 
−
 
−
[[Custom USB devices on the Driver Station or digital I/O]]
 
−
:: Also SPI, I2C devices on the RoboRio.
 
−
 
−
[[CameraServer to the Driver Station]]
 
−
:: Live video from a Logitech C920
 
−
:: USB cameras on Linux,
 
−
:: Maybe Grip and
 
−
:: The LimeLight
 
−
 
−
[[Using the Kangaroo for video coprocessing]]
 
−
 
−
[[Navigation using the Navx]]
 
−
 
−
[[Navigation using the RoboRIO sensors]]
 
−
 
−
[[Other RoboRIO sensors]]
 
−
 
−
[[Talon SRX CAN features]]
 
−
 
−
[[PID loops in the RoboRio]]
 
−
 
−
[[PID loops in the Talons]]
 
−
 
  
 
[[Category:Programming]]
 
[[Category:Programming]]

Latest revision as of 19:16, 9 November 2021

Getting Started

  • MORT U
  • The IDE
  • Java
  • The RoboRIO
  • WPI Lib
  • LabVIEW and the Driver Station/Classmate
  • Version Control/Configuration Management - with Git
  • Day 1 Installs
  • Java - Command Based Programming
  • Python
  • IntelliJ
  • Git

Documents Guides and References

Java/WPILib/etc Documents, Guides and References

RoboRIO User Manual

Field Network Settings

Code: Examples, Programming Techniques

Code Page

Links to Project Code, Example Code, Shared Code, in Gitlab, Github, and elsewhere

Programming Languages

Programming Languages

Java, WPI Lib, and Python (Intros, and links to individual pages with more info)

Design

How to Design Software

Ways to design software, including:

  • Flow Charts
  • Data Flow Diagrams
  • Decomposition
  • Pseudocode
  • Functional Specification
  • Object Oriented Design

Source Control

Git Basics

Source Control is all about saving, sharing, and managing your source code, whether working independently, or together. It is a significant element of Configuration Management (CM), and Version Control, which deal with managing changes to a Software System (or other systems of information).

For example, did we want to run this upcoming event after bringing in Billy's latest efforts on the Nav system? Did he finish it? Test it fully? Did Joey mess it up thinking it was fixed? CM provides a structured approach to approving changes to the software baseline and pulling them into a release of the software.

Source Control is the first step in a good CM process. It makes sure we save our work, gets it backed up in case we lose our hard drive, and share our work with others. It allows us to roll back to a previous version of working code (if something was broken badly), identify changes that were made and when, and who made those changes. It can allow us to make sure we have the latest appropriate code from everyone, but we each have to be responsible for getting the latest code. We have to take this last step of getting latest to make sure our code works with the latest code, and doesn't break anything.

We use Git for our source control tool, and use Gitlab and sometimes Github to host the repositories and provide a web interface. Although we can use the command line, and the IDEs (IntelliJ or Visual Studio) can perform Git commands, we also use Git Extensions or TortoiseGit as GUI front end for Git, which gives us a very nice interface.

Task Management

Trello

We will be using Trello to keep track of all our goals, work, bugs, etc.

Kanban Flow

This is a web browser based tool that implements a digital Sticky Note Board. Very simple interface with a lot of power to manage. Tasks are recorded on stickies and are placed in columns.
  • The defaults allow placement in To-Do, Do Today, In Progress, and Done, but these are tailorable.
  • Subtasks can be placed right in the notes with checkboxes to indicate completion.
  • Drag and drop stickies into different columns to indicate status.
  • Tasks can be assigned to 1 or more people, can have tags or labels that can be filtered, and can be color coded.

Project Documentation

Build Season Installs

Project Lifecycle

Additional Topics

Index of all Topics Beginner Topics Intermediate Topics Advanced Topics Programming Wiki To Do List