FRC Robot Characterization Track Width N/A

We have run the characterization routines. The Track Width is returning as N/A.

All the other tests ran well and the graphs look similar to the documentation except we get nothing in the upper right corner of upper right graph.

Ports for motors

# If doing drive test, treat this as the left side of the drivetrain

"motorPorts": [1, 2, 3],

# Only if you are doing drive (leave empty "[]" if not)

"rightMotorPorts": [4, 5, 6],

# Class names of motor controllers used.

# 'WPI_TalonSRX'

# 'WPI_VictorSPX'

# 'WPI_TalonFX'

# If doing drive test, treat this as the left side of the drivetrain

"controllerTypes": ['WPI_TalonFX', 'WPI_TalonFX', 'WPI_TalonFX'],

# Only if you are doing drive (leave empty "[]" if not)

"rightControllerTypes": ['WPI_TalonFX', 'WPI_TalonFX', 'WPI_TalonFX'],

# Set motors to inverted or not

# If doing drive test, treat this as the left side of the drivetrain

"motorsInverted": [False, False, False],

# Only if you are doing drive (leave empty "[]" if not)

"rightMotorsInverted": [False, False, False],

# Encoder edges-per-revolution (*NOT* cycles per revolution!)

# For the CTRE Mag Encoder, use 4096 (4 * 1024 = 4096)

"encoderEPR": 8192,

# Gearing accounts for the gearing between the encoder and the output shaft

"gearing": 8.68,

# Encoder ports (leave empty "[]" if not needed)

# Specifying encoder ports indicates you want to use Rio-side encoders

# If doing drive test, treat this as the left side of the drivetrain

"encoderPorts": [],

# Only if you are doing drive (leave empty "[]" if not)

"rightEncoderPorts": [],

# Set to True if encoders need to be inverted

# If doing drive test, treat this as the left side of the drivetrain

"encoderInverted": False,

# Only if you are doing drive (set to False if not needed)

"rightEncoderInverted": False,

# ** The following is only if you are using a gyro for the DriveTrain test**

# Gyro type (one of "NavX", "Pigeon", "ADXRS450", "AnalogGyro", or "None")

"gyroType": "ADXRS450",

# Whatever you put into the constructor of your gyro

# Could be:

# "SPI.Port.kMXP" (MXP SPI port for NavX or ADXRS450),

# "SerialPort.Port.kMXP" (MXP Serial port for NavX),

# "I2C.Port.kOnboard" (Onboard I2C port for NavX),

# "0" (Pigeon CAN ID or AnalogGyro channel),

# "new WPI_TalonSRX(3)" (Pigeon on a Talon SRX),

# "" (NavX using default SPI, ADXRS450 using onboard CS0, or no gyro)

"gyroPort": "",

}

This isn’t quite sufficient - could you post the graphs themselves?

Could you send the json data as well?

characterization-data20210302-1636.txt (1.7 MB)

The gyro didn’t report any change in angle. Are you sure the gyro is configured properly?

no we are not. we are not sure what to put in the gyro line. we have the adis16448 originally and the also plugged in the frc gyro. What should be put it the characterization tool for either of them?

Iirc, those are not supported by the tool. What you would probably have to do is generate the code with some other gyro and then replace the gyro related code (should be in Robot init) with the code necessary for your gyro.

What gyro would you recommend?

I believe you just need to change your config
"gyroPort": ""
to
"gyroPort": "SPI.Port.kMXP"

If that doesn’t work, it is not difficult to modify the generated project to whatever gyro that you want. We used an unsupported gyro by changing a line in Robot.java

gyroAngleRadians = () -> [insert method call that gets gyro angle with counterclockwise positive];

We had:
gyroAngleRadians = () -> -1 * Math.toRadians(gyro.getAngle());

We run the track width test and get a reading at the end but the track width still reads N/A

Can you give us the new json file? Maybe some other information about the robot such as wheel size and expected track width measurement. And just to be clear, your auto can still work quite well with a hand measured track width.

Robot.java (9.2 KB)

characterization-data20210331-1052.txt (3.0 MB)

Measured track width is approximately 23 in.
6 in high traction midwheels and 6 inch omni front and rear.
6 falcon 500 motors with WCD running 8.68 gear ratio.
There is a ADXRS450 (FRC GYRO)

I think your issue is that you are not setting the correct units in the Analyzer.


Make sure you have the Units set to something other than rotations. The units per rotation calculation is Wheel Diameter * 3.14
The screenshot includes the units per rotation for 6 inch wheels. I would recommend using meters because that’s what WPI Lib uses. The reason that it doesn’t work with rotations is that the track width calculator measures the distance that each side of the robot travels and then uses some trigonometry with the change in angle measurement to calculate the track width. With just using rotations, the calculator cannot determine the distance that each side traveled.

EDIT: The calculated value doesn’t seem right based on the robot information you gave us. I’m not sure what the issue is. Hopefully someone else can chime in on that. If I were you, I’d just use the measured trackwidth in your robot code

1 Like

Did you change gyros? The code you posted is for an ADXRS450 gyro which you need to update for your ADIS16448 gyro.