Hi all,
5507 mentor/coach here. Since I cannot travel much this summer, I have decided to delve into the robot software. I “rescued” the robot and I am playing with it in my garage. My goal is to be able to better teach the students on all aspects of the robot software. For context, I have a software background and I teach APCSA, but I haven’t spent much time on robot software.
Our robot is a swerve drive (SDS) with Falcon 500 drive motors. Our current gearing is 7:1. So here is out shortened robotconfig.py:
{
"rightControllerTypes": ["WPI_TalonFX", "WPI_TalonFX"],
"leftControllerTypes": ["WPI_TalonFX", "WPI_TalonFX"],
# Note: The first id in the list of ports should be the one with an encoder
# Ports for the left-side motors
"leftMotorPorts": [0, 6],
# Ports for the right-side motors
"rightMotorPorts": [2, 4],
# Inversions for the left-side motors
"leftMotorsInverted": [True, False],
# Inversions for the right side motors
"rightMotorsInverted": [True, False],
# Wheel diameter (in units of your choice - will dictate units of analysis)
"wheelDiameter": 0.333,
# If your robot has only one encoder, set all right encoder fields to `None`
# Encoder edges-per-revolution (*NOT* cycles per revolution!)
# This value should be the edges per revolution *of the wheels*, and so
# should take into account gearing between the encoder and the wheels
"encoderEPR": 14336, # 7:1 gearing so 7*2048
# Whether the left encoder is inverted
"leftEncoderInverted": False,
# Whether the right encoder is inverted:
"rightEncoderInverted": False,
"gyroType": "NavX",
"gyroPort": "SPI.Port.kMXP",
}
The tool outputs this data:
So my questions are as follows:
- Is the robotconfig.py set correctly?
- Do the Controller Gains seem reasonable?
- How do you calculate the kF for PIDF?
Thanks so much,
John Hajel