def test_stop_walking_no_queue(self): translator = BDIStepTranslator() def handle_steps(channel, msg_data): msg = atlas.behavior_step_params_t.decode(msg_data) self.assertEqual(msg.desired_step_spec.step_index, -1) lc = lcm.LCM() lc.subscribe('ATLAS_STEP_PARAMS', handle_steps) translator.handle_stop_walking('STOP_WALKING', None) lc.handle()
def test_stop_walking_no_queue(self): translator = BDIStepTranslator() def handle_steps(channel, msg_data): msg = atlas.behavior_step_params_t.decode(msg_data) self.assertEqual(msg.desired_step_spec.step_index, -1) lc = lcm.LCM() lc.subscribe('ATLAS_STEP_PARAMS', handle_steps) translator.handle_stop_walking('STOP_WALKING', None) lc.handle()
def test_stop_walking(self): plan = self.generate_plan(drc.footstep_opts_t.BEHAVIOR_BDI_STEPPING) translator = BDIStepTranslator() translator.handle_footstep_plan('COMMITTED_FOOTSTEP_PLAN', plan.encode()) def handle_steps(channel, msg_data): msg = atlas.behavior_step_params_t.decode(msg_data) self.assertEqual(msg.desired_step_spec.step_index, -1) lc = lcm.LCM() lc.subscribe('ATLAS_STEP_PARAMS', handle_steps) translator.handle_stop_walking('STOP_WALKING', None) lc.handle()
def test_stop_walking(self): plan = self.generate_plan(drc.footstep_opts_t.BEHAVIOR_BDI_STEPPING) translator = BDIStepTranslator() translator.handle_footstep_plan('COMMITTED_FOOTSTEP_PLAN', plan.encode()) def handle_steps(channel, msg_data): msg = atlas.behavior_step_params_t.decode(msg_data) self.assertEqual(msg.desired_step_spec.step_index, -1) lc = lcm.LCM() lc.subscribe('ATLAS_STEP_PARAMS', handle_steps) translator.handle_stop_walking('STOP_WALKING', None) lc.handle()