Skip to content

Commit

Permalink
rename skel to skeletons, add human_ids field
Browse files Browse the repository at this point in the history
  • Loading branch information
mqcmd196 committed Apr 18, 2023
1 parent f1aee7c commit 0aed5ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/coral_usb/human_pose_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from jsk_recognition_msgs.msg import RectArray
from jsk_recognition_msgs.msg import Segment
from sensor_msgs.msg import CompressedImage
from std_msgs.msg import Int32


class EdgeTPUHumanPoseEstimator(EdgeTPUNodeBase):
Expand Down Expand Up @@ -63,7 +64,7 @@ def __init__(self, model_file=None, namespace='~'):

# publishers
self.pub_skel = self.advertise(
namespace + 'output/skels', HumanSkeletonArray, queue_size=1)
namespace + 'output/skeletons', HumanSkeletonArray, queue_size=1)
self.pub_pose = self.advertise(
namespace + 'output/poses', PeoplePoseArray, queue_size=1)
self.pub_rects = self.advertise(
Expand Down Expand Up @@ -190,14 +191,14 @@ def image_cb(self, msg):
seg.start_point = pose_msg.poses[i - 1].position
seg.end_point = pose_msg.poses[i].position
skel_msg.bones.append(seg)
skels_msg.human_ids.append(Int32(data=i))
skels_msg.skeletons.append(skel_msg)
poses_msg.poses.append(pose_msg)
y_min, x_min, y_max, x_max = bbox
rect = Rect(
x=x_min, y=y_min,
width=x_max - x_min, height=y_max - y_min)
rects_msg.rects.append(rect)

cls_msg = ClassificationResult(
header=msg.header,
classifier=self.classifier_name,
Expand Down

0 comments on commit 0aed5ab

Please sign in to comment.