def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Shows how choose IK solutions so that move hand straight can move without discontinuities.' ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/puma_tabletop.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store", type='string', dest='manipname', default=None, help='Choose the manipulator to perform movement for') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Shows how to use different IK solutions for arms with few joints.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/pr2test1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store", type='string', dest='manipname', default='head_torso', help='name of manipulator to use (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Example showing how to compute a valid grasp as fast as possible without computing a grasp set, this is used when the target objects change frequently.' ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/wamtest1.env.xml', help='Scene file to load (default=%default)') parser.add_option( '--manipname', action="store", type='string', dest='manipname', default=None, help='Choose the manipulator to perform the grasping for') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Builds the convex decomposition of the robot and plots all the points that are tested inside of it.' ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--target', action="store", type='string', dest='target', default='robots/barrettwam.robot.xml', help='Target body to load (default=%default)') parser.add_option( '--samplingdelta', action="store", type='float', dest='samplingdelta', default=None, help='The sampling rate for the robot (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description='Manipulation planning example solving the hanoi problem.', usage='openrave.py --example hanoi [options]') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/hanoi_complex2.env.xml', help='Scene file to load (default=%default)') parser.add_option('--planner', action="store", type='string', dest='planner', default=None, help='the planner to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Shows how to use the grasping.GraspingModel to compute valid grasps for manipulation.' ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/wamtest1.env.xml', help='Scene file to load (default=%default)') parser.add_option( '--manipname', action="store", type='string', dest='manipname', default=None, help='Choose the manipulator to perform the grasping for') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Move base where the robot can perform target grasp using inversereachability database.' ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--robot', action="store", type='string', dest='robot', default='../robots/cob3.robot.xml', help='Robot filename to use (default=%default)') parser.add_option('--manipname', action="store", type='string', dest='manipname', default=None, help='name of manipulator to use (default=%default)') parser.add_option('--target', action="store", type='string', dest='target', default='data/mug2.kinbody.xml', help='filename of the target to use (default=%default)') (options, leftargs) = parser.parse_args(args=args) # use default options OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="test physics") OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Example shows how to query collision detection information using openravepy') OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='tutorial_plotting') OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="Views a calibration pattern from multiple locations.") OpenRAVEGlobalArguments.addOptions(parser) parser.add_option( "--scene", action="store", type="string", dest="scene", default="data/pa10calib.env.xml", help="Scene file to load (default=%default)", ) parser.add_option( "--sensorname", action="store", type="string", dest="sensorname", default=None, help="Name of the sensor whose views to generate (default is first sensor on robot)", ) parser.add_option( "--sensorrobot", action="store", type="string", dest="sensorrobot", default=None, help="Name of the robot the sensor is attached to (default=%default)", ) parser.add_option( "--norandomize", action="store_false", dest="randomize", default=True, help="If set, will not randomize the bodies and robot position in the scene.", ) parser.add_option( "--novisibility", action="store_false", dest="usevisibility", default=True, help="If set, will not perform any visibility searching.", ) parser.add_option( "--posedist", action="store", type="float", dest="posedist", default=0.05, help="An average distance between gathered poses. The smaller the value, the more poses robot will gather close to each other", ) (options, leftargs) = parser.parse_args(args=args) env = OpenRAVEGlobalArguments.parseAndCreate(options, defaultviewer=True) main(env, options)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ # set up planning environment parser = OptionParser(description='Find the transform that moves the hand to target') OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args(args=args) # use default options OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="test physics") OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args(args=args) env = OpenRAVEGlobalArguments.parseAndCreate(options,defaultviewer=True) main(env,options)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to set a workspace trajectory for the hand and have a robot plan it.', usage='openrave.py --example pr2turnlever [options]') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/pr2test1.env.xml', help='scene to load') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Explicitly specify goals to get a simple navigation and manipulation demo.', usage='openrave.py --example simplemanipulation [options]') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--planner',action="store",type='string',dest='planner',default=None, help='the planner to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="test physics") OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/hanoi.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to attach a callback to a viewer to perform functions.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/lab1.env.xml', help='OpenRAVE scene to load') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Displays all images of all camera sensors attached to a robot.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/testwamcamera.env.xml', help='OpenRAVE scene to load') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to use different IK solutions for arms with few joints.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/pr2wam_test1.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) env = OpenRAVEGlobalArguments.parseAndCreate(options,defaultviewer=True) main(env,options)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="Schunk Manipulation planning example\nFor a dual arm robot with Schunk LWA3 arms, plan trajectories for grasping an object and manipulating it on a shelf.") OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/dualarmmanipulation.env.xml', help='Scene file to load') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='RRT motion planning with constraints on the robot end effector.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='/home/student/rnd2/devel/ros_stacks/sandbox/urdf_collada/bin/lab1.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Simple navigation planning using RRTs.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='../environment/youbot_base_manipulation.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to use the grasping.GraspingModel to compute valid grasps for manipulation.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/wamtest1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store",type='string',dest='manipname',default=None, help='Choose the manipulator to perform the grasping for') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="test physics") OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/hanoi.env.xml', help='Scene file to load (default=%default)') parser.add_option('--timestep',action="store",type='float',dest='timestep',default=0.001, help='The physics simulation time step size (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='RRT motion planning with constraints on the robot end effector.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/lab1.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) env = OpenRAVEGlobalArguments.parseAndCreate(options,defaultviewer=True) main(env,options)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Builds the convex decomposition of the robot and plots all the points that are tested inside of it.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--target', action="store",type='string',dest='target',default='robots/barrettwam.robot.xml', help='Target body to load (default=%default)') parser.add_option('--samplingdelta', action="store",type='float',dest='samplingdelta',default=None, help='The sampling rate for the robot (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Visibility Planning Module.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/pa10grasp.env.xml', help='openrave scene to load') parser.add_option('--nocameraview',action="store_false",dest='usecameraview',default=True, help='If set, will not open any camera views') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to generate a 6D inverse kinematics solver and use it for getting all solutions.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/lab1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--iktype', action='store',type='string',dest='iktype',default=None, help='The ik type to build the solver current types are: %s'%(', '.join(iktype.name for iktype in IkParameterization.Type.values.values()))) (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to use the 5DOF IK solution for arms with >= 5 joints.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/katanatable.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname',action="store",type='string',dest='manipname',default='arm', help='name of manipulator to use (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Computes if an object is visibile inside the robot cameras.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/testwamcamera.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) env = OpenRAVEGlobalArguments.parseAndCreate(options,defaultviewer=True) main(env,options)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Example showing how to compute a valid grasp as fast as possible without computing a grasp set, this is used when the target objects change frequently.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/wamtest1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store",type='string',dest='manipname',default=None, help='Choose the manipulator to perform the grasping for') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Manipulation planning example solving the hanoi problem.', usage='openrave.py --example hanoi [options]') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/hanoi_complex2.env.xml', help='Scene file to load (default=%default)') parser.add_option('--planner',action="store",type='string',dest='planner',default=None, help='the planner to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Move base where the robot can perform target grasp using inversereachability database.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--robot',action="store",type='string',dest='robot',default='robots/pr2-beta-static.zae', help='Robot filename to use (default=%default)') parser.add_option('--manipname',action="store",type='string',dest='manipname',default=None, help='name of manipulator to use (default=%default)') parser.add_option('--target',action="store",type='string',dest='target',default='data/mug2.kinbody.xml', help='filename of the target to use (default=%default)') (options, leftargs) = parser.parse_args(args=args) # use default options OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how choose IK solutions so that move hand straight can move without discontinuities.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/puma_tabletop.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store",type='string',dest='manipname',default=None, help='Choose the manipulator to perform movement for') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Simple cube assembly task using grasp sets.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/hironxtable.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store",type='string',dest='manipname',default='leftarm_torso', help='The manipulator to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to use different IK solutions for arms with few joints.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/katanatable.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname',action="store",type='string',dest='manipname',default='arm', help='name of manipulator to use (default=%default)') parser.add_option('--withlocal',action="store_true",dest='withlocal',default=False, help='If set, will use the TranslationLocalGlobal6D type to further specify the target point in the manipulator coordinate system') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the two robot manipulation. """ parser = OptionParser(description='Have two robots navigate their environment with a table.', usage='python grasp_stuff.py [options]') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--environment',action="store",type='string',dest='environment',default='twopr2.env.xml', help='the environment to use') parser.add_option('-x', action="store", type='float', dest='x', default=0.0, help='the x location') parser.add_option('-y', action="store", type='float', dest='y', default=1.0, help='the y location') parser.add_option('-r', action="store", type='float', dest="r", default=math.pi, help='the orientation in radians') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description="test physics diff drive controller") parser.add_option('--scene', action="store", type='string', dest='scene', default='data/diffdrive_sample.env.xml', help='Scene file to load (default=%default)') OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Shows how to generate a 6D inverse kinematics solver and use it for getting all solutions.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/lab1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--transparency',action="store",type='float',dest='transparency',default=0.8, help='Transparency for every robot (default=%default)') parser.add_option('--maxnumber',action="store",type='int',dest='maxnumber',default=10, help='Max number of robots to render (default=%default)') parser.add_option('--manipname',action="store",type='string',dest='manipname',default=None, help='name of manipulator to use (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Autonomous grasp and manipulation planning example.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store",type='string',dest='scene',default='data/lab1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--nodestinations', action='store_true',dest='nodestinations',default=False, help='If set, will plan without destinations.') parser.add_option('--norandomize', action='store_false',dest='randomize',default=True, help='If set, will not randomize the bodies and robot position in the scene.') parser.add_option('--planner',action="store",type='string',dest='planner',default=None, help='the planner to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Computes if an object is visibile inside the robot cameras.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/testwamcamera.env.xml', help='Scene file to load (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= "Schunk Manipulation planning example\nFor a dual arm robot with Schunk LWA3 arms, plan trajectories for grasping an object and manipulating it on a shelf." ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/dualarmmanipulation.env.xml', help='Scene file to load') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description= 'Shows how to generate a 6D inverse kinematics solver and use it for getting all solutions.' ) OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/lab1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--transparency', action="store", type='float', dest='transparency', default=0.8, help='Transparency for every robot (default=%default)') parser.add_option('--maxnumber', action="store", type='int', dest='maxnumber', default=10, help='Max number of robots to render (default=%default)') parser.add_option('--manipname', action="store", type='string', dest='manipname', default=None, help='name of manipulator to use (default=%default)') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser(description='Views a calibration pattern from multiple locations.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene',action="store",type='string',dest='scene',default='data/pa10calib.env.xml', help='Scene file to load (default=%default)') parser.add_option('--sensorname',action="store",type='string',dest='sensorname',default=None, help='Name of the sensor whose views to generate (default is first sensor on robot)') parser.add_option('--sensorrobot',action="store",type='string',dest='sensorrobot',default=None, help='Name of the robot the sensor is attached to (default=%default)') parser.add_option('--norandomize', action='store_false',dest='randomize',default=True, help='If set, will not randomize the bodies and robot position in the scene.') parser.add_option('--novisibility', action='store_false',dest='usevisibility',default=True, help='If set, will not perform any visibility searching.') parser.add_option('--noshowsensor', action='store_false',dest='showsensor',default=True, help='If set, will not show the sensor.') parser.add_option('--posedist',action="store",type='float',dest='posedist',default=0.05, help='An average distance between gathered poses. The smaller the value, the more poses robot will gather close to each other') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options,main,defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description='Autonomous grasp and manipulation planning example.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/lab1.env.xml', help='Scene file to load (default=%default)') parser.add_option('--nodestinations', action='store_true', dest='nodestinations', default=False, help='If set, will plan without destinations.') parser.add_option( '--norandomize', action='store_false', dest='randomize', default=True, help= 'If set, will not randomize the bodies and robot position in the scene.' ) parser.add_option('--planner', action="store", type='string', dest='planner', default=None, help='the planner to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
def run(args=None): """Command-line execution of the example. :param args: arguments for script to parse, if not specified will use sys.argv """ parser = OptionParser( description='Simple cube assembly task using grasp sets.') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='data/hironxtable.env.xml', help='Scene file to load (default=%default)') parser.add_option('--manipname', action="store", type='string', dest='manipname', default='leftarm_torso', help='The manipulator to use') (options, leftargs) = parser.parse_args(args=args) OpenRAVEGlobalArguments.parseAndCreateThreadedUser(options, main, defaultviewer=True)
from openravepy.misc import OpenRAVEGlobalArguments def vararg_callback(option, opt_str, value, parser): assert value is None value = parser.rargs[:] del parser.rargs[:len(value)] setattr(parser.values, option.dest, value) if __name__ == "__main__": parser = OptionParser( description='OpenRAVE %s' % openravepy.__version__, version=openravepy.__version__, usage='%prog [options] [loadable openrave xml/robot files...]') OpenRAVEGlobalArguments.addOptions(parser, testmode=False) parser.add_option( '--database', action="callback", callback=vararg_callback, dest='database', default=None, help= 'If specified, the next arguments will be used to call a database generator from the openravepy.databases module. The first argument is used to find the database module. For example: openrave0.9.py --database grasping --robot=robots/pr2-beta-sim.robot.xml' ) parser.add_option( '--example', action="callback", callback=vararg_callback, dest='example', default=None,
def spin(self): parser = OptionParser(description='Openrave Velma interface') OpenRAVEGlobalArguments.addOptions(parser) (options, leftargs) = parser.parse_args() self.env = OpenRAVEGlobalArguments.parseAndCreate( options) #,defaultviewer=True) self.openrave_robot = self.env.ReadRobotXMLFile( 'robots/barretthand_ros.robot.xml') link = self.openrave_robot.GetLink( "right_HandFingerOneKnuckleThreeLink") col = link.GetCollisionData() vertices = col.vertices faces = col.indices print "sampling the surface..." points = surfaceutils.sampleMeshDetailedRays(vertices, faces, 0.001) print "surface has %s points" % (len(points)) # vertices, faces = surfaceutils.readStl("klucz_gerda_ascii.stl", scale=1.0) # points = surfaceutils.sampleMeshDetailedRays(vertices, faces, 0.002) print len(points) with open('points.txt', 'w') as f: for pt in points: p = pt.pos f.write( str(p.x()) + ' ' + str(p.y()) + ' ' + str(p.z()) + '\n') call(["touch", "out_surf.off"]) call(["touch", "out_axis.off"]) call([ "/home/dseredyn/code/cocone/tightcocone/tcocone-linux", "-m", "points.txt", "out" ]) calc_radius = False points_medial = [] with open('out_axis.off', 'r') as f: header = f.readline() header_s = header.split() p_count = int(header_s[1]) for i in range(0, p_count): line = f.readline() values = line.split() center = PyKDL.Vector(float(values[0]), float(values[1]), float(values[2])) if calc_radius: radius = None for pt in points: dist = (center - pt.pos).Norm() if radius == None or radius > dist: radius = dist points_medial.append([center, radius * 2.0]) else: points_medial.append([center, 0.001]) print len(points_medial) # m_id = 0 # for p in points: # m_id = self.pub_marker.publishSinglePointMarker(PyKDL.Vector(p[0], p[1], p[2]), m_id, r=0, g=1, b=0, namespace='default', frame_id='world', m_type=Marker.CUBE, scale=Vector3(0.005, 0.005, 0.005), T=None) # m_id = 0 # for p in points_medial: # m_id = self.pub_marker.publishSinglePointMarker(p[0], m_id, r=1, g=0, b=0, namespace='default', frame_id='world', m_type=Marker.SPHERE, scale=Vector3(p[1],p[1],p[1]), T=None) m_id = 0 m_id = self.pub_marker.publishMultiPointsMarkerWithSize( points_medial, m_id, r=1, g=0, b=0, namespace='default', frame_id='world', m_type=Marker.SPHERE, T=None) # m_id = self.pub_marker.publishMultiPointsMarker(points_medial, m_id, r=1, g=0, b=0, namespace='default', frame_id='world', m_type=Marker.SPHERE, scale=Vector3(0.0005, 0.0005, 0.0005), T=None) rospy.sleep(1) exit(0)
import numpy, time, threading from itertools import izip import tf import orrosplanning.srv from orrosplanning.srv import IKRequest import sensor_msgs.msg import arm_navigation_msgs.msg from arm_navigation_msgs.msg import ArmNavigationErrorCodes import geometry_msgs.msg import trajectory_msgs.msg import kinematics_msgs.srv if __name__ == "__main__": parser = OptionParser(description='openrave planning example') OpenRAVEGlobalArguments.addOptions(parser) parser.add_option('--scene', action="store", type='string', dest='scene', default='robots/pr2-beta-static.zae', help='scene to load (default=%default)') parser.add_option( '--ipython', '-i', action="store_true", dest='ipython', default=False, help='if true will drop into the ipython interpreter rather than spin') parser.add_option( '--collision_map',