Specifying custom planner in openrave python

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

Specifying custom planner in openrave python

Okal Billy
Hey All,

I am trying to write a python script to use planners I wrote as plugins, i,e PRMS
I am doing it like this

from openravepy import *
env = Environment()
env.SetViewer('qtcoin')
env.Load('data/lab1.env.xml')
robot = env.GetRobots()[0]
maniprob = env.CreateProblem('dualmanipulation')
#res = maniprob.MoveManipulator(goal=[-0.75, 1.24, -0.064, 2.33, -1.16, -1.548, 1.19])
#robot.WaitForController(0)

args = robot.GetName()

args += ' planner classicprm'

print args
env.LoadProblem(maniprob, args)
robot.WaitForController(0)
env.Destroy()

But all I see if the viewer starting up and quitting, i.e
[openravepy_int.cpp:2688] viewer qtcoin successfully attached
BarrettWAM planner classicprm
jadala@nyumbani-labs:~/WorkSpace/Projects/prob-planning$

Is this the correct way of specifying planners? or is just a problem with my planners? The ans to this could guide my next steps.



--
Best Regards,

Billy Okal

sure vi is user friendly, its just particular about who to be friends with

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying custom planner in openrave python

Rosen Diankov
Administrator
perhaps your planner failed?

can you try setting print to debug level:

env.SetDebugLevel(DebugLevel.Debug)

You should get a "DualManipulation: using XXX" message.

Also "LoadProblem" will just load the plugin, it won't send any
commands to the robot, that is why it is quitting for you.

rosen,

2010/6/10 Billy Okal <[hidden email]>:

> Hey All,
>
> I am trying to write a python script to use planners I wrote as plugins, i,e
> PRMS
> I am doing it like this
>
> from openravepy import *
> env = Environment()
> env.SetViewer('qtcoin')
> env.Load('data/lab1.env.xml')
> robot = env.GetRobots()[0]
> maniprob = env.CreateProblem('dualmanipulation')
> #res = maniprob.MoveManipulator(goal=[-0.75, 1.24, -0.064, 2.33, -1.16,
> -1.548, 1.19])
> #robot.WaitForController(0)
>
> args = robot.GetName()
>
> args += ' planner classicprm'
>
> print args
> env.LoadProblem(maniprob, args)
> robot.WaitForController(0)
> env.Destroy()
>
> But all I see if the viewer starting up and quitting, i.e
> [openravepy_int.cpp:2688] viewer qtcoin successfully attached
> BarrettWAM planner classicprm
> jadala@nyumbani-labs:~/WorkSpace/Projects/prob-planning$
>
> Is this the correct way of specifying planners? or is just a problem with my
> planners? The ans to this could guide my next steps.
>
>
>
> --
> Best Regards,
>
> Billy Okal
>
> sure vi is user friendly, its just particular about who to be friends with
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying custom planner in openrave python

Okal Billy
Hi Rosen,

Thanks now I get this

[openravepy_int.cpp:2688] viewer qtcoin successfully attached
[KinBody.cpp:2252] Successfully computed joint hierarchy for number of joints 11!
BarrettWAM planner classicprm
[dualmanipulation.h:78] DualManipulation: using classicprm planner
[environment.h:180] Environment destructor
[environment.h:188] resetting raveviewer
[environment.h:215] destroy problems
[qtcoinviewer.cpp:211] destroying qtcoinviewer
[environment.h:180] Environment destructor
[environment.h:188] resetting raveviewer
[environment.h:215] destroy problems
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libikfastsolvers.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/liboderave.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libpqprave.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/librplanners.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libqtcoinrave.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libbasecontrollers.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libopenprm.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/librmanipulation.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libdualmanipulation.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libbasesensors.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/liblogging.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libgrasper.so
[plugindatabase.h:61] RaveDatabase: closing plugin /usr/local/share/openrave/plugins/libbaserobots.so
jadala@nyumbani-labs:~/WorkSpace/Projects/prob-planning$

which I assume is so far ok, can u mention how I should send commands to the robot?

Best,

billy

On Thu, Jun 10, 2010 at 10:05 PM, Rosen Diankov <[hidden email]> wrote:
perhaps your planner failed?

can you try setting print to debug level:

env.SetDebugLevel(DebugLevel.Debug)

You should get a "DualManipulation: using XXX" message.

Also "LoadProblem" will just load the plugin, it won't send any
commands to the robot, that is why it is quitting for you.

rosen,

2010/6/10 Billy Okal <[hidden email]>:
> Hey All,
>
> I am trying to write a python script to use planners I wrote as plugins, i,e
> PRMS
> I am doing it like this
>
> from openravepy import *
> env = Environment()
> env.SetViewer('qtcoin')
> env.Load('data/lab1.env.xml')
> robot = env.GetRobots()[0]
> maniprob = env.CreateProblem('dualmanipulation')
> #res = maniprob.MoveManipulator(goal=[-0.75, 1.24, -0.064, 2.33, -1.16,
> -1.548, 1.19])
> #robot.WaitForController(0)
>
> args = robot.GetName()
>
> args += ' planner classicprm'
>
> print args
> env.LoadProblem(maniprob, args)
> robot.WaitForController(0)
> env.Destroy()
>
> But all I see if the viewer starting up and quitting, i.e
> [openravepy_int.cpp:2688] viewer qtcoin successfully attached
> BarrettWAM planner classicprm
> jadala@nyumbani-labs:~/WorkSpace/Projects/prob-planning$
>
> Is this the correct way of specifying planners? or is just a problem with my
> planners? The ans to this could guide my next steps.
>
>
>
> --
> Best Regards,
>
> Billy Okal
>
> sure vi is user friendly, its just particular about who to be friends with
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>



--
Best Regards,

Billy Okal

sure vi is user friendly, its just particular about who to be friends with

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying custom planner in openrave python

Rosen Diankov
Administrator
You can send commands using the controller SetTrajectory and
SetDesired functions. The planning functions like MoveManipulator use
SetTrajectory
rosen,

2010/6/10 Billy Okal <[hidden email]>:

> Hi Rosen,
>
> Thanks now I get this
>
> [openravepy_int.cpp:2688] viewer qtcoin successfully attached
> [KinBody.cpp:2252] Successfully computed joint hierarchy for number of
> joints 11!
> BarrettWAM planner classicprm
> [dualmanipulation.h:78] DualManipulation: using classicprm planner
> [environment.h:180] Environment destructor
> [environment.h:188] resetting raveviewer
> [environment.h:215] destroy problems
> [qtcoinviewer.cpp:211] destroying qtcoinviewer
> [environment.h:180] Environment destructor
> [environment.h:188] resetting raveviewer
> [environment.h:215] destroy problems
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libikfastsolvers.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/liboderave.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libpqprave.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/librplanners.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libqtcoinrave.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libbasecontrollers.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libopenprm.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/librmanipulation.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libdualmanipulation.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libbasesensors.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/liblogging.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libgrasper.so
> [plugindatabase.h:61] RaveDatabase: closing plugin
> /usr/local/share/openrave/plugins/libbaserobots.so
> jadala@nyumbani-labs:~/WorkSpace/Projects/prob-planning$
>
> which I assume is so far ok, can u mention how I should send commands to the
> robot?
>
> Best,
>
> billy
>
> On Thu, Jun 10, 2010 at 10:05 PM, Rosen Diankov <[hidden email]>
> wrote:
>>
>> perhaps your planner failed?
>>
>> can you try setting print to debug level:
>>
>> env.SetDebugLevel(DebugLevel.Debug)
>>
>> You should get a "DualManipulation: using XXX" message.
>>
>> Also "LoadProblem" will just load the plugin, it won't send any
>> commands to the robot, that is why it is quitting for you.
>>
>> rosen,
>>
>> 2010/6/10 Billy Okal <[hidden email]>:
>> > Hey All,
>> >
>> > I am trying to write a python script to use planners I wrote as plugins,
>> > i,e
>> > PRMS
>> > I am doing it like this
>> >
>> > from openravepy import *
>> > env = Environment()
>> > env.SetViewer('qtcoin')
>> > env.Load('data/lab1.env.xml')
>> > robot = env.GetRobots()[0]
>> > maniprob = env.CreateProblem('dualmanipulation')
>> > #res = maniprob.MoveManipulator(goal=[-0.75, 1.24, -0.064, 2.33, -1.16,
>> > -1.548, 1.19])
>> > #robot.WaitForController(0)
>> >
>> > args = robot.GetName()
>> >
>> > args += ' planner classicprm'
>> >
>> > print args
>> > env.LoadProblem(maniprob, args)
>> > robot.WaitForController(0)
>> > env.Destroy()
>> >
>> > But all I see if the viewer starting up and quitting, i.e
>> > [openravepy_int.cpp:2688] viewer qtcoin successfully attached
>> > BarrettWAM planner classicprm
>> > jadala@nyumbani-labs:~/WorkSpace/Projects/prob-planning$
>> >
>> > Is this the correct way of specifying planners? or is just a problem
>> > with my
>> > planners? The ans to this could guide my next steps.
>> >
>> >
>> >
>> > --
>> > Best Regards,
>> >
>> > Billy Okal
>> >
>> > sure vi is user friendly, its just particular about who to be friends
>> > with
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> > lucky parental unit.  See the prize list and enter to win:
>> > http://p.sf.net/sfu/thinkgeek-promo
>> > _______________________________________________
>> > Openrave-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/openrave-users
>> >
>> >
>
>
>
> --
> Best Regards,
>
> Billy Okal
>
> sure vi is user friendly, its just particular about who to be friends with
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users