Skip to content

Commit

Permalink
new CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Nov 16, 2024
1 parent 3608148 commit c9c53f6
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 41 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/ci.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/humble-docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Humble Docker Build

on: [push, pull_request]

jobs:
humble_docker_build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=humble
push: false
15 changes: 15 additions & 0 deletions .github/workflows/python_formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Python Formatting Check

on: [push, pull_request]

jobs:
python_formatter:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Black Formatter
uses: lgeiger/black-action@master
with:
args: ". --check --diff --line-length 90"
4 changes: 2 additions & 2 deletions yolo_ros/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
@pytest.mark.linter
def test_flake8():
rc, errors = main_with_errors(argv=[])
assert rc == 0, "Found %d code style errors / warnings:\n" % len(
assert rc == 0, "Found %d code style errors / warnings:\n" % len(errors) + "\n".join(
errors
) + "\n".join(errors)
)
11 changes: 3 additions & 8 deletions yolo_ros/yolo_ros/detect_3d_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ def __init__(self) -> None:
self.declare_parameter(
"depth_image_reliability", QoSReliabilityPolicy.BEST_EFFORT
)
self.declare_parameter(
"depth_info_reliability", QoSReliabilityPolicy.BEST_EFFORT
)
self.declare_parameter("depth_info_reliability", QoSReliabilityPolicy.BEST_EFFORT)

# aux
self.tf_buffer = Buffer()
Expand Down Expand Up @@ -206,9 +204,7 @@ def process_detections(
if bbox3d is not None:
new_detections.append(detection)

bbox3d = Detect3DNode.transform_3d_box(
bbox3d, transform[0], transform[1]
)
bbox3d = Detect3DNode.transform_3d_box(bbox3d, transform[0], transform[1])
bbox3d.frame_id = self.target_frame
new_detections[-1].bbox3d = bbox3d

Expand Down Expand Up @@ -262,8 +258,7 @@ def convert_bb_to_3d(

else:
bb_center_z_coord = (
depth_image[int(center_y)][int(center_x)]
/ self.depth_image_units_divisor
depth_image[int(center_y)][int(center_x)] / self.depth_image_units_divisor
)

z_diff = np.abs(roi - bb_center_z_coord)
Expand Down
2 changes: 0 additions & 2 deletions yolo_ros/yolo_ros/tracking_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,13 @@ def detections_cb(self, img_msg: Image, detections_msg: DetectionArray) -> None:
if len(detection_list) > 0:

det = Boxes(np.array(detection_list), (img_msg.height, img_msg.width))

tracks = self.tracker.update(det, cv_image)

if len(tracks) > 0:

for t in tracks:

tracked_box = Boxes(t[:-1], (img_msg.height, img_msg.width))

tracked_detection: Detection = detections_msg.detections[int(t[-1])]

# get boxes values
Expand Down

0 comments on commit c9c53f6

Please sign in to comment.