Feat: Motor control widgets and example panels
Description
This update separates motor control widgets from motor_example.py. We now have 3 new widgets in widgets/motor_control.py:
-
MotorControlSelection: A selection tool to choose active x and y motors. -
MotorControlAbsolute: Allows movement by defining absolute coordinates. -
MotorControlRelative: Facilitates movement with relative coordinates using arrows and a defined step. -
MotorCoordinateTable: Saves coordinates to table for future usage.
Compared to the previous implementation in motor_example, the motor control widgets inherit from the new base class MotorControlWidget and use MotorThread for executing motor movements in BEC. Each widget has its own signal/slot API for interaction with other components.
The modular design of these widgets enables easy construction of more complex examples, which can be utilized as plugins or CLI popups. I have created examples in examples/motor_movement/motor_control_compilation:
-
MotorControlPanelAbsolute→MotorControlSelection+MotorControlAbsolute -
MotorControlPanelRelative→MotorControlSelection+MotorControlRelative -
MotorControlPanel→MotorControlSelection+MotorControlRelative+MotorControlAbsolute -
MotorControlMap→MotorMap+MotorControlSelection+MotorControlRelative+MotorControlAbsolute -
MotorControlMap→MotorMap+MotorControlSelection+MotorControlRelative+MotorControlAbsolute+MotorCoordinateTable→ similar to `example/motor_movement/motor_example.py
You can run these examples by passing additional argument like this:
python examples/motor_movement/motor_control_compilations.py -v {app,map,panel,panel_abs,panel_rel}
Related Issues
closes #79 (closed), #71 (closed)
Type of Change
- 4 new widgets
- 5 new example apps
Potential side effects
None
Screenshots / GIFs (if applicable)
Additional Comments
[Add any additional comments or information that may be helpful for reviewers.]
Definition of Done
-
Documentation is up-to-date. → #82 (closed) -
Unit tests, closes #7 (closed) -
if time also coordinates table (low priority ATM), closes #72 (closed) -
Bring all functionalities from examples/motor_movement/motor_example.py, export/import .csv and custom columns are missing → #69

