Go to the documentation of this file.00001
00002
00003 import roslib; roslib.load_manifest('openraveros_tutorials')
00004 import rospy
00005 import os
00006 from optparse import OptionParser
00007 from openravepy import *
00008 from openravepy.misc import OpenRAVEGlobalArguments
00009
00010 if __name__ == "__main__":
00011 parser = OptionParser(description='openrave planning example')
00012 OpenRAVEGlobalArguments.addOptions(parser)
00013 (options, args) = parser.parse_args()
00014 try:
00015 env = OpenRAVEGlobalArguments.parseAndCreate(options,defaultviewer=False)
00016 env.SetViewer('qtcoin')
00017 RaveLoadPlugin(os.path.join(roslib.packages.get_pkg_dir('openraveros'),'lib','openraveros'))
00018 namespace = 'openrave'
00019 if env.AddModule(RaveCreateModule(env,'rosserver'),namespace) != 0:
00020 raise ValueError('failed to create openraveros server')
00021
00022 raw_input('press any key to exit')
00023 finally:
00024 RaveDestroy()