Package rospy

Source Code for Package rospy

  1  # Software License Agreement (BSD License) 
  2  # 
  3  # Copyright (c) 2008, Willow Garage, Inc. 
  4  # All rights reserved. 
  5  # 
  6  # Redistribution and use in source and binary forms, with or without 
  7  # modification, are permitted provided that the following conditions 
  8  # are met: 
  9  # 
 10  #  * Redistributions of source code must retain the above copyright 
 11  #    notice, this list of conditions and the following disclaimer. 
 12  #  * Redistributions in binary form must reproduce the above 
 13  #    copyright notice, this list of conditions and the following 
 14  #    disclaimer in the documentation and/or other materials provided 
 15  #    with the distribution. 
 16  #  * Neither the name of Willow Garage, Inc. nor the names of its 
 17  #    contributors may be used to endorse or promote products derived 
 18  #    from this software without specific prior written permission. 
 19  # 
 20  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 21  # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 22  # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
 23  # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
 24  # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
 25  # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
 26  # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
 27  # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
 28  # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
 29  # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
 30  # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 31  # POSSIBILITY OF SUCH DAMAGE. 
 32  # 
 33  # Copyright (c) 2008, Willow Garage, Inc. 
 34  # Revision $Id$ 
 35   
 36  """ 
 37  ROS client library for Python. 
 38  See U{http://ros.org/wiki/rospy} 
 39  @author: Ken Conley (kwc) 
 40  """ 
 41   
 42  # import symbols into rospy namespace 
 43  # NOTE: there are much better ways to configure python module 
 44  # dictionaries, but the rospy codebase isn't quite in shape for that 
 45  # yet 
 46   
 47  from std_msgs.msg import Header 
 48   
 49  from .client import spin, myargv, init_node, \ 
 50      get_published_topics, \ 
 51      wait_for_message, \ 
 52      get_master, \ 
 53      on_shutdown, \ 
 54      get_param, get_param_names, set_param, delete_param, has_param, search_param,\ 
 55      DEBUG, INFO, WARN, ERROR, FATAL 
 56  from .timer import sleep, Rate, Timer 
 57  from .core import is_shutdown, signal_shutdown, \ 
 58      get_node_uri, get_ros_root, \ 
 59      logdebug, logwarn, loginfo, logout, logerr, logfatal, \ 
 60      logdebug_throttle, logwarn_throttle, loginfo_throttle, logerr_throttle, logfatal_throttle, \ 
 61      parse_rosrpc_uri 
 62  from .exceptions import * 
 63  from .msg import AnyMsg 
 64  from .msproxy import MasterProxy 
 65  from .names import get_name, get_caller_id, get_namespace, resolve_name, remap_name 
 66  from .rostime import Time, Duration, get_rostime, get_time 
 67  from .service import ServiceException 
 68   
 69  # - use tcp ros implementation of services 
 70  from .impl.tcpros_service import Service, ServiceProxy, wait_for_service 
 71  from .topics import Message, SubscribeListener, Publisher, Subscriber 
 72   
 73  ## \defgroup validators Validators 
 74  ## \defgroup clientapi Client API 
 75   
 76  __all__ = [ 
 77      'Header', 
 78      'spin', 
 79      'myargv', 
 80      'init_node', 
 81      'get_master', 
 82      'get_published_topics', 
 83      'wait_for_service', 
 84      'on_shutdown', 
 85      'get_param', 
 86      'get_param_names', 
 87      'set_param', 
 88      'delete_param', 
 89      'has_param', 
 90      'search_param', 
 91      'sleep', 
 92      'Rate', 
 93      'DEBUG', 
 94      'INFO', 
 95      'WARN', 
 96      'ERROR', 
 97      'FATAL', 
 98      'is_shutdown', 
 99      'signal_shutdown', 
100      'get_node_uri', 
101      'get_ros_root', 
102      'logdebug', 
103      'logwarn', 'loginfo', 
104      'logout', 'logerr', 'logfatal', 
105      'logdebug_throttle', 
106      'logwarn_throttle', 'loginfo_throttle', 
107      'logerr_throttle', 'logfatal_throttle', 
108      'parse_rosrpc_uri', 
109      'MasterProxy', 
110      'ROSException', 
111      'ROSSerializationException', 
112      'ROSInitException', 
113      'ROSInterruptException', 
114      'ROSInternalException', 
115      'TransportException', 
116      'TransportTerminated', 
117      'TransportInitError', 
118      'AnyMsg', 'Message', 
119      'get_name', 
120      'get_caller_id', 
121      'get_namespace', 
122      'resolve_name', 
123      'remap_name', 
124      'Time', 'Duration', 'get_rostime', 'get_time', 
125      'ServiceException',  
126      'Service', 'ServiceProxy', 
127      'SubscribeListener', 'Publisher', 'Subscriber', 
128      ] 
129