Example #1
0
File: person.py Project: linas/hri
    def __init__(self, local_id):
        """

        The Person class constructor. Instantiates the person and their body parts.

        :param local_id: the id that uniquely identifies this person instance from all other person instances
        :type local_id: int
        """

        # Check types
        TypeChecker.accepts(inspect.currentframe().f_code.co_name, (int,), local_id)

        # Call the superclass constructor
        Entity.__init__(self, 'person' + str(local_id), None)

        # Create all of the persons body parts
        self.head = Head('head', self)
        self.neck = Neck('neck', self)
        self.torso = Torso('torso', self)

        self.left_shoulder = Shoulder('left_shoulder', self)
        self.left_elbow = Elbow('left_elbow', self)
        self.left_hand = Hand('left_hand', self)

        self.left_hip = Hip('left_hip', self)
        self.left_knee = Knee('left_knee', self)
        self.left_foot = Foot('left_foot', self)

        self.right_shoulder = Shoulder('right_shoulder', self)
        self.right_elbow = Elbow('right_elbow', self)
        self.right_hand = Hand('right_hand', self)

        self.right_hip = Hip('right_hip', self)
        self.right_knee = Knee('right_knee', self)
        self.right_foot = Foot('right_foot', self)
Example #2
0
File: person.py Project: linas/hri
    def __init__(self, local_frame_id, parent):
        """

        Instantiates a persons head.

        :param local_frame_id: identifies this body parts coordinate within the transformation tree (tf) when it is concatenated with its parents local_frame_id
        :type local_frame_id: str
        :param parent: the parent Person instance
        :type parent: Person
        """

        Entity.__init__(self, local_frame_id, parent)
Example #3
0
File: person.py Project: jdddog/hri
    def __init__(self, local_id):
        Entity.__init__(self, Person.ENTITY_TYPE, Person.ENTITY_TYPE + str(local_id), None)
        head = 'head'
        neck = 'neck'
        left_shoulder = 'left_shoulder'
        left_elbow = 'left_elbow'
        left_hand = 'left_hand'
        right_shoulder = 'right_shoulder'
        right_elbow = 'right_elbow'
        right_hand = 'right_hand'
        torso = 'torso'

        self.head = Head(head, head, self)
        self.neck = Neck(neck, neck, self)
        self.torso = Torso(torso, torso, self)
        self.left_hand = LeftHand(left_hand, left_hand, self)
        self.right_hand = RightHand(right_hand, right_hand, self)
Example #4
0
 def __init__(self, saliency_number):
     Entity.__init__(self, Saliency.ENTITY_TYPE,
                     Saliency.ENTITY_TYPE + str(saliency_number), None)
Example #5
0
 def __init__(self, saliency_number):
     Entity.__init__(self, Saliency.ENTITY_TYPE, Saliency.ENTITY_TYPE + str(saliency_number), None)
Example #6
0
File: person.py Project: jdddog/hri
 def __init__(self, entity_type, local_id, parent):
     Entity.__init__(self, entity_type, local_id, parent)