Return type for probs.SendCommand() and Accessing trajectory pointer in python

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

Return type for probs.SendCommand() and Accessing trajectory pointer in python

achint
Hi Rosen
While using the SendCommand function on a probleminstance in python like 'success= prob.SendCommand( 'movetohandposition ............'), I am not getting any value for the return variable 'success'.. It is always null irrespective of the planning succeeding or failing.

You can use the dualarmdemo_schunk.py code: line no 54 as a reference:
                   success = self.probsmanip.SendCommand('movealljoints '+self.Serialize(T)) 

Thus, I am not able to determine if the planning has succeeded or failed..

Also, in the rmanipulation plugin, in the 'movemanipulator' function, passing the 'outputtraj' argument should return a trajectory pointer in the output stream...Is there any way I can access it in my python code? Till now I am saving the trajectories in a file and reading them again in another ROS node. It would be nice to pass the trajectories directly as a message!


Thanks
Achint
--

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Return type for probs.SendCommand() and Accessing trajectory pointer in python

Rosen Diankov
Administrator
hi achint,

Checking the return value for None is the proper way to check for a
command succeeding:

if success is None:
  raise ValueError('failed!')

Passing the outputtraj parameter, requests the entire trajectory to be
sent. The format of this trajectory is described in trajectory.h and
can be read back using the TrajectoryBase::Read function.
Unfortunately, The equivalent python function should be extremely
simple. It is not offered as part of openravepy on purpose since it is
not clear at this point how the trajectory class will evolve...

rosen,

2010/4/6 achint aggarwal <[hidden email]>:

> Hi Rosen
> While using the SendCommand function on a probleminstance in python like
> 'success= prob.SendCommand( 'movetohandposition ............'), I am not
> getting any value for the return variable 'success'.. It is always null
> irrespective of the planning succeeding or failing.
>
> You can use the dualarmdemo_schunk.py code: line no 54 as a reference:
>                    success = self.probsmanip.SendCommand('movealljoints
> '+self.Serialize(T))
>
> Thus, I am not able to determine if the planning has succeeded or failed..
>
> Also, in the rmanipulation plugin, in the 'movemanipulator' function,
> passing the 'outputtraj' argument should return a trajectory pointer in the
> output stream...Is there any way I can access it in my python code? Till now
> I am saving the trajectories in a file and reading them again in another ROS
> node. It would be nice to pass the trajectories directly as a message!
>
>
> Thanks
> Achint
> --
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users