We’ve recently begun working with WPI’s new characterization tool and have run into a few difficulties.
Here’s our code GitHub - Team5712/FRC_2020: Java code for FRC 2020 competition.
When we tried running this, our robot began to run backwards and didn’t seem to stop. The odometry and gyro seem to be working fine but we can’t seem to follow a trajectory. What’s also odd is that our left motor is inverted in our code but isn’t for the characterization tool.
Our graphs for the characterization are as follows. It doesn’t look like the accepted graph on WPI. It appears like it’s missing a side or something.
We would appreciate the help, thanks.
Here is our robot config file…
{
# Class names of motor controllers used.
# Options:
# 'WPI_TalonSRX'
# 'WPI_TalonFX' (for Falcon 500 motors)
# 'WPI_VictorSPX'
# Note: The first motor on each side should always be a Talon SRX/FX, as the
# VictorSPX does not support encoder connections
"rightControllerTypes": ["WPI_TalonSRX", "WPI_VictorSPX"],
"leftControllerTypes": ["WPI_TalonSRX", "WPI_VictorSPX"],
# Ports for the left-side motors
"leftMotorPorts": [1, 2],
# Ports for the right-side motors
"rightMotorPorts": [5, 6],
# Inversions for the left-side motors
"leftMotorsInverted": [False, False],
# Inversions for the right side motors
"rightMotorsInverted": [False, False],
# Wheel diameter (in units of your choice - will dictate units of analysis)
"wheelDiameter": 0.1016,
# If your robot has only one encoder, remove all of the right encoder fields
# Encoder pulses-per-revolution (*NOT* cycles per revolution!)
# This value should be the pulses per revolution *of the wheels*, and so
# should take into account gearing between the encoder and the wheels
"encoderPPR": 512,
# Whether the left encoder is inverted
"leftEncoderInverted": True,
# Whether the right encoder is inverted:
"rightEncoderInverted": False,
# Your gyro type (one of "NavX", "Pigeon", "ADXRS450", "AnalogGyro", or "None")
"gyroType": "NavX",
# Whatever you put into the constructor of your gyro
# Could be:
# "SPI.Port.kMXP" (MXP SPI port for NavX or ADXRS450),
# "I2C.Port.kOnboard" (Onboard I2C port for NavX)
# "0" (Pigeon CAN ID or AnalogGyro channel),
# "new WPI_TalonSRX(3)" (Pigeon on a Talon SRX),
# "leftSlave" (Pigeon on the left slave Talon SRX/FX),
# "" (NavX using default SPI, ADXRS450 using onboard CS0, or no gyro)
"gyroPort": "SPI.Port.kMXP",
}