Skip to content

Commit e0cea71

Browse files
committed
style: format
1 parent 3b9b3ce commit e0cea71

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

extensions/rcs_realsense/src/rcs_realsense/calibration.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import logging
2-
from pathlib import Path
32
import threading
43
import typing
4+
from pathlib import Path
55
from time import sleep
66

77
import apriltag
88
import cv2
9+
import diskcache as dc
910
import numpy as np
1011
from rcs._core import common
1112
from rcs.camera.hw import CalibrationStrategy
1213
from rcs.camera.interface import Frame
1314
from tqdm import tqdm
14-
import diskcache as dc
1515

1616
logger = logging.getLogger(__name__)
1717

@@ -22,7 +22,9 @@ class FR3BaseArucoCalibration(CalibrationStrategy):
2222
def __init__(self, camera_name: str):
2323
# base frame to camera, world to base frame
2424
self._cache = dc.Cache(Path.home() / ".cache" / "rcs")
25-
self._extrinsics: np.ndarray[tuple[typing.Literal[4], typing.Literal[4]], np.dtype[np.float64]] | None = self._cache.get(f"{camera_name}_extrinsics") # None
25+
self._extrinsics: np.ndarray[tuple[typing.Literal[4], typing.Literal[4]], np.dtype[np.float64]] | None = (
26+
self._cache.get(f"{camera_name}_extrinsics")
27+
) # None
2628
self.camera_name = camera_name
2729
self.tag_to_world = common.Pose(
2830
rpy_vector=np.array([np.pi, 0, -np.pi / 2]), translation=np.array([0.145, 0, 0])

python/rcs/envs/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def get_tcp_offset(mjcf: str | Path) -> rcs.common.Pose:
9494
tcp_offset_translation = np.array(model.numeric("tcp_offset_translation").data)
9595
tcp_offset_rotation_matrix = np.array(model.numeric("tcp_offset_rotation_matrix").data)
9696
return rcs.common.Pose(
97-
translation=tcp_offset_translation, rotation=tcp_offset_rotation_matrix.reshape((3, 3))
98-
) # type: ignore
97+
translation=tcp_offset_translation, rotation=tcp_offset_rotation_matrix.reshape((3, 3)) # type: ignore
98+
)
9999
except KeyError:
100100
msg = "No tcp offset found in the model. Using the default tcp offset."
101101
logging.info(msg)

0 commit comments

Comments
 (0)