Go to the documentation of this file.00001
00002
00003 PKG = 'cob_3d_mapping_pipeline'
00004 import roslib; roslib.load_manifest(PKG)
00005 import rospy
00006 import smach
00007 import smach_ros
00008
00009
00010 from generic_mapping_states import *
00011
00012 class TestStates:
00013 def __init__(self, *args):
00014 rospy.init_node('test_states')
00015
00016 def test_update_map(self):
00017
00018 SM = smach.StateMachine(outcomes=['overall_succeeded','overall_failed'])
00019
00020 SM.userdata.angle_range = 0.6
00021
00022 SM.userdata.scan_pose = [0.515, -0.614, 1.583]
00023
00024
00025 with SM:
00026 smach.StateMachine.add('360', Map360(),
00027 transitions={'succeeded':'overall_succeeded', 'failed':'overall_failed'})
00028
00029
00030 try:
00031 SM.execute()
00032 except:
00033 error_message = "Unexpected error:", sys.exc_info()[0]
00034 self.fail(error_message)
00035
00036
00037 if __name__ == '__main__':
00038 test = TestStates()
00039 test.test_update_map()