You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a handful of functions that require either a "slot index" (slotIdx) or a "pid index" (pidIdx) parameter:
talon.configSelectedFeedbackSensor(FeedbackDevice feedbackDevice, int pidIdx, int timeoutMs);
talon.setSelectedSensorPosition(int sensorPos, int pidIdx, int timeoutMs);
talon.selectProfileSlot(int slotIdx, int pidIdx);
talon.config_kp(int slotIdx, double value, int timeoutMs);
talon.configAllowableClosedLoopError(int slotIdx, int allowableClosedLoopError, int timeoutMs)
From what I've read in the documentation, the talon is capable of storing 4 different "Motor Control Profiles" (pg. 72 of software reference manual). One motor control profile consists of one set of PID loop gains and a few other closed-loop preferences. Am I correct in assuming slotIdx refers to one of these motor control profiles? This makes sense to me, as talon.config_kp() and talon.configAllowableClosedLoopError() would need to know which motor control profile to apply the config to.
As for pidIdx, the only documentation I can find says that pidIdx should be "0 for primary closed loop, 1 for cascaded closed loop". I can't find anywhere where it's specified what this actually means, so I don't understand why talon.configSelectedFeedbackSensor(), talon.setSelectedSensorPosition(), and talon.selectProfileSlot() require this parameter. In every example usage I've seen of functions that require pidIdx, it's always passed in as 0 and never as 1. What's the point of this parameter, and how is it different than slotIdx?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
If you look at the documentation of BaseMotorController.selectProfileSlot() you'll see the following:
/*** Selects which profile slot to use for closed-loop control.** @param slotIdx* Profile slot to select.* @param pidIdx* 0 for Primary closed-loop. 1 for auxiliary closed-loop.**/
So I would infer that the slotIdx refers to one of the four sets of PID values. From the documentation: "Closed Loop controller will pull closed-loop gain/setting information from a selected slot. There are four slots to choose from (for gain-scheduling)".
And pidIdx would refer to whether you want to use the regular closed loop PID (PID[0]) or the Auxiliary closed loop (PID[1]).
There are a handful of functions that require either a "slot index" (
slotIdx
) or a "pid index" (pidIdx
) parameter:talon.configSelectedFeedbackSensor(FeedbackDevice feedbackDevice, int pidIdx, int timeoutMs);
talon.setSelectedSensorPosition(int sensorPos, int pidIdx, int timeoutMs);
talon.selectProfileSlot(int slotIdx, int pidIdx);
talon.config_kp(int slotIdx, double value, int timeoutMs);
talon.configAllowableClosedLoopError(int slotIdx, int allowableClosedLoopError, int timeoutMs)
From what I've read in the documentation, the talon is capable of storing 4 different "Motor Control Profiles" (pg. 72 of software reference manual). One motor control profile consists of one set of PID loop gains and a few other closed-loop preferences. Am I correct in assuming
slotIdx
refers to one of these motor control profiles? This makes sense to me, astalon.config_kp()
andtalon.configAllowableClosedLoopError()
would need to know which motor control profile to apply the config to.As for
pidIdx
, the only documentation I can find says thatpidIdx
should be "0 for primary closed loop, 1 for cascaded closed loop". I can't find anywhere where it's specified what this actually means, so I don't understand whytalon.configSelectedFeedbackSensor()
,talon.setSelectedSensorPosition()
, andtalon.selectProfileSlot()
require this parameter. In every example usage I've seen of functions that requirepidIdx
, it's always passed in as 0 and never as 1. What's the point of this parameter, and how is it different thanslotIdx
?Thanks in advance!
The text was updated successfully, but these errors were encountered: