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 20, 2023
1 parent f1aee7c commit ffe68d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 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 @@ -197,7 +198,6 @@ def image_cb(self, msg):
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 All @@ -206,7 +206,8 @@ def image_cb(self, msg):
label_names=[self.label_names[lbl] for lbl in labels],
label_proba=[np.average(score) for score in scores]
)

for i in range(len(skels_msg.skeletons)):
skels_msg.human_ids.append(Int32(data=i))
self.pub_skel.publish(skels_msg)
self.pub_pose.publish(poses_msg)
self.pub_rects.publish(rects_msg)
Expand Down

0 comments on commit ffe68d8

Please sign in to comment.