Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Benteng Ma committed May 31, 2024
2 parents d1f4452 + 09bae51 commit a4222a9
Show file tree
Hide file tree
Showing 26 changed files with 744 additions and 670 deletions.
11 changes: 11 additions & 0 deletions common/helpers/cv2_pcl/src/cv2_pcl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
from sensor_msgs.msg import PointCloud2
import ros_numpy as rnp
import cv2
from cv2_img import cv2_img_to_msg

from typing import Tuple, Union

Mat = np.ndarray


def pcl_to_img_msg(pcl: PointCloud2) -> Mat:
"""
Convert a given PointCloud2 message to img_msg
"""
# keep the same timestamp
cv2 = pcl_to_cv2(pcl)

return cv2_img_to_msg(cv2, pcl.header.stamp)


def pcl_to_cv2(
pcl: PointCloud2, height: Union[int, None] = None, width: Union[int, None] = None
) -> Mat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def detect(
keypoints_msg = []

for i, keypoint in pose.keypoints.items():

if camel_to_snake(keypoint.part) in request.masks[0].parts:
keypoint_msg = BodyPixKeypoint()
keypoint_msg.xy = [int(keypoint.position.x), int(keypoint.position.y)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def describe(self) -> str:
"hair_colour": hair_colour_str,
"hair_shape": hair_shape_str,
"male": male[0],
"facial_hair": facial_hair[0],
"facial_hair": facial_hair[0] != "No_Beard",
"hat": hat[0],
"glasses": glasses[0],
"earrings": earrings[0],
Expand Down
1 change: 0 additions & 1 deletion common/vision/lasr_vision_msgs/msg/BodyPixPose.msg
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# keypoints
BodyPixKeypoint[] keypoints
213 changes: 0 additions & 213 deletions common/vision/lasr_vision_pointing/CMakeLists.txt

This file was deleted.

Empty file.
77 changes: 0 additions & 77 deletions common/vision/lasr_vision_pointing/package.xml

This file was deleted.

1 change: 0 additions & 1 deletion common/vision/lasr_vision_pointing/requirements.in

This file was deleted.

24 changes: 0 additions & 24 deletions common/vision/lasr_vision_pointing/requirements.txt

This file was deleted.

Loading

0 comments on commit a4222a9

Please sign in to comment.