Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 12, 2024
1 parent 9dba2db commit 9bd1192
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions socs/agents/hwp_supervisor/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import threading
import time
import traceback
from contextlib import contextmanager
from dataclasses import asdict, dataclass, field
from typing import Any, Dict, List, Literal, Optional
from contextlib import contextmanager

import numpy as np
import ocs
Expand Down Expand Up @@ -209,7 +209,7 @@ class ACUState:

# This will only be set by spin-control agent for communication with ACU
request_block_ACU_motion: bool = False
ACU_motion_blocked: Optional[bool] = None # This flag is only set by the ACU agent
ACU_motion_blocked: Optional[bool] = None # This flag is only set by the ACU agent
use_acu_blocking: bool = False

def update(self):
Expand Down Expand Up @@ -796,7 +796,7 @@ def sleep_until_complete(self, session=None, dt=1):


@contextmanager
def ensure_grip_safety(hwp_state: HWPState, timeout: float=60.):
def ensure_grip_safety(hwp_state: HWPState, timeout: float = 60.):
"""
Run required checks for gripper safety. This will check ACU parameters such
as az/el position and velocity. If `use_acu_blocking` is set, this will
Expand Down Expand Up @@ -866,7 +866,7 @@ def ensure_grip_safety(hwp_state: HWPState, timeout: float=60.):
yield
return

try: #If use_acu_blocking, do handshake with ACU agent to block motino
try: # If use_acu_blocking, do handshake with ACU agent to block motino
acu.request_block_ACU_motion = True
start_time = time.time()
while not acu.ACU_motion_blocked:
Expand Down

0 comments on commit 9bd1192

Please sign in to comment.