question about OptionParser

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

question about OptionParser

Huan Liu
Hi Rosen,

What's the proper way of setting the options (e.g. constructing the
options object) for the autogenerate() function in grasping.py?

I don't quite understand how OptionParser() in openrave works... It
seems to designed for taking command line arguments. Is there a
simpler interface for setting the options in python?

Thanks!

Huan

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: question about OptionParser

Rosen Diankov
Administrator
hi huan,

This is an excellent question. Currently the 'options' parameter in
the autogenerate functions just holds the names of all the parameters
and their values. For example, to pass in a custom options object do:

class MyOptions: pass
options = MyOptions()
options.friction = 0.1
...
gmodel.autogenerate(options)

For now, you'll have to look inside the code to see the format for
each of the parameters. Eventually they will be put into the
documentation.

rosen,

2010/9/15 Huan Liu <[hidden email]>:

> Hi Rosen,
>
> What's the proper way of setting the options (e.g. constructing the
> options object) for the autogenerate() function in grasping.py?
>
> I don't quite understand how OptionParser() in openrave works... It
> seems to designed for taking command line arguments. Is there a
> simpler interface for setting the options in python?
>
> Thanks!
>
> Huan
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users