Skip to content

Commit 2acebd8

Browse files
committed
style: fix format
1 parent 5a76ebc commit 2acebd8

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

extensions/rcs_realsense/src/rcs_realsense/calibration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import apriltag
77
import cv2
88
import numpy as np
9-
from PIL import Image, ImageDraw
109
from rcs._core import common
1110
from rcs.camera.hw import CalibrationStrategy
1211
from rcs.camera.interface import Frame
@@ -131,7 +130,8 @@ def get_marker_pose(calib_tag_id, detector, intrinsics, frame):
131130
marker_det = det
132131

133132
if n_det > 1:
134-
raise ValueError("Expected 1 detection of tag id " f"{calib_tag_id}, got {n_det}.")
133+
msg = f"Expected 1 detection of tag id {calib_tag_id}, got {n_det}."
134+
raise ValueError(msg)
135135

136136
if marker_det is None:
137137
return None, None

python/rcs/camera/hw.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from collections.abc import Sequence
55
from datetime import datetime
66
from pathlib import Path
7-
from queue import Queue
87
from time import sleep
98

109
import cv2

python/rcs/camera/sim.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def _cpp_to_python_frames(self, cpp_frameset: _FrameSet | None) -> FrameSet | No
8080
extrinsics=self._extrinsics(color_name),
8181
),
8282
depth=DataFrame(
83-
data= (depth_np_frame * BaseCameraSet.DEPTH_SCALE).astype(
84-
np.uint16
85-
),
83+
data=(depth_np_frame * BaseCameraSet.DEPTH_SCALE).astype(np.uint16),
8684
timestamp=cpp_frameset.timestamp,
8785
intrinsics=self._intrinsics(depth_name),
8886
extrinsics=self._extrinsics(depth_name),

src/sim/camera.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ void SimCameraSet::render_all() {
8787
for (auto const& [id, cam] : this->cameras_cfg) {
8888
mjrContext* ctx = this->sim->renderer.get_context(id);
8989
this->render_single(id, *ctx, this->sim->renderer.scene,
90-
this->sim->renderer.opt);
90+
this->sim->renderer.opt);
9191
}
9292
}
9393

9494
void SimCameraSet::frame_callback(const std::string& id, mjrContext& ctx,
9595
mjvScene& scene, mjvOption& opt) {
96-
if (!this->render_on_demand){
97-
this->render_single(id, ctx, scene, opt);
96+
if (!this->render_on_demand) {
97+
this->render_single(id, ctx, scene, opt);
9898
}
9999
}
100100

101101
void SimCameraSet::render_single(const std::string& id, mjrContext& ctx,
102-
mjvScene& scene, mjvOption& opt) {
102+
mjvScene& scene, mjvOption& opt) {
103103
mjrRect viewport = mjr_maxViewport(&ctx);
104104
int W = viewport.width;
105105
int H = viewport.height;

src/sim/sim.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bool get_last_return_value(ConditionCallback cb) {
2626
return cb.last_return_value;
2727
}
2828

29-
Sim::Sim(mjModel* m, mjData* d) : m(m), d(d), renderer(m){};
29+
Sim::Sim(mjModel* m, mjData* d) : m(m), d(d), renderer(m) {};
3030

3131
bool Sim::set_config(const Config& cfg) {
3232
if (cfg.async) {

0 commit comments

Comments
 (0)