Esempio n. 1
0
 def _build_goal(self, userdata):
     pose = position_tuple_to_pose(userdata.x, userdata.y, userdata.yaw)
     return Goal([Precondition(Condition.get('robot.pose'), pose)]) # TODO: prepared goal available: MoveToPoseGoal
Esempio n. 2
0
 def _build_goal(self, userdata):
     return Goal([Precondition(Condition.get('awareness'), 4)]) # TODO: prepared goal available: LocalAwareGoal
Esempio n. 3
0
 def testAddSame(self):
     self.assertIs(Condition.add(self.condition1), None,
                   'Could not add new condition')
     self.assertRaises(
         AssertionError, Condition.add,
         self.condition1)  # 'Could not add another new condition')
Esempio n. 4
0
 def testGetSame(self):
     self.assertIs(Condition.add(self.condition1), None,
                   'Could not add new condition')
     self.assertIs(Condition.get('name1'), self.condition1,
                   'Could not get that same condition')
Esempio n. 5
0
 def testAdd(self):
     self.assertIs(Condition.add(self.condition1), None,
                   'Could not add new condition')
     self.assertIs(Condition.add(self.condition2), None,
                   'Could not add another new condition')
Esempio n. 6
0
    def setUp(self):
        Condition._conditions_dict.clear(
        )  # start every test without previous conditions

        self.condition1 = Condition('name1')
        self.condition2 = Condition('name2')
Esempio n. 7
0
 def testGetSame(self):
     self.assertIs(Condition.add(self.condition1), None, 'Could not add new condition')
     self.assertIs(Condition.get('name1'), self.condition1, 'Could not get that same condition')
Esempio n. 8
0
 def testAddSame(self):
     self.assertIs(Condition.add(self.condition1), None, 'Could not add new condition')
     self.assertRaises(AssertionError, Condition.add, self.condition1) # 'Could not add another new condition')
Esempio n. 9
0
 def testAdd(self):
     self.assertIs(Condition.add(self.condition1), None, 'Could not add new condition')
     self.assertIs(Condition.add(self.condition2), None, 'Could not add another new condition')