Gains for the specified slot.
More...
#include <ctre/phoenix6/configs/Configs.hpp>
|
Slot1Configs & | WithKP (double newKP) |
| Modifies this configuration's kP parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithKI (double newKI) |
| Modifies this configuration's kI parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithKD (double newKD) |
| Modifies this configuration's kD parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithKS (double newKS) |
| Modifies this configuration's kS parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithKV (double newKV) |
| Modifies this configuration's kV parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithKA (double newKA) |
| Modifies this configuration's kA parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithKG (double newKG) |
| Modifies this configuration's kG parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithGravityType (signals::GravityTypeValue newGravityType) |
| Modifies this configuration's GravityType parameter and returns itself for method-chaining and easier to use config API. More...
|
|
Slot1Configs & | WithStaticFeedforwardSign (signals::StaticFeedforwardSignValue newStaticFeedforwardSign) |
| Modifies this configuration's StaticFeedforwardSign parameter and returns itself for method-chaining and easier to use config API. More...
|
|
std::string | ToString () const override |
|
std::string | Serialize () const override |
|
ctre::phoenix::StatusCode | Deserialize (const std::string &to_deserialize) override |
|
virtual std::string | ToString () const =0 |
|
virtual ctre::phoenix::StatusCode | Deserialize (const std::string &string)=0 |
|
virtual std::string | Serialize () const =0 |
|
Gains for the specified slot.
If this slot is selected, these gains are used in closed loop control requests.
◆ Deserialize()
ctre::phoenix::StatusCode ctre::phoenix6::configs::Slot1Configs::Deserialize |
( |
const std::string & |
to_deserialize | ) |
|
|
inlineoverridevirtual |
◆ From()
◆ Serialize()
std::string ctre::phoenix6::configs::Slot1Configs::Serialize |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ ToString()
std::string ctre::phoenix6::configs::Slot1Configs::ToString |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ WithGravityType()
Modifies this configuration's GravityType parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newGravityType | Parameter to modify |
- Returns
- Itself
◆ WithKA()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKA |
( |
double |
newKA | ) |
|
|
inline |
Modifies this configuration's kA parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithKD()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKD |
( |
double |
newKD | ) |
|
|
inline |
Modifies this configuration's kD parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithKG()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKG |
( |
double |
newKG | ) |
|
|
inline |
Modifies this configuration's kG parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithKI()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKI |
( |
double |
newKI | ) |
|
|
inline |
Modifies this configuration's kI parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithKP()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKP |
( |
double |
newKP | ) |
|
|
inline |
Modifies this configuration's kP parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithKS()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKS |
( |
double |
newKS | ) |
|
|
inline |
Modifies this configuration's kS parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithKV()
Slot1Configs & ctre::phoenix6::configs::Slot1Configs::WithKV |
( |
double |
newKV | ) |
|
|
inline |
Modifies this configuration's kV parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
- Returns
- Itself
◆ WithStaticFeedforwardSign()
Modifies this configuration's StaticFeedforwardSign parameter and returns itself for method-chaining and easier to use config API.
- Parameters
-
newStaticFeedforwardSign | Parameter to modify |
- Returns
- Itself
◆ GravityType
Gravity Feedforward Type.
This determines the type of the gravity feedforward. Choose Elevator_Static for systems where the gravity feedforward is constant, such as an elevator. The gravity feedforward output will always be positive. Choose Arm_Cosine for systems where the gravity feedforward is dependent on the angular position of the mechanism, such as an arm. The gravity feedforward output will vary depending on the mechanism angular position. Note that the sensor offset and ratios must be configured so that the sensor position is 0 when the mechanism is horizonal, and one rotation of the mechanism corresponds to one rotation of the sensor position.
◆ kA
double ctre::phoenix6::configs::Slot1Configs::kA = 0 |
Acceleration Feedforward Gain.
The units for this gain is dependent on the control mode. Since this gain is multiplied by the requested acceleration, the units should be defined as units of output per unit of requested input acceleration. For example, when controlling velocity using a duty cycle closed loop, the units for the acceleration feedfoward gain will be duty cycle per requested rps/s, or 1/(rps/s).
Minimum Value: 0 Maximum Value: 3.4e+38 Default Value: 0 Units:
◆ kD
double ctre::phoenix6::configs::Slot1Configs::kD = 0 |
Derivative Gain.
The units for this gain is dependent on the control mode. Since this gain is multiplied by the derivative of error in the input with respect to time (in units of seconds), the units should be defined as units of output per unit of the differentiated input error. For example, when controlling velocity using a duty cycle closed loop, the derivative of velocity with respect to time is rps/s, which is acceleration. Therefore, the units for the derivative gain will be duty cycle per unit of acceleration error, or 1/(rps/s).
Minimum Value: 0 Maximum Value: 3.4e+38 Default Value: 0 Units:
◆ kG
double ctre::phoenix6::configs::Slot1Configs::kG = 0 |
Gravity Feedforward Gain.
This is added to the closed loop output. The sign is determined by the type of gravity feedforward. The unit for this constant is dependent on the control mode, typically fractional duty cycle, voltage, or torque current.
Minimum Value: -512 Maximum Value: 511 Default Value: 0 Units:
◆ kI
double ctre::phoenix6::configs::Slot1Configs::kI = 0 |
Integral Gain.
The units for this gain is dependent on the control mode. Since this gain is multiplied by error in the input integrated over time (in units of seconds), the units should be defined as units of output per unit of integrated input error. For example, when controlling velocity using a duty cycle closed loop, integrating velocity over time results in rps * s = rotations. Therefore, the units for the integral gain will be duty cycle per rotation of accumulated error, or 1/rot.
Minimum Value: 0 Maximum Value: 3.4e+38 Default Value: 0 Units:
◆ kP
double ctre::phoenix6::configs::Slot1Configs::kP = 0 |
Proportional Gain.
The units for this gain is dependent on the control mode. Since this gain is multiplied by error in the input, the units should be defined as units of output per unit of input error. For example, when controlling velocity using a duty cycle closed loop, the units for the proportional gain will be duty cycle per rps, or 1/rps.
Minimum Value: 0 Maximum Value: 3.4e+38 Default Value: 0 Units:
◆ kS
double ctre::phoenix6::configs::Slot1Configs::kS = 0 |
Static Feedforward Gain.
This is added to the closed loop output. The unit for this constant is dependent on the control mode, typically fractional duty cycle, voltage, or torque current. The sign is typically determined by reference velocity when using position and velocity closed loop modes. However, when using position closed loop with zero velocity reference (no motion profiling), application can instead use the position closed loop error by setting the Static Feedforward Sign configuration parameter. In which case, we recommend the minimal amount of kS, otherwise the motor output may dither when closed loop error is near zero.
Minimum Value: -512 Maximum Value: 511 Default Value: 0 Units:
◆ kV
double ctre::phoenix6::configs::Slot1Configs::kV = 0 |
Velocity Feedforward Gain.
The units for this gain is dependent on the control mode. Since this gain is multiplied by the requested velocity, the units should be defined as units of output per unit of requested input velocity. For example, when controlling velocity using a duty cycle closed loop, the units for the velocity feedfoward gain will be duty cycle per requested rps, or 1/rps.
Minimum Value: 0 Maximum Value: 3.4e+38 Default Value: 0 Units:
◆ StaticFeedforwardSign
Static Feedforward Sign during position closed loop.
This determines the sign of the applied kS during position closed-loop modes. The default behavior uses the velocity feedforward sign. This works well with position closed loop when velocity reference is specified (motion profiling). However, when using position closed loop with zero velocity reference (no motion profiling), the application may want to apply static feedforward based on the closed loop error sign instead. In which case, we recommend the minimal amount of kS, otherwise the motor output may dither when closed loop error is near zero.
The documentation for this class was generated from the following file: