RuntimeError

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

RuntimeError

sam yang
Hi, Rosen

I am new to use the OPENRAVE. I think it is a good project for robot simulation and i like it.
In my need, i want to combine two python example (simplenavigation.py & graspplanning.py).
Let the robot(BarrettWAM) can from other place to go to in front of the table then grasp the cup.
so i write the python codes as follows:

import openravepy
import time

def run():
    env = openravepy.Environment()
    try:
        env.SetViewer('qtcoin')
        env.Load('data/lab1.env.xml')
        robot = env.GetRobots()[0]
        env.UpdatePublishedBodies()
        time.sleep(0.1) # give time for environment to update
        SNP =openravepy.examples.simplenavigation.SimpleNavigationPlanning(robot)
        SNP.performNavigationPlanning()
        GP=openravepy.examples.graspplanning.GraspPlanning(robot)
        GP.performGraspPlanning()
      
      
    finally:
        env.Destroy()

if __name__ == "__main__":
    run()


In lab1.env.xml, i change the <Robot><translation>. make the robot start from other place.
In simplenavigation.py, i change while loop to do one time.

But it doesn't work, there has a runtimeError as below:

RuntimeError: OpenRAVE: [/home/user/openrave/plugins/rmanipulation/taskmanipulation.h:1074] -> OpenRAVE::TrajectoryBasePtr TaskManipulation::_PlanGrasp(std::list<GRASPGOAL, std::allocator<GRASPGOAL> >&, int, GRASPGOAL&, int, std::map<std::vector<float, std::allocator<float> >, boost::shared_ptr<OpenRAVE::TrajectoryBase>, GraspVectorCompare, std::allocator<std::pair<const std::vector<float, std::allocator<float> >, boost::shared_ptr<OpenRAVE::TrajectoryBase> > > >&), expr: itgoal->viksolution.size() == pmanip->GetArmJoints().size()

could you please help me to deal with this problem, thanks a lot

Best regards,
yasam

------------------------------------------------------------------------------
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: RuntimeError

Rosen Diankov
Administrator
hi yasam,

The active dofs were not being reset when the task manipulation
planner started, making the planner think it is also planning with
XY+angle. this is now fixed in r1497

Also, the simplenavigation planner is really just an example, i don't
recommend using it for serious navigation planning.

rosen,

2010/6/7 sam yang <[hidden email]>:

> Hi, Rosen
>
> I am new to use the OPENRAVE. I think it is a good project for robot
> simulation and i like it.
> In my need, i want to combine two python example (simplenavigation.py &
> graspplanning.py).
> Let the robot(BarrettWAM) can from other place to go to in front of the
> table then grasp the cup.
> so i write the python codes as follows:
>
> import openravepy
> import time
>
> def run():
>     env = openravepy.Environment()
>     try:
>         env.SetViewer('qtcoin')
>         env.Load('data/lab1.env.xml')
>         robot = env.GetRobots()[0]
>         env.UpdatePublishedBodies()
>         time.sleep(0.1) # give time for environment to update
>         SNP
> =openravepy.examples.simplenavigation.SimpleNavigationPlanning(robot)
>         SNP.performNavigationPlanning()
>         GP=openravepy.examples.graspplanning.GraspPlanning(robot)
>         GP.performGraspPlanning()
>
>
>     finally:
>         env.Destroy()
>
> if __name__ == "__main__":
>     run()
>
> In lab1.env.xml, i change the <Robot><translation>. make the robot start
> from other place.
> In simplenavigation.py, i change while loop to do one time.
>
> But it doesn't work, there has a runtimeError as below:
>
> RuntimeError: OpenRAVE:
> [/home/user/openrave/plugins/rmanipulation/taskmanipulation.h:1074] ->
> OpenRAVE::TrajectoryBasePtr
> TaskManipulation::_PlanGrasp(std::list<GRASPGOAL, std::allocator<GRASPGOAL>
>>&, int, GRASPGOAL&, int, std::map<std::vector<float, std::allocator<float>
>>, boost::shared_ptr<OpenRAVE::TrajectoryBase>, GraspVectorCompare,
> std::allocator<std::pair<const std::vector<float, std::allocator<float> >,
> boost::shared_ptr<OpenRAVE::TrajectoryBase> > > >&), expr:
> itgoal->viksolution.size() == pmanip->GetArmJoints().size()
>
> could you please help me to deal with this problem, thanks a lot
>
> Best regards,
> yasam
>
> ------------------------------------------------------------------------------
> 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