test_180_scan.py
Go to the documentation of this file.
00001 #!/usr/bin/python
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 #import unittest
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         # create a SMACH state machine
00018         SM = smach.StateMachine(outcomes=['overall_succeeded','overall_failed'])
00019         #SM.userdata.pose = "home"
00020         SM.userdata.angle_range = 0.6
00021         #SM.userdata.scan_pose = [-1.3, -1.0, 3.14]
00022         SM.userdata.scan_pose = [0.515, -0.614, 1.583]
00023 
00024         # open the container
00025         with SM:
00026             smach.StateMachine.add('180', Map180(),
00027                 transitions={'succeeded':'overall_succeeded', 'failed':'overall_failed'})
00028             #smach.StateMachine.add('UPDATE', Map360(),
00029             #    transitions={'succeeded':'overall_succeeded', 'failed':'overall_failed'})
00030         try:
00031             SM.execute()
00032         except:
00033             error_message = "Unexpected error:", sys.exc_info()[0]
00034             self.fail(error_message)
00035 
00036 # main
00037 if __name__ == '__main__':
00038     test = TestStates()
00039     test.test_update_map()


cob_3d_mapping_pipeline
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:03:28