00001 # Copyright (c) 2013, Felix Kolbe 00002 # All rights reserved. BSD License 00003 # 00004 # Redistribution and use in source and binary forms, with or without 00005 # modification, are permitted provided that the following conditions 00006 # are met: 00007 # 00008 # * Redistributions of source code must retain the above copyright 00009 # notice, this list of conditions and the following disclaimer. 00010 # 00011 # * Redistributions in binary form must reproduce the above copyright 00012 # notice, this list of conditions and the following disclaimer in the 00013 # documentation and/or other materials provided with the distribution. 00014 # 00015 # * Neither the name of the {organization} nor the names of its 00016 # contributors may be used to endorse or promote products derived 00017 # from this software without specific prior written permission. 00018 # 00019 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00020 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00021 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00022 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00023 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00024 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00025 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00026 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00027 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00028 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00029 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 00031 00032 ## own exports 00033 00034 from common_ros import ROSTopicCondition, ROSTopicAction 00035 00036 from introspection import Introspector 00037 00038 from runner import SMACHRunner 00039 00040 00041 ## used packages 00042 00043 import rgoap 00044 import rospy 00045 00046 00047 ### set up rgoap-ros interface 00048 00049 ## forward rgoap's logging to ROS 00050 import logging 00051 00052 # ..for console output 00053 import rosgraph.roslogging as _rl 00054 logging.getLogger('rgoap').addHandler(_rl.RosStreamHandler()) 00055 00056 # ..for network output (/rosout) 00057 import rospy.impl.rosout as _ro 00058 logging.getLogger('rgoap').addHandler(_ro.RosOutHandler()) 00059 00060 # remove the default console output 00061 rgoap.remove_default_loghandler() 00062 00063 00064 ## shutdown handling 00065 rgoap.set_shutdown_check(rospy.is_shutdown)