示例#1
0
 def test_create_saliency(self):
     msg = EntityMsg()
     msg.type = 'saliency'
     msg.number = 1
     saliency = Saliency.create_saliency(msg)
     self.assertEqual(saliency.tf_frame_id(), 'saliency_1')
     self.assertEqual(saliency.default_tf_frame_id() , 'saliency_1')
示例#2
0
文件: world.py 项目: linas/hri
    def to_entity_list_msg(entities):
        entity_list_msg = EntityListMsg()

        for entity in entities:
            entity_msg = EntityMsg()
            entity_msg.entity_id = entity.global_id()
            entity_list_msg.entities.append(entity_msg)

        return entity_list_msg
示例#3
0
    def to_entity_list_msg(entities):
        entity_list_msg = EntityListMsg()

        for entity in entities:
            entity_msg = EntityMsg()
            entity_msg.entity_id = entity.get_id()
            entity_list_msg.entities.append(entity_msg)

        return entity_list_msg
示例#4
0
 def test_create_person(self):
     msg = EntityMsg()
     msg.type = 'person'
     msg.number = 1
     person = Person.create_person(msg)
     self.assertEqual(person.tf_frame_id(), 'person_1')
     self.assertEqual(person.neck.tf_frame_id(), 'person_1_neck')
     self.assertEqual(person.head.tf_frame_id(), 'person_1_head')
     self.assertEqual(person.torso.tf_frame_id(), 'person_1_torso')
     self.assertEqual(person.left_hand.tf_frame_id(), 'person_1_left_hand')
     self.assertEqual(person.right_hand.tf_frame_id(), 'person_1_right_hand')
     self.assertEqual(person.default_tf_frame_id(), 'person_1_torso')