FTC Set Up the Mecanum Training Platform 20231025

From wikidb
Revision as of 16:59, 24 October 2023 by Edc (Talk | contribs)

Jump to: navigation, search

Why

  • Create a program testing platform. We want to create programs that we can copy to the competitions robot without modification.

Check Points

Check Point 1

Rename the Controller Hub

  • Robot Controller Settings
    • Robot Controller Name is OrRAS11-RC

Check Point 2

Down loading the Mecanum Demo Program

  • Locate the the Drive Mecanum program in GetHub and copy it to your laptop. You will need internet access for this step
  • Load the program into your robot

Check point 3

Pair the Driver and the Control Hub

See

Check Point 4

Connect and Configure the motors

  • This program will not run correctly because it robot hardware needs to be configured for a different motor configuration.
  • Configure these motors with the same I2C connections and motor names as the competition robot.
  • Change the motor names in the java program to match the configuruation
  • Build
  • You can not test yet because the Driver Hub has not yet been configured.

Check Point 4

Update the Control Hub

  • See Updating Control Hub
  • Use the Google Chrome we browser - TBD double check
  • You will need to install a program name REV Hardware Client
  • Test

Update the Driver Hub





test

control hub

driver hub

Sense - Think - Act loop

We have just implemented an Sense-Think-Act loop.

  • Which code implements "Sense?"
  • Which code implements "Think?"
  • Which dode implements "Act?"

Sense-think-act.jpeg

Photo credit:

Configure a Color Sensor

Color Sensor Demo Code

Find this line of code

  colorSensor = hardwareMap.get(NormalizedColorSensor.class, "sensor_color");

Physical Connection

  • Connect Color Sensor to one of the I2C ports - 1 in this case

Configure Hardware

References

Configuration File

  • Control Hub
    • I2C Bus 1
      • Port 0 REV Color Sensor V3
      • sensor_color

Example HW color senso configuration entry. Change ColorV3 to sensor_color for our examples.

ColorSensorConfiguration.png

From: https://docs.revrobotics.com/color-sensor/application-examples.

RGB (Red Green Blue) and HSV (Hue Saturation Value) Color Models