Class FeedForwardConfig
-
Nested Class Summary
Nested classes/interfaces inherited from class com.revrobotics.config.BaseConfig
BaseConfig.CANType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(FeedForwardConfig config) Applies settings from anotherFeedForwardConfig
to this one.kA
(double kA) Set the kA Acceleration Gain of the controller.kA
(double kA, ClosedLoopSlot slot) Set the kA Acceleration Gain of the controller for a specific closed loop slot.kCos
(double kCos) Set the kCos Cosine Gravity Gain of the controller.kCos
(double kCos, ClosedLoopSlot slot) Set the kCos Cosine Gravity Gain of the controller for a specific closed loop slot.kCosRatio
(double kCosRatio) Set the kCosRatio of the controller.kCosRatio
(double kCosRatio, ClosedLoopSlot slot) Set the kCosRatio of the controller for a specific closed loop slot.kG
(double kG) Set the kG Static Gravity Gain of the controller.kG
(double kG, ClosedLoopSlot slot) Set the kG Static Gravity Gain of the controller for a specific closed loop slot.kS
(double kS) Set the kS Static Gain of the controller.kS
(double kS, ClosedLoopSlot slot) Set the kS Static Gain of the controller for a specific closed loop slot.kV
(double kV) Set the kV Velocity Gain of the controller.kV
(double kV, ClosedLoopSlot slot) Set the kV Velocity Gain of the controller for a specific closed loop slot.scr
(double kS, double kCos, double kCosRatio) Set the kS, kCos, and kCosRatio gains for slot 0 in one call.scr
(double kS, double kCos, double kCosRatio, ClosedLoopSlot slot) Set the kS, kCos, and kCosRatio gains for the provided slot in one call.sg
(double kS, double kG) Set the kS and kG gains for slot 0 in one call.sg
(double kS, double kG, ClosedLoopSlot slot) Set the kS and kG gains for the provided slot in one call.sv
(double kS, double kV) Set the kS and kV gains for slot 0 in one call.sv
(double kS, double kV, ClosedLoopSlot slot) Set the kS and kV gains for the provided slot in one call.sva
(double kS, double kV, double kA) Set the kS, kV, and kA gains for slot 0 in one call.sva
(double kS, double kV, double kA, ClosedLoopSlot slot) Set the kS, kV, and kA gains for the provided slot in one call.svacr
(double kS, double kV, double kA, double kCos, double kCosRatio) Set the kS, kV, kA, kCos, and kCosRatio gains for slot 0 in one call.svacr
(double kS, double kV, double kA, double kCos, double kCosRatio, ClosedLoopSlot slot) Set the kS, kV, kA, kCos, and kCosRatio gains for the provided slot in one call.svag
(double kS, double kV, double kA, double kG) Set the kS, kV, kA, and kG gains for slot 0 in one call.svag
(double kS, double kV, double kA, double kG, ClosedLoopSlot slot) Set the kS, kV, kA, and kG gains for the provided slot in one call.Methods inherited from class com.revrobotics.config.BaseConfig
apply, flatten, getParameter, getParameter, putParameter, putParameter, putParameter, removeParameter, removeParameter
-
Constructor Details
-
FeedForwardConfig
public FeedForwardConfig()Create a new object to configure Feed Forward.
-
-
Method Details
-
apply
Applies settings from anotherFeedForwardConfig
to this one.Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.
- Parameters:
config
- TheFeedForwardConfig
to copy settings from- Returns:
- The updated
FeedForwardConfig
for method chaining
-
kS
Set the kS Static Gain of the controller.This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use
kS(double, ClosedLoopSlot)
.- Parameters:
kS
- The kS gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kV
Set the kV Velocity Gain of the controller.This is not applied in Position control mode.
This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use
kV(double, ClosedLoopSlot)
.- Parameters:
kV
- The kV gain in Volts per velocity- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kA
Set the kA Acceleration Gain of the controller.This is only applied in MAXMotion control modes
This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use
kA(double, ClosedLoopSlot)
.- Parameters:
kA
- The kA gain in Volts per velocity per second- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kG
Set the kG Static Gravity Gain of the controller.This is statically applied, for an elevator or linear mechanism. For an arm or rotary mechanism, see
kCos(double, ClosedLoopSlot)
. Set this to 0 if kCos is being used.This is only applied in Position and MAXMotion Position control modes
This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use
kG(double, ClosedLoopSlot)
.- Parameters:
kG
- The kG gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kCos
Set the kCos Cosine Gravity Gain of the controller.This is multiplied by the cosine of the absolute position of the mechanism (See
kCosRatio(double kCosRatio)
for info on configuring this) for an arm mechanism. Set it to 0 if kG is being used.This is only applied in Position and MAXMotion Position control modes
This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use
kCos(double, ClosedLoopSlot)
.- Parameters:
kCos
- The kCos gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kCosRatio
Set the kCosRatio of the controller.This sets the ratio that is used to calculate the absolute position of your arm mechanism for use with kCos. This is applied after the conversion factor and should convert from those units to absolute rotations of your mechanism. Ensure your selected encoder is zeroed such that 0 = horizontal.
This will set the value for closed loop slot 0. To set the value for a specific closed loop slot, use
kCosRatio(double, ClosedLoopSlot)
.- Parameters:
kCosRatio
- The kCosRatio- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kS
Set the kS Static Gain of the controller for a specific closed loop slot.- Parameters:
kS
- The kS gain in Voltsslot
- The closed loop slot to set the values for- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kV
Set the kV Velocity Gain of the controller for a specific closed loop slot.This is not applied in Position control mode.
- Parameters:
kV
- The kV gain in Volts per velocityslot
- The closed loop slot to set the values for- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kA
Set the kA Acceleration Gain of the controller for a specific closed loop slot.This is only applied in MAXMotion control modes
- Parameters:
kA
- The kA gain in Volts per velocity per secondslot
- The closed loop slot to set the values for- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kG
Set the kG Static Gravity Gain of the controller for a specific closed loop slot.This is statically applied, for an elevator or linear mechanism. For an arm or rotary mechanism, see
kCos(double, ClosedLoopSlot)
. Set this to 0 if kCos is being used.This is only applied in Position and MAXMotion Position control modes
- Parameters:
kG
- The kG gain in Voltsslot
- The closed loop slot to set the values for- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kCos
Set the kCos Cosine Gravity Gain of the controller for a specific closed loop slot.This is multiplied by the cosine of the absolute position of the mechanism (See
kCosRatio(double kCosRatio, ClosedLoopSlot slot)
for info on configuring this) for an arm mechanism. Set it to 0 if kG is being used.This is only applied in Position and MAXMotion Position control modes
- Parameters:
kCos
- The kCos gain in Voltsslot
- The closed loop slot to set the values for- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
kCosRatio
Set the kCosRatio of the controller for a specific closed loop slot.This sets the ratio that is used to calculate the absolute position of your arm mechanism for use with kCos. This is applied after the conversion factor and should convert from those units to absolute rotations of your mechanism. Ensure your selected encoder is zeroed such that 0 = horizontal.
- Parameters:
kCosRatio
- The kCosRatioslot
- The closed loop slot to set the values for- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
sv
Set the kS and kV gains for slot 0 in one call.For more information on the kS and kV gains, see
kS(double)
andkV(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocity- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
sva
Set the kS, kV, and kA gains for slot 0 in one call.For more information on the kS, kV, and kA gains, see
kS(double)
,kV(double)
, andkA(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocitykA
- The kA gain in Volts per velocity per second- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
svag
Set the kS, kV, kA, and kG gains for slot 0 in one call.For more information on the kS, kV, kA, and kG gains, see
kS(double)
,kV(double)
,kA(double)
, andkG(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocitykA
- The kA gain in Volts per velocity per secondkG
- The kG gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
svacr
Set the kS, kV, kA, kCos, and kCosRatio gains for slot 0 in one call.For more information on the kS, kV, kA, kCos, and kCosRatio gains, see
kS(double)
,kV(double)
,kA(double)
,kCos(double)
, andkCosRatio(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocitykA
- The kA gain in Volts per velocity per secondkCos
- The kCos gain in VoltskCosRatio
- The ratio used to calculate the absolute position of your arm mechanism for use with kCos- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
sg
Set the kS and kG gains for slot 0 in one call.For more information on the kS and kG gains, see
kS(double)
andkG(double)
.- Parameters:
kS
- The kS gain in VoltskG
- The kG gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
scr
Set the kS, kCos, and kCosRatio gains for slot 0 in one call.For more information on the kS, kCos, and kCosRatio gains, see
kS(double)
,kCos(double)
, andkCosRatio(double)
.- Parameters:
kS
- The kS gain in VoltskCos
- The kCos gain in VoltskCosRatio
- The ratio used to calculate the absolute position of your arm mechanism for use with kCos- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
sv
Set the kS and kV gains for the provided slot in one call.For more information on the kS and kV gains, see
kS(double)
andkV(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocity- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
sva
Set the kS, kV, and kA gains for the provided slot in one call.For more information on the kS, kV, and kA gains, see
kS(double)
,kV(double)
, andkA(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocitykA
- The kA gain in Volts per velocity per second- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
svag
Set the kS, kV, kA, and kG gains for the provided slot in one call.For more information on the kS, kV, kA, and kG gains, see
kS(double)
,kV(double)
,kA(double)
, andkG(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocitykA
- The kA gain in Volts per velocity per secondkG
- The kG gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
svacr
public FeedForwardConfig svacr(double kS, double kV, double kA, double kCos, double kCosRatio, ClosedLoopSlot slot) Set the kS, kV, kA, kCos, and kCosRatio gains for the provided slot in one call.For more information on the kS, kV, kA, kCos, and kCosRatio gains, see
kS(double)
,kV(double)
,kA(double)
,kCos(double)
, andkCosRatio(double)
.- Parameters:
kS
- The kS gain in VoltskV
- The kV gain in Volts per velocitykA
- The kA gain in Volts per velocity per secondkCos
- The kCos gain in VoltskCosRatio
- The ratio used to calculate the absolute position of your arm mechanism for use with kCos- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
sg
Set the kS and kG gains for the provided slot in one call.For more information on the kS and kG gains, see
kS(double)
andkG(double)
.- Parameters:
kS
- The kS gain in VoltskG
- The kG gain in Volts- Returns:
- The modified
FeedForwardConfig
object for method chaining
-
scr
Set the kS, kCos, and kCosRatio gains for the provided slot in one call.For more information on the kS, kCos, and kCosRatio gains, see
kS(double)
,kCos(double)
, andkCosRatio(double)
.- Parameters:
kS
- The kS gain in VoltskCos
- The kCos gain in VoltskCosRatio
- The ratio used to calculate the absolute position of your arm mechanism for use with kCos- Returns:
- The modified
FeedForwardConfig
object for method chaining
-