File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 22.. include:: ../README.md
33"""
44
5- from .cri_controller import CRIController
5+ from .cri_controller import CRIController , MotionType
66from .cri_errors import CRICommandTimeOutError , CRIConnectionError , CRIError
77from .cri_protocol_parser import CRIProtocolParser
88from .robot_state import (
Original file line number Diff line number Diff line change 1515logger = logging .getLogger (__name__ )
1616
1717
18+ class MotionType (Enum ):
19+ """Robot Motion Type for Jogging"""
20+
21+ Joint = "Joint"
22+ CartBase = "CartBase"
23+ CartTool = "CartTool"
24+ Platform = "Platform"
25+
26+
1827class CRIController :
1928 """
2029 Class implementing the CRI network protocol for igus Robot Control.
@@ -25,14 +34,6 @@ class CRIController:
2534 RECEIVE_TIMEOUT_SEC = 5
2635 DEFAULT_ANSWER_TIMEOUT = 10.0
2736
28- class MotionType (Enum ):
29- """Robot Motion Type for Jogging"""
30-
31- Joint = "Joint"
32- CartBase = "CartBase"
33- CartTool = "CartTool"
34- Platform = "Platform"
35-
3637 def __init__ (self ) -> None :
3738 self .robot_state : RobotState = RobotState ()
3839 self .robot_state_lock = threading .Lock ()
@@ -1512,3 +1513,7 @@ def get_motor_temperatures(
15121513 return True
15131514 else :
15141515 return False
1516+
1517+
1518+ # Monkey patch to maintain backward compatibility
1519+ CRIController .MotionType = MotionType # type: ignore
You can’t perform that action at this time.
0 commit comments