xacro.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 # Copyright (c) 2015, Open Source Robotics Foundation, Inc.
3 # Copyright (c) 2013, 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 are met:
8 #
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 # * Neither the name of the Open Source Robotics Foundation, Inc. nor the
15 # names of its contributors may be used to endorse or promote products
16 # derived from this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 # POSSIBILITY OF SUCH DAMAGE.
29 
30 # Authors: Stuart Glaser, William Woodall, Robert Haschke
31 # Maintainer: Morgan Quigley <morgan@osrfoundation.org>
32 
33 #### READ THIS! THIS FILE ONLY FOR BACKWARDS COMPATIBILITY!!!!!!
34 #
35 # this script is just for backwards compatibility. the roslaunch $(find ...)
36 # expects the script to be in the package directory, and in catkin
37 # the package direcory is the share directory. going forward, we should
38 # transition to scripts/xacro
39 
40 from __future__ import print_function
41 
42 # Guard against self import
43 import os
44 import sys
45 backup_path = list(sys.path)
46 this_dir = os.path.dirname(__file__)
47 # Use os.getcwd() to avoid weird symbolic link problems
48 cur_dir = os.getcwd()
49 os.chdir(this_dir)
50 this_dir_cwd = os.getcwd()
51 os.chdir(cur_dir)
52 # Remove this dir from path
53 sys.path = [a for a in sys.path if a not in [this_dir, this_dir_cwd]]
54 
55 import xacro
56 from xacro.color import warning
57 
58 # Restore the path
59 sys.path = backup_path
60 
61 xacro.main()
62 
63 # issue deprecation warning
64 warning('xacro.py is deprecated; please use xacro instead')
def warning(args, kwargs)
Definition: color.py:28


xacro
Author(s): Stuart Glaser, William Woodall, Robert Haschke
autogenerated on Sat Jun 8 2019 18:04:14