Add copy methods, fix state imports, pass lock
Add copy() to PosArray, DegArray and RadArray to allow easy shallow copies. Change RobotState imports in idle.py and walking.py to use explicit 'from RobotState.RobotState import RobotState' to avoid import issues. In main.py create a threading.Lock and pass it into the controller thread args to prepare for synchronized access in controller_loop.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
import RobotState
|
||||
from RobotState.RobotState import RobotState
|
||||
|
||||
class IdleState(RobotState):
|
||||
def update(self, ctx, intent, dt):
|
||||
|
||||
@@ -4,7 +4,7 @@ import numpy as np
|
||||
import config as cfg
|
||||
import kinematics as kin
|
||||
import DataTypes as dt
|
||||
import RobotState
|
||||
from RobotState.RobotState import RobotState
|
||||
|
||||
class WalkingState(RobotState):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user