parameters: (self, ppl_msg)
docstring: ppl_msg (jsk_recognition_msgs/PeoplePoseArray)
  
          refer: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/output.md
docstring_summary: ppl_msg (jsk_recognition_msgs/PeoplePoseArray)
docstring_tokens: ppl_msg ( jsk_recognition_msgs / PeoplePoseArray )
function: def on_people(self, ppl_msg):
          """
          ppl_msg (jsk_recognition_msgs/PeoplePoseArray)
  
          refer: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/output.md
          """
          frame_id = remove_slash(ppl_msg.header.frame_id)
          in_objects = self.objects
          objects = []
          for bbox in in_objects:
              if remove_slash(bbox.header.frame_id) != frame_id:
                  ps = PoseStamped(header=bbox.header, pose=bbox.pose)
                  try:
                      ps = self.tfl.transform(ps, frame_id)
                      bbox.header, bbox.pose = ps.header, ps.pose
                      objects.append(bbox)
                  except tf2_ros.TransformException:
                      continue
  
          out_bboxes = []
          out_markers = []
          for i, pose in enumerate(ppl_msg.poses):
              # for each person
              if "rarm" in self.use_arm:
                  rwrist = find_pose("RWrist", pose)
                  rfinger = find_pose(["RHand5", "RHand6", "RHand7", "RHand8"], pose)
                  if rwrist is not None and rfinger is not None:
                      rclosest, rdist = self.get_closest_bbox((rwrist, rfinger), objects)
                      if rdist is not None and\
                         self.min_dist_threshold <= rdist <= self.max_dist_threshold:
                          out_bboxes.append(rclosest)
                      rmarker = self.get_marker((rwrist, rfinger), frame_id)
                      rmarker.id = 2 * i
                      out_markers.append(rmarker)
  
              if "larm" in self.use_arm:
                  lwrist = find_pose("LWrist", pose)
                  lfinger = find_pose(["LHand5", "LHand6", "LHand7", "LHand8"], pose)
                  if lwrist is not None and lfinger is not None:
                      lclosest, ldist = self.get_closest_bbox((lwrist, lfinger), objects)
                      if ldist is not None and\
                         self.min_dist_threshold <= ldist <= self.max_dist_threshold:
                          out_bboxes.append(lclosest)
                      lmarker = self.get_marker((lwrist, lfinger), frame_id)
                      lmarker.id = 2 * i + 1
                      out_markers.append(lmarker)
  
          # publish
          if out_bboxes:
              msg = BoundingBoxArray()
              msg.header.stamp = rospy.Time.now()
              msg.header.frame_id = frame_id
              msg.boxes = out_bboxes
              self.pub_bbox.publish(msg)
          if out_markers:
              self.pub_marker.publish(MarkerArray(markers=out_markers))
function_tokens: def on_people ( self , ppl_msg ) : frame_id = remove_slash ( ppl_msg . header . frame_id ) in_objects = self . objects objects = [ ] for bbox in in_objects : if remove_slash ( bbox . header . frame_id ) != frame_id : ps = PoseStamped ( header = bbox . header , pose = bbox . pose ) try : ps = self . tfl . transform ( ps , frame_id ) bbox . header , bbox . pose = ps . header , ps . pose objects . append ( bbox ) except tf2_ros . TransformException : continue out_bboxes = [ ] out_markers = [ ] for i , pose in enumerate ( ppl_msg . poses ) : # for each person if "rarm" in self . use_arm : rwrist = find_pose ( "RWrist" , pose ) rfinger = find_pose ( [ "RHand5" , "RHand6" , "RHand7" , "RHand8" ] , pose ) if rwrist is not None and rfinger is not None : rclosest , rdist = self . get_closest_bbox ( ( rwrist , rfinger ) , objects ) if rdist is not None and self . min_dist_threshold <= rdist <= self . max_dist_threshold : out_bboxes . append ( rclosest ) rmarker = self . get_marker ( ( rwrist , rfinger ) , frame_id ) rmarker . id = 2 * i out_markers . append ( rmarker ) if "larm" in self . use_arm : lwrist = find_pose ( "LWrist" , pose ) lfinger = find_pose ( [ "LHand5" , "LHand6" , "LHand7" , "LHand8" ] , pose ) if lwrist is not None and lfinger is not None : lclosest , ldist = self . get_closest_bbox ( ( lwrist , lfinger ) , objects ) if ldist is not None and self . min_dist_threshold <= ldist <= self . max_dist_threshold : out_bboxes . append ( lclosest ) lmarker = self . get_marker ( ( lwrist , lfinger ) , frame_id ) lmarker . id = 2 * i + 1 out_markers . append ( lmarker ) # publish if out_bboxes : msg = BoundingBoxArray ( ) msg . header . stamp = rospy . Time . now ( ) msg . header . frame_id = frame_id msg . boxes = out_bboxes self . pub_bbox . publish ( msg ) if out_markers : self . pub_marker . publish ( MarkerArray ( markers = out_markers ) )