FTC RoadRunner 1.0 Install and Tuning Walkthrough

FTC RoadRunner 1.0 Install and Tuning Walkthrough

Setting Up Road Runner from Scratch on a Test Robot

Introduction to the Video

  • The video introduces the process of setting up Road Runner from scratch on a test robot, including downloading the project and creating a new project in Android Studio.
  • Overview of the test robot features, including a mechum drive with three dead wheels and an IMU on the control hub.

Calibration and Tuning Process

  • Discussion about using FTC Dashboard for visualizing graphs, changing values, calibrating encoders, and finding constants for autonomous driving.
  • The entire setup process is expected to take about an hour; viewers are encouraged to follow along to set up their own robots.

Downloading Road Runner

  • Mention of using Road Runner version 1.0 due to its easier setup compared to previous versions.
  • Instructions for downloading Road Runner from GitHub, emphasizing that it includes the FTC robot controller repository which is regularly updated.

Setting Up in Android Studio

  • Steps for extracting downloaded files into a designated folder before opening them in Android Studio.
  • Guidance on how to open the project in Android Studio and wait for dependencies to build properly.

Using Git with Project Files

  • Explanation of how to create a new git project after building is complete; initial commit details are shared as part of version control practices.
  • Description of how changes made in files will be reflected visually in the Explorer view within Android Studio.

Overview of Test Robot Configuration

  • Introduction of the test robot named "Bob," which has four mechum wheels and specific configurations like dead wheels for movement tracking.
  • Details about motor placements and encoder usage; only dead wheels have encoders while drive motors do not.

Final Setup Steps

  • Confirmation that all necessary components are ready for testing once Road Runner is downloaded and running alongside the configured robot.

Quick Start Installation and Configuration

Overview of Installation Process

  • The speaker discusses the quick start installation process, emphasizing that it's better to copy files into a new project rather than installing into an existing one.
  • They mention the importance of carefully reading through the setup instructions, as many details are only mentioned once, which could lead to missing critical information.

Seeking Help and Resources

  • For assistance, viewers are encouraged to join a Discord community for support or report software bugs on GitHub. However, most issues can be resolved by revisiting configuration settings.

Hardware Configuration Setup

  • The focus shifts to configuring classes for hardware compatibility with the robot. The speaker notes that Road Runner supports various hardware configurations.
  • The initial setup involves configuring basic hardware components, specifically starting with the mechum drive file and then moving on to the three dead wheel localizer.

Configuring Mechum Drive

  • The speaker highlights specific "to-dos" in yellow within the mechum drive file that need addressing. They stress following these tasks in order.
  • Emphasis is placed on ensuring motor names match those specified in the driver station configuration for proper functionality.

Driver Station Configuration Insights

  • A brief overview of how to access driver station configurations is provided. It includes naming conventions for motors and potential discrepancies between Android Studio and phone configurations.
  • The speaker prefers changing motor names directly in Android Studio rather than on the phone for consistency across platforms.

IMU Orientation and Localizer Setup

  • Instructions are given regarding naming conventions for motors and setting up an Inertial Measurement Unit (IMU), particularly its orientation based on physical mounting.
  • Details about filling out IMU orientation values are shared, including how USB direction affects configuration based on control hub positioning.

Finalizing Drive Class Variables

  • The discussion continues with setting up drive class variables according to documentation guidelines without needing additional changes.
  • Different localization methods are briefly explained; they decide on using three dead wheels plus an IMU for tracking position effectively.

Configuring Robot Encoders and Motors

Understanding Encoder Configuration

  • The process of changing names for localizers or effect motor names is necessary, particularly for the three dead wheel localizer.
  • Identifying which motor ports the encoders are connected to is crucial for proper configuration; visual inspection of wiring helps in this process.
  • It is recommended to connect parallel encoders to ports zero and three on the control hub due to their faster reading capabilities compared to other ports.

Tracing Connections

  • The left encoder cable connects to Port Zero, while the right encoder connects to Port Three, aligning with the drive motors' configuration.
  • The left front drive motor is confirmed at Port Zero, and the right front drive motor at Port Three; additional tracing reveals that a perpendicular encoder connects at Port One (left back drive).

Setting Up Localizers

  • Completing the setup involves removing yellow text comments in Android Studio that indicate tasks yet to be completed.
  • After configuring ports for each encoder, it's time to test if wheels are running correctly using a mechanim direction debugger.

Testing Motor Directions

  • A mechanim direction debugger allows testing of motor spin directions; manual adjustments may be needed based on observed behavior during tests.
  • The need may arise to reverse some dead wheel directions or mechanim drive motors based on initial tests conducted on the field.

Troubleshooting Errors

  • An error occurs when attempting to initialize due to code changes not being pushed; reconnecting and rebuilding through Android Studio resolves this issue.
  • After successful build completion, reinitializing allows testing without errors; instructions appear on-screen guiding through individual motor spins.

Observations During Testing

  • Initial tests reveal that both left side wheels are spinning backward while right side wheels spin forward; adjustments will be required for correct operation.

Robot Configuration and Testing Process

Adjusting Wheel Directions

  • The team discusses the need to reverse both left drive wheels and two parallel dead wheels for proper robot movement.
  • They confirm that adjustments are necessary for the left front and back wheels, as well as the parallel dead wheels in their localizer system.

Utilizing FTC Dashboard

  • Introduction of the FTC dashboard tool, which aids in tuning and configuring the robot with real-time graphing capabilities.
  • The dashboard comes pre-installed with Roadrunner, requiring a Wi-Fi connection to the robot controller for access.
  • Users will not have internet access while connected to the robot's network but can still use its local website.

Configuring Robot Settings

  • The presenter explains how to navigate through different views on the FTC dashboard, emphasizing configuration changes and graph usage.
  • Importance of ensuring proper setup of the dashboard is highlighted; troubleshooting may be needed if it doesn't work initially.

Conducting Push Tests

  • After hardware configuration, push tests will be conducted to assess how code changes affect robot behavior.
  • Explanation of feedforward control systems: testing various power levels (1%, 5%, 10%) helps predict future movements based on current performance.

Tuning Process Overview

  • The tuning process involves understanding how far motors move relative to encoder ticks, essential for accurate navigation.
  • Empirical testing is emphasized; determining motor response at specific power levels is crucial for effective autonomous operation.

Robot Calibration and Testing Procedures

Forward Push Test

  • The process begins with calculating inches per tick to ensure the robot's wheels do not slip, emphasizing the importance of free motor spin.
  • The encoder directions are set correctly before initiating the forward push test, ensuring accurate movement tracking.
  • The robot is carefully pushed across the field while maintaining alignment with the field edges; speed is not a priority for this calibration step.
  • After pushing, the number of ticks traveled (39,832 ticks) is recorded to correlate movement distance with encoder data.
  • A tape measure confirms that the robot moved 17.75 inches; calculations for ticks per inch are performed using this measurement.

Calculating Inches Per Tick

  • The calculation for inches per tick involves dividing total inches by total ticks, resulting in a small fraction indicating precise movement control.
  • This value indicates how many ticks correspond to an inch of movement, which helps in programming expected movements based on encoder feedback.

Lateral Push Test

  • Following the forward push test, a lateral push test is conducted to determine lateral inches per tick by repeating similar procedures as before but moving sideways instead.
  • The setup mirrors that of the forward test; however, adjustments are made to ensure proper alignment for lateral measurements.

Forward Ramp Logger

  • Transitioning from measuring distance to assessing velocity over time involves gradually increasing power and observing changes in speed.

Robot Testing and Calibration Process

Setting Up the Robot for Testing

  • The speaker mentions having a safety net in place, using a bag of dog food as a buffer to prevent damage if the robot doesn't stop in time.
  • Code needs to be pushed again due to changes in the "inches per tick" value, which is essential for accurate readings during tests.

Conducting the Forward Ramp Logger Test

  • The forward ramp logger test begins after ensuring that the robot driver station initializes without exceptions; power increases gradually as it moves forward.
  • If the robot starts off crooked, adjusting its initial aim can help achieve a straighter drive; this is important for collecting accurate data.

Analyzing Test Results

  • The longer the test runs, the more accurate the resulting values will be; results are visualized through graphs on a web page dedicated to Road Runner forward ramp regression.
  • Two critical values are derived from testing:
  • The voltage required to initiate movement (KS).
  • The slope of speed increase relative to applied voltage (KV).

Understanding Voltage and Speed Relationship

  • A static friction threshold must be overcome before movement occurs; KS is determined at 7 volts for this specific robot setup.
  • The relationship between voltage and ticks per second is linear, allowing for straightforward calculations based on collected data points.

Data Management and Value Extraction

  • Tools are available within the software to exclude outlier data points that may skew results; users can select regions of data for removal.
  • After running tests, KS and KV values need to be inputted into code. KV represents ticks gained per voltage increase while KS indicates starting voltage needed for motion.

Preparing for Lateral Ramp Testing

  • Next steps involve determining lateral inches per tick using a lateral ramp logger, which automates leftward movement similar to previous tests.

Robot Code and Testing Procedures

Lateral Ramp Logger Setup

  • The speaker decides to push code immediately to save time, indicating a hands-on approach to testing the robot's functionality.
  • After restarting the robot and Driver station, they prepare to run tests on the lateral ramp logger, emphasizing the importance of stopping before reaching the end of the test.
  • Parameters must be inputted correctly for effective data collection; simply clicking "latest" will not yield results without prior parameter setup.
  • The expected velocity is derived from feed-forward calculations in ticks per second, comparing it with actual velocity measurements.
  • The speaker calculates lateral inches per tick using known parameters (KV and KS), noting that robots may behave differently when moving laterally compared to forward.

Angular Ramp Logger Execution

  • Transitioning to angular ramp logging, which involves rotating in place rather than linear movement; this requires careful adjustment of power ramping parameters.
  • Multiple values are set for track width ticks during this process; attention to detail is crucial as these values impact performance metrics.
  • The speaker expresses uncertainty about which specific values apply in different operational modes but opts for caution by pushing all relevant data.
  • Running the angular ramp logger allows observation of how power increases affect rotation speed until maximum speed is reached.

Data Analysis and Graph Interpretation

  • Post-test analysis involves accessing web-based graphs that compare ticks per second against radians per second, highlighting successful data visualization techniques.
  • Observations reveal well-defined linear relationships in regression graphs unless outliers disrupt clarity; maintaining clean data sets is essential for accurate analysis.
  • Track width is defined as the distance between parallel dead wheels measured in ticks, critical for understanding robot navigation dynamics.
  • Additional parameters such as Y position of wheels are recorded for further localization efforts within robotic systems.

Tuning Robot Parameters and Manual Adjustments

Overview of Parameter Changes

  • The speaker discusses the negligible changes made to the robot's parameters, emphasizing that users can tweak values based on their preferences.
  • A transition is made to manual tuning, with a focus on the three dead wheel localizer setup being demonstrated.

Dead Wheel Localizer Setup

  • The feed forward parameters for KV and KS are copied from an earlier file into the dead wheel angular ramp settings.
  • The track width is integrated into the localizer code, ensuring accurate positioning data for the robot's movements.

Data Exclusion and Adjustments

  • Users can exclude outlier data points by box selecting them, which allows for more accurate regression calculations in robot positioning.
  • The perpendicular regression position is noted as 2322 ticks back on the robot, indicating precise measurements are crucial for effective tuning.

Transitioning to Manual Tuning

  • After initial automated setups, manual tuning begins where user input influences how the robot behaves during operation.
  • The importance of adjusting acceleration rates is highlighted; insufficient voltage may cause lag in reaching desired velocities.

Interactive Tuning Process

  • Manual tuning involves using FTC dashboard features to monitor and adjust performance metrics actively.
  • The speaker prepares to run code through FTC dashboard while ensuring a safe environment for autonomous driving tests.

Running Tests and Analyzing Results

  • During testing, different feed forward parameters are adjusted while monitoring velocity graphs in real-time via FTC dashboard.
  • As tests progress, discrepancies between expected and actual velocities are observed; adjustments are made accordingly to improve accuracy.

Observations During Testing

  • Continuous monitoring reveals that without feedback mechanisms, robots may drift off course during operations.

Robot Tuning Process

Initial Observations and Adjustments

  • The robot's measured velocity is lagging behind expectations, indicating issues with acceleration. The operator plans to stop the robot for adjustments.
  • The tuning process involves setting a small value for Ka, which is a configurable variable in the mechum Drive class within the Java code.
  • While the operational mode runs, dynamic changes can be made to parameters without needing to push new code.

Parameter Configuration

  • The operator accesses parameter values in the mechum drive settings and adjusts Ka, ensuring to save changes before continuing.
  • Aiming for synchronization between blue and red lines on a graph indicates performance metrics; adjustments are made as needed based on visual feedback.

Performance Evaluation

  • After modifying Ka, the operator observes improved synchronization of performance metrics but notes that deceleration caused some instability when the robot went off-field.
  • Emphasis is placed on experimenting with different Ka values since each robot may respond differently during tuning.

Feed Forward Tuner Insights

  • The feed forward tuner assesses how well the robot responds to given velocity inputs, allowing future predictions of behavior based on past data.
  • This phase focuses on measuring responses to acceleration profiles and adjusting power requirements accordingly.

Manual Feedback Tuner Introduction

  • Transitioning into manual feedback tuning after pushing code; this step integrates previous findings into practical adjustments.
  • Feedback tuning addresses real-world discrepancies by adjusting power based on current positioning versus target positioning.

Key Parameters in Feedback Tuning

  • Three main parameters are adjusted: forward gain (for distance from target), lateral gain (for side-to-side corrections), and heading gain (for directional corrections).
  • Each parameter has position and velocity gains; position gain acts proportionally while velocity gain dampens effects similar to PID control systems.

Robot Navigation and Feedback Tuning

Setting Up the Robot for Navigation

  • The robot is set up on the field to drive forward and backward, with a focus on determining its position using feedback from encoders.
  • The feedback tuner is utilized to adjust parameters such as forward, lateral, and heading movements, which are crucial for accurate navigation.

Understanding Movement Parameters

  • Movement parameters include axial (forward/backward), lateral (left/right), and heading (rotation). Initial values are suggested to be set at one for testing purposes.
  • Observations show that while the robot can track its position, it does not correct itself when off-course. This highlights the importance of tuning gains.

Implementing Gain Values

  • By setting gain values to one across all parameters, initial corrections in movement behavior are observed. This demonstrates how tuning impacts performance.
  • The robot's tracking improves significantly after adjusting gain values; green indicates the target path while blue shows actual movement.

Fine-Tuning Axial Gain

  • Adjustments to axial gain reveal that increasing this value reduces overshooting during navigation. Real-time responses can be monitored through visual feedback.
  • Further increases in axial gain lead to more responsive behavior but also risk erratic movements if set too high.

Addressing Excessive Gain Issues

  • High gain settings cause jittery movements as the robot overcorrects based on minor positional errors. Finding a balance in power application is essential for smooth operation.
  • Recommendations include fine-tuning both axial and lateral gains based on real-world performance observations throughout the season.

Monitoring Performance Over Time

  • Continuous monitoring reveals that even with proper tuning, drift may occur due to encoder inaccuracies over time.
  • Adjustments may be necessary as conditions change or additional weight is added to ensure consistent performance throughout various operational modes.

Robot Tuning and Spline Testing

Overview of Robot Autonomous Modes

  • The robot's autonomous mode is limited to 30 seconds, emphasizing the importance of accuracy in programming for effective operation.
  • A spline test program is introduced, which serves as a validation tool to demonstrate the robot's movement capabilities.

Setting Up the Spline Test

  • The setup involves moving the robot forward approximately two tiles, turning left, and returning to face a specific direction. This showcases the robot's ability to navigate an arc.
  • The demonstration will be conducted using the FTC dashboard, allowing viewers to visualize the path taken by the robot during its movements.

Observations During Testing

  • As testing progresses, users can monitor their robots' performance on the dashboard; successful execution indicates proper tuning.
  • If results are unsatisfactory, revisiting previous tuning steps is recommended. Starting over may also be beneficial if significant issues arise.

Conclusion of Tuning Process

Video description

Roadrunner docs and installation can be found here: https://rr.brott.dev/docs/v1-0/installation/