Control Systems includes: * The software that controls the robot and its mechanisms * The sensing systems that detect the robot environment (e.g. sonar, lidar, switches, encoders, gyroscopes, accelerometers, etc.) * Scouting software: typically an android/ios phone app used during competitions to track the performance of other teams and robots. The Game App is used by the Game Captain to help determine which other teams would form the best alliances. * IT infrastructure - this wiki, software version control, a trouble ticketing system, etc. '''Team Structure''' Control Systems and Mechanical are the two largest sub-teams and each should have at least 3-4 regular full-time mentors and several part-time mentors. Full-time mentors must know Java well. At least one of the mentors must be well versed in embedded systems and digital interfacing to help students understand the sensors they will use and how to connect them to the control computer. In the past, Arduino and Raspberry Pi microcontrollers have also been used for auxiliary sensor processing such as processing data from 9-degrees-of-freedom (9DOF) sensors or to perform machine vision. The mentors are typically organized as one or more lead mentors responsible for the overall team, full time mentors for each of several sub-teams (mechanical, electrical, control systems, operations, etc.), part-time mentors, and one or more faculty sponsors. Meetings are held at AHS in the Tech Ed labs where the students have access to tools and computers as permitted by the faculty sponsor. '''Mentoring Rules''' * Safety always comes first: * When students are working with power tools or powered robots, they '''must''' wear safety glasses. * Powered robots and mechanisms are powerful and can cause injuries; before enabling a robot, students should alert everyone around it by loudly stating "Enabling" and making sure others are not at risk. * A mentor should not be alone with a student; there should always be other mentors (or at least other students) present. * Mentor communications with students outside of meetings (e.g. via email) should copy another mentor. * Robotics should be fun and educational '''Robot Software Development''': An FRC robot consists of: * A 12v sealed lead acid (SLA) battery * A [http://www.andymark.com/product-p/am-2856.htm power distribution system] * A [http://www.andymark.com/product-p/am-3000.htm !RoboRio] single board linux computer * A [http://www.andymark.com/OM5P-AN-p/am-3277.htm WiFi bridge] (aka. radio) * A [http://www.andymark.com/AM14U3-p/am-14u3.htm Chassis] / drive base (COTS or custom) * [http://www.andymark.com/Motor-p/am-0255.htm Powerful Motors] (CIM motors) * Intelligent [http://www.vexrobotics.com/217-8080.html motor controllers] * Other [http://www.andymark.com/Motors-s/260.htm motors] and electrical or [http://www.andymark.com/product-p/am-2979.htm pneumatic] actuators * Safety features (fuses, lights, switches) * Optional: [https://www.arduino.cc/ Arduino] and [https://www.raspberrypi.org/ Raspberry Pi] auxiliary processors * Custom mechanisms designed and built by the students to achieve the current competition goal * Sensors needed to achieve the current competition goal (switches, [http://www.andymark.com/product-p/am-2435.htm ultrasonic] and [http://www.robotshop.com/en/lidar-lite-2-laser-rangefinder-pulsedlight.html lidar] distances sensors, [http://www.andymark.com/product-p/am-3132.htm rotational encoders], [https://www.sparkfun.com/products/10736 accelerometers, gyros], etc.) * [http://www.andymark.com/product-p/am-3025.htm USB Camera(s)] * Custom software written by the students that controls the robot. The software runs within the [https://wpilib.screenstepslive.com/s/4485 FRC WPILib] environment The robot is remotely controlled (like a radio-controlled car) via !WiFi wireless link from a "Drive Station" which is: * A laptop * Joysticks or X-Box game controllers * [https://wpilib.screenstepslive.com/s/4485/m/24192 FRC Driver Station] software (get it [http://www.ni.com/download/first-robotics-software-2015/5112/en/ here]) Team 2537 uses Java to develop its robot software because it is consistent with the HCPSS computer science program. The software runs on a National Instruments [http://sine.ni.com/nips/cds/view/p/lang/en/nid/213308 NI RoboRio] single board linux computer, available at a large discount (but still expensive) from !AndyMark [http://www.andymark.com/product-p/am-3000.htm here]. The Java software runs in an environment developed by Worcester Polytechnic Institute (WPI) known as [https://wpilib.screenstepslive.com/s/4485 WPILib]. WPILib provides a rich but rigid environment to facilitate robotics in the FRC competition environment; it is essentially the OS within which the robot code runs. You can read the [https://users.wpi.edu/~bamiller/WPILib/WPILib.pdf original specification] The !RoboRio/WPILib environment is complex and requires a considerable investment of time to learn. New mentors should spend some time with the [https://wpilib.screenstepslive.com/s/4485/m/23353 FRCSim simulator] and with the [https://wpilib.screenstepslive.com/s/4485 ScreenStepsLive tutorials] to get comfortable with and understand the environment. Although the Electrical team installs and connects other system components such as the [http://www.andymark.com/product-p/am-2856.htm Power Distribution Panel] and [http://www.vexrobotics.com/217-8080.html Talon SRX] motor controllers, the Control Systems mentors should have a good understanding of these components, their capabilities, and their interfaces. '''Training'''- Control Systems students have widely varying levels of software development experience ranging from never having written a line of code to remarkably sophisticated (like a strong undergraduate CS student). During the pre-season, mentors should work with the student leads to divide the team into groups based on their experience levels and map out the pre-season training activities that will best help each group. For example, new students need to learn Java, learn about sensing/sensors, and learn about the basic robot development environment (!RoboRio, WPILib). Students focusing on sensors should learn to read datasheets, the basics of digital interfacing. More advanced students should learn PID control and build skills with machine vision, autonomous navigation, targeting, etc. Training should be '''overwhelmingly''' hands-on with as little power-point/chalkboard as possible; the students have spent all day in classrooms and respond much better to activities (and they are more fun). Activities: * Arduino/mini-bots - there is a good deal of [wiki:ArduinoDevelopment existing training material] that uses inexpensive Arduino single-board computers to teach basic programming (in C) and basic electronics/sensor interfacing. The team owns many Arduinos and training kits as well as several mini-robots that use Arduino controllers and can be programmed to explore autonomous robotics. The mini-bots are small and safe and the students can use them without supervision. These exercises were well received by students, but because the competition environment is very different (Java, !RoboRio, WPILib), have limited applicability to competition robot skills. They are good for learning about sensors and having fun, but there are better training platforms. * Competition-bot trainers - there are (or should be) several cut-down robot platforms from prior competitions that are great for training. These robots include a !RoboRio (the standard linux single board computer required as the robot controller for competition) and the same electronic subsystems and mechanical drive bases used for competition. Competition bot trainers allow students to train in the same environment used for competition which is ideal, but the competition bots are also large, powerful, and can be dangerous; they should only be used by experienced students and generally require mentor supervision. * FRCSim: a sophisticated simulator is available [https://wpilib.screenstepslive.com/s/4485/m/23353 here] that allows students to write software using the standard development environment and run their software on a robot in an advanced 3D simulation. Students can drive the robot, manipulate objects, and test software algorithms. This is a great tool for students to learn the WPILib environment, but requires a fairly powerful computer running Ubuntu linux (attempts at getting it to run well in a VM have so-far been unsuccessful). Students can control the simulated robot using X-box or similar controllers and Joysticks much the same way as a competition robot. * Modular control platforms (aka !BrainBox) have been proposed and would consist of a !RoboRio and electronics package suitable for control of a generic robot. These platforms could be used for training, mechanism development, and eventually placed on robots as modular control packages. These would allow students to develop software for and test individual mechanisms without as many safety concerns as are introduced by large mobile robots. Topics students should learn include: * Java see: [https://www.youtube.com/watch?v=3o8xNfWM8VM&list=PL1CVNaoFuZz3JeCqVX_697L5kCAP4eN3-&index=2 video tutorials] for [https://www.youtube.com/watch?v=TLrybdn3cSM Eclipse] (preferred) or [https://www.youtube.com/playlist?list=PL4hVFxjwylT5anukYMz74jD93yKWsL31r NetBeans] * Basic sensors * Robot Software Development Environment * [https://wpilib.screenstepslive.com/s/4485/m/13503/l/145002-installing-eclipse-c-java Eclipse] * WPILib * Command-based robot * Operator Interface * Robot Main * Robot Subsystems * DIO inputs ([https://wpilib.screenstepslive.com/s/4485/m/13809/l/241875-encoders-measuring-rotation-of-a-wheel-or-other-shaft Encoders], [https://wpilib.screenstepslive.com/s/3120/m/7912/l/85635-using-counters Counters and PWM input], etc.) * PWM outputs e.g. [https://wpilib.screenstepslive.com/s/4485/m/13809/l/241860-repeatable-low-power-movement-controlling-servos-with-wpilib servo control] * Intelligent motor control via [http://www.ctr-electronics.com/talon-srx.html#product_tabs_technical_resources CANTalon] [https://www.ctr-electronics.com/Talon%20SRX%20Software%20Reference%20Manual.pdf# manual] [http://first.wpi.edu/FRC/roborio/release/docs/java/edu/wpi/first/wpilibj/CANTalon.html# javadoc] * Optionally [https://wpilib.screenstepslive.com/s/3120/m/7882/l/88538-overview-of-robotbuilder Robot Builder tools] (see [https://www.youtube.com/user/bradamiller video tutorials] * Optionally [https://wpilib.screenstepslive.com/s/4485/m/23353 FRCSim simulator] * Software techniques * [wiki:MotorControl Motor control] * [https://wpilib.screenstepslive.com/s/3120/m/7912/l/79828-operating-the-robot-with-feedback-from-sensors-pid-control PID closed loop control] * Autonomous navigation (using encoders, 9DOF, etc.) * Targeting systems (using LIDAR, color sensing, etc.) * I2C, SPI, Asynch communications * Machine vision (using [http://opencv.org/ OpenCV]) * Some team cultural notes: * The Rules of Robotics 1. Never believe the students 2. Never believe the mentors 3. It's your code (not the compiler/WPILib/etc.) 4. Never substitute cleverness for clarity. Aka: Don't do anything you wouldn't want to have to fix at 3am. 5. It's better to be kind than to be right [wiki:ControlSystemTrainingCurriculum]