-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observe and perform state transitions with YARP control modes #215
Comments
Didn't know how to treat calibration vocabs (
|
Added CiA drive state machine at 972f875. |
Homing procedure refactored at e1995b6. Turns out the So, what can we do now? Homing procedure will be started via launcher app, as usual, I've just renamed the YARP option to |
Ideas:
Remarks:
|
Added |
Regarding object 6041h, Modes of Operation Display:
All non-state-related YARP control mode vocabs are only meaningful when in operation enabled state (on get), although it is still possible to request (set) their corresponding iPOS mode of operation via SDO at any time. The CiA 402 diagram is therefore easier to understand in this way:
In order to make this work, I'm introducing two variables designing YARP control modes: the requested (set) and the actual control mode (get). |
Compare these control mode setters (WIP): yarp-devices/libraries/YarpPlugins/TechnosoftIpos/IControlModeRawImpl.cpp Lines 437 to 438 in 8e4a1df
This operation will always update an internal variable containing the actual control mode before this blocking instruction completes. Said update occurs via TPDO callback, therefore the implicit semaphore timeout needs to take into account PDO inhibit times. yarp-devices/libraries/YarpPlugins/TechnosoftIpos/IControlModeRawImpl.cpp Lines 408 to 410 in 8e4a1df
Here, however, the SDO indication will only acknowledge that the transfer completes. The associated TPDO (modes of operation display) callback in this case is not being listened to while the SDO operation blocks this thread, although there is indeed a wait-with-timeout involved. So, I'm not sure whether the control mode status variable change or, in other words, the TPDO transfer, will occur during or after the SDO download call. To make it sure, the inhibit time could be set high enough (but not higher than the PDO semaphore timeout), or configure an event timer (which in turn needs to set a tiny period...). |
Mostly ready at a072551, I added a few more checkboxes to #229. In addition to the original intent of this issue, the patch:
|
A few words regarding
|
Regarding fault reset command: Table 5.1.1 – Drive State Transitions
Table 5.1.2 – Drive States
Table 5.2.1 – Bit Assignment in Controlword
(further down)
Needs testing: b615fb2. Edit: tested and actually works at 304ea6d, yay. |
Technosoft support answered my questions:
|
Follow-up from #242:
|
YARP's control API exposes several vocabs related to initialization and fault states, per IControlMode.h:
Their control specs (pdf) describe them as follows:
This task will aim to represent iPOS internal states with the above YARP vocabs. See state diagram (also at #120 (comment)):
Proposed mappings:
VOCAB_CM_NOT_CONFIGURED
: initial default value ("control mode" in YARP's parlance)VOCAB_CM_CONFIGURED
: everything set (Operation Enabled) we are about to select a control modeVOCAB_CM_IDLE
: default control mode in Operation Enabled state, we can switch back e.g. from position control to this state in order to stop controlling joints (they can be moved freely)VOCAB_CM_FORCE_IDLE
: transition from Fault to Operation Enabled, resets control mode (VOCAB_CM_IDLE
)The text was updated successfully, but these errors were encountered: