Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
# Side effects
- id: fix-byte-order-marker
Expand All @@ -16,14 +16,14 @@ repos:
- id: check-toml
- id: check-yaml

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.231
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
hooks:
- id: ruff
args:
- "--fix"

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.12.1
hooks:
- id: black
4 changes: 0 additions & 4 deletions vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def is_coloured_game_piece(
upper_colour: np.ndarray,
bBox_area: int,
) -> bool:

gamepiece_mask = cv2.inRange(masked_image, lower_colour, upper_colour)

# get largest contour
Expand All @@ -80,7 +79,6 @@ def is_coloured_game_piece(
def is_game_piece_present(
frame: np.ndarray, bounding_box: BoundingBox, expected_game_piece: ExpectedGamePiece
) -> bool:

# draw bound box mask
bBox_mask = np.zeros_like(frame)
bBox_mask = cv2.rectangle(
Expand Down Expand Up @@ -123,7 +121,6 @@ def is_game_piece_present(


def process_image(frame: np.ndarray, pose: Pose2d):

# visible_nodes = self.find_visible_nodes(frame, pose)

# node_states = self.detect_node_state(frame, visible_nodes)
Expand Down Expand Up @@ -191,7 +188,6 @@ def is_node_region_in_image(
camera_params: CameraParams,
node_region: NodeRegion,
) -> bool:

# create transform to make camera origin
world_to_robot = Transform3d(Pose3d(), Pose3d(robot_pose))
world_to_camera = world_to_robot + camera_params.transform
Expand Down
Loading