using trajectories

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

using trajectories

clemens
Hello,

I'm having problems setting up a trajectory, the final configuration
is always immediately active, no motion is visible at all. Here's my
code:

std::vector<OpenRAVE::dReal> q0( 11 );
q0[0] = 0;
q0[1] = 0;
q0[2] = 0;
q0[3] = 0;
q0[4] = 0;
q0[5] = 0;
q0[6] = 0;
q0[7] = 0;
q0[8] = 0;
q0[9] = 0;
q0[10] = 0;

OpenRAVE::TrajectoryBasePtr traj =
this->environment->CreateTrajectory( q0.size() );
traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );

q0[3] = DEG2RAD(120.0);

traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
false, false );
this->robot->GetController()->SetPath( traj );


It's controlling a WAM+BarrettHand.
What am I doing wrong?

Thanks for your help,
clemens

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

Rosen Diankov
Administrator
hi clemens

I'm not sure what the problem is, perhaps you are waiting when you
have the environment locked? If the environment is locked, no other
module will modify bodies in it.

Anyway, I just put up a new cpp example (r1674) showing how to start
trajectories in cpp:
http://openrave.programmingvision.com/ordocs/en/html/ortrajectory_8cpp-example.html

rosen,

2010/7/26 Clemens Eppner <[hidden email]>:

> Hello,
>
> I'm having problems setting up a trajectory, the final configuration
> is always immediately active, no motion is visible at all. Here's my
> code:
>
> std::vector<OpenRAVE::dReal> q0( 11 );
> q0[0] = 0;
> q0[1] = 0;
> q0[2] = 0;
> q0[3] = 0;
> q0[4] = 0;
> q0[5] = 0;
> q0[6] = 0;
> q0[7] = 0;
> q0[8] = 0;
> q0[9] = 0;
> q0[10] = 0;
>
> OpenRAVE::TrajectoryBasePtr traj =
> this->environment->CreateTrajectory( q0.size() );
> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );
>
> q0[3] = DEG2RAD(120.0);
>
> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
> traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
> false, false );
> this->robot->GetController()->SetPath( traj );
>
>
> It's controlling a WAM+BarrettHand.
> What am I doing wrong?
>
> Thanks for your help,
> clemens
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

clemens
hi rosen,

thanks, after doing a scoped_lock and waiting for the
Controller->IsDone(), it works!

But I'm still missing something. I have a simple xml-setup: A wam
sitting on a static table (connected by a 0 limit hinge) and a dynamic
cylinder, also on top of the table.
As soon as I start the trajectory, the table+wam combo is translated
into the ground but also in x- & y-direction, while the cylinder
remains where it was.
What's going on here?

When I activate the physics engine the same happens (of course, the
cylinder falls away), but additionally the motion of the robot
flickers: every second frame the first wam-joint is disconnected from
the wam-base (for a constant offset) ??

Thanks for your help!

-clemens

On Mon, Jul 26, 2010 at 8:32 PM, Rosen Diankov <[hidden email]> wrote:

> hi clemens,
>
> make this r1675, the collision detection checking was not complete
>
> rosen,
>
> 2010/7/26 Rosen Diankov <[hidden email]>:
>> hi clemens
>>
>> I'm not sure what the problem is, perhaps you are waiting when you
>> have the environment locked? If the environment is locked, no other
>> module will modify bodies in it.
>>
>> Anyway, I just put up a new cpp example (r1674) showing how to start
>> trajectories in cpp:
>> http://openrave.programmingvision.com/ordocs/en/html/ortrajectory_8cpp-example.html
>>
>> rosen,
>>
>> 2010/7/26 Clemens Eppner <[hidden email]>:
>>> Hello,
>>>
>>> I'm having problems setting up a trajectory, the final configuration
>>> is always immediately active, no motion is visible at all. Here's my
>>> code:
>>>
>>> std::vector<OpenRAVE::dReal> q0( 11 );
>>> q0[0] = 0;
>>> q0[1] = 0;
>>> q0[2] = 0;
>>> q0[3] = 0;
>>> q0[4] = 0;
>>> q0[5] = 0;
>>> q0[6] = 0;
>>> q0[7] = 0;
>>> q0[8] = 0;
>>> q0[9] = 0;
>>> q0[10] = 0;
>>>
>>> OpenRAVE::TrajectoryBasePtr traj =
>>> this->environment->CreateTrajectory( q0.size() );
>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );
>>>
>>> q0[3] = DEG2RAD(120.0);
>>>
>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
>>> traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
>>> false, false );
>>> this->robot->GetController()->SetPath( traj );
>>>
>>>
>>> It's controlling a WAM+BarrettHand.
>>> What am I doing wrong?
>>>
>>> Thanks for your help,
>>> clemens
>>>
>>> ------------------------------------------------------------------------------
>>> The Palm PDK Hot Apps Program offers developers who use the
>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

Rosen Diankov
Administrator
If you do not send a trajectory, do you still get the translation?
Have you made sure that all your points hold the transformation of the
robot (as in the example)?

What is the 0 limit hinge actually connecting? If you have a static
body, you shouldn't need to connect it with hinges... perhaps there is
a bug in openrave for this condition...

rosen,



2010/7/27 Clemens Eppner <[hidden email]>:

> hi rosen,
>
> thanks, after doing a scoped_lock and waiting for the
> Controller->IsDone(), it works!
>
> But I'm still missing something. I have a simple xml-setup: A wam
> sitting on a static table (connected by a 0 limit hinge) and a dynamic
> cylinder, also on top of the table.
> As soon as I start the trajectory, the table+wam combo is translated
> into the ground but also in x- & y-direction, while the cylinder
> remains where it was.
> What's going on here?
>
> When I activate the physics engine the same happens (of course, the
> cylinder falls away), but additionally the motion of the robot
> flickers: every second frame the first wam-joint is disconnected from
> the wam-base (for a constant offset) ??
>
> Thanks for your help!
>
> -clemens
>
> On Mon, Jul 26, 2010 at 8:32 PM, Rosen Diankov <[hidden email]> wrote:
>> hi clemens,
>>
>> make this r1675, the collision detection checking was not complete
>>
>> rosen,
>>
>> 2010/7/26 Rosen Diankov <[hidden email]>:
>>> hi clemens
>>>
>>> I'm not sure what the problem is, perhaps you are waiting when you
>>> have the environment locked? If the environment is locked, no other
>>> module will modify bodies in it.
>>>
>>> Anyway, I just put up a new cpp example (r1674) showing how to start
>>> trajectories in cpp:
>>> http://openrave.programmingvision.com/ordocs/en/html/ortrajectory_8cpp-example.html
>>>
>>> rosen,
>>>
>>> 2010/7/26 Clemens Eppner <[hidden email]>:
>>>> Hello,
>>>>
>>>> I'm having problems setting up a trajectory, the final configuration
>>>> is always immediately active, no motion is visible at all. Here's my
>>>> code:
>>>>
>>>> std::vector<OpenRAVE::dReal> q0( 11 );
>>>> q0[0] = 0;
>>>> q0[1] = 0;
>>>> q0[2] = 0;
>>>> q0[3] = 0;
>>>> q0[4] = 0;
>>>> q0[5] = 0;
>>>> q0[6] = 0;
>>>> q0[7] = 0;
>>>> q0[8] = 0;
>>>> q0[9] = 0;
>>>> q0[10] = 0;
>>>>
>>>> OpenRAVE::TrajectoryBasePtr traj =
>>>> this->environment->CreateTrajectory( q0.size() );
>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );
>>>>
>>>> q0[3] = DEG2RAD(120.0);
>>>>
>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
>>>> traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
>>>> false, false );
>>>> this->robot->GetController()->SetPath( traj );
>>>>
>>>>
>>>> It's controlling a WAM+BarrettHand.
>>>> What am I doing wrong?
>>>>
>>>> Thanks for your help,
>>>> clemens
>>>>
>>>> ------------------------------------------------------------------------------
>>>> The Palm PDK Hot Apps Program offers developers who use the
>>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>>> _______________________________________________
>>>> Openrave-users mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>
>>>
>>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

waxwings
In reply to this post by Rosen Diankov
Hi Rosen,

is there a python script of this example? that would be very helpful for my current problem...

Regards
yimei
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

Rosen Diankov
Administrator
There is no python-equivalent script. The trajectory class is not
fully exported into openravepy because there's a good chance it will
be redesigned in the near future.

It is very easy to tell if a class definition changed in c++ since the
code won't compile, however in python you can't know until the code is
executed, which makes it difficult to track API changes. That's why
openravepy exports only the most stable and frequently used functions
from C++.

rosen,

2010/7/27 waxwings <[hidden email]>:

>
> Hi Rosen,
>
> is there a python script of this example? that would be very helpful for my
> current problem...
>
> Regards
> yimei
> --
> View this message in context: http://openrave-users-list.185357.n3.nabble.com/using-trajectories-tp996926p999210.html
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

clemens
In reply to this post by Rosen Diankov
hi rosen,

thanks, problem fixed! I removed the hinge and made the first link of
the wam static. I also added the first link transform to the TPoint of
the trajectory, as in the example (this was actually the crucial
part!). By the way, why do i need to specify the transformation of the
first robot link if i just do joint space control?

And two more questions:
2) If I place a dynamic cylinder on the static table, I'll never
manage to have the equilibrium state, when the physics are turned on.
The cylinder is always bouncing forth and back on the table surface,
it's never standing still. Do I have to tune any ode-parameters?

3) I want to grasp that cylinder. But if I just close the gripper (set
the first 3 joints of the BarrettHand to the upper limit) the cylinder
will finally just slip out of the hand in a physical implausible
manner. How do I grasp something correctly? (Do I have to use
robot->grab(KinBody.....)? Even if i don't care if the object becomes
part of the robot structure?)


Thanks!
-clemens


On Tue, Jul 27, 2010 at 1:54 PM, Rosen Diankov <[hidden email]> wrote:

> If you do not send a trajectory, do you still get the translation?
> Have you made sure that all your points hold the transformation of the
> robot (as in the example)?
>
> What is the 0 limit hinge actually connecting? If you have a static
> body, you shouldn't need to connect it with hinges... perhaps there is
> a bug in openrave for this condition...
>
> rosen,
>
>
>
> 2010/7/27 Clemens Eppner <[hidden email]>:
>> hi rosen,
>>
>> thanks, after doing a scoped_lock and waiting for the
>> Controller->IsDone(), it works!
>>
>> But I'm still missing something. I have a simple xml-setup: A wam
>> sitting on a static table (connected by a 0 limit hinge) and a dynamic
>> cylinder, also on top of the table.
>> As soon as I start the trajectory, the table+wam combo is translated
>> into the ground but also in x- & y-direction, while the cylinder
>> remains where it was.
>> What's going on here?
>>
>> When I activate the physics engine the same happens (of course, the
>> cylinder falls away), but additionally the motion of the robot
>> flickers: every second frame the first wam-joint is disconnected from
>> the wam-base (for a constant offset) ??
>>
>> Thanks for your help!
>>
>> -clemens
>>
>> On Mon, Jul 26, 2010 at 8:32 PM, Rosen Diankov <[hidden email]> wrote:
>>> hi clemens,
>>>
>>> make this r1675, the collision detection checking was not complete
>>>
>>> rosen,
>>>
>>> 2010/7/26 Rosen Diankov <[hidden email]>:
>>>> hi clemens
>>>>
>>>> I'm not sure what the problem is, perhaps you are waiting when you
>>>> have the environment locked? If the environment is locked, no other
>>>> module will modify bodies in it.
>>>>
>>>> Anyway, I just put up a new cpp example (r1674) showing how to start
>>>> trajectories in cpp:
>>>> http://openrave.programmingvision.com/ordocs/en/html/ortrajectory_8cpp-example.html
>>>>
>>>> rosen,
>>>>
>>>> 2010/7/26 Clemens Eppner <[hidden email]>:
>>>>> Hello,
>>>>>
>>>>> I'm having problems setting up a trajectory, the final configuration
>>>>> is always immediately active, no motion is visible at all. Here's my
>>>>> code:
>>>>>
>>>>> std::vector<OpenRAVE::dReal> q0( 11 );
>>>>> q0[0] = 0;
>>>>> q0[1] = 0;
>>>>> q0[2] = 0;
>>>>> q0[3] = 0;
>>>>> q0[4] = 0;
>>>>> q0[5] = 0;
>>>>> q0[6] = 0;
>>>>> q0[7] = 0;
>>>>> q0[8] = 0;
>>>>> q0[9] = 0;
>>>>> q0[10] = 0;
>>>>>
>>>>> OpenRAVE::TrajectoryBasePtr traj =
>>>>> this->environment->CreateTrajectory( q0.size() );
>>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );
>>>>>
>>>>> q0[3] = DEG2RAD(120.0);
>>>>>
>>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
>>>>> traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
>>>>> false, false );
>>>>> this->robot->GetController()->SetPath( traj );
>>>>>
>>>>>
>>>>> It's controlling a WAM+BarrettHand.
>>>>> What am I doing wrong?
>>>>>
>>>>> Thanks for your help,
>>>>> clemens
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> The Palm PDK Hot Apps Program offers developers who use the
>>>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>>>> _______________________________________________
>>>>> Openrave-users mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>>
>>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> The Palm PDK Hot Apps Program offers developers who use the
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> of $1 Million in cash or HP Products. Visit us here for more details:
>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

Rosen Diankov
Administrator
hi clemens,

Glad you got it fixed. The reason you need to specify the transform is
because a trajectory also holds the transformation of the base link.
If you are specifying the full dof, the transformation is also
included. If you are specifying active dof, then the transformation is
copied from the current robot position.

Yes, you'll have to do a lot of tweaking. The simplest, most
effective, and recommended method is to:

- compile openrave with double precision
(http://openrave.programmingvision.com/ordocs/en/html/installation.html)
- to decrease the simulation step size
- to use only primitives (which i think you are doing)

As for grasping things *correctly*, there are many answers to this
loaded question. If you want to use physics, i suggest you look into
moby physics simulator (http://physsim.sourceforge.net/). I've been
working closely with the author and eventually we will have an
openrave plugin for it, but it is never to early to start on one now
;0)

the TaskManipulation problem also has a 'CloseFingers' command which
closes the fingers until they cannot go any further. You can then use
the Grab commands to make the object a part of the robot hand.

good luck!
rosen,

2010/7/27 Clemens Eppner <[hidden email]>:

> hi rosen,
>
> thanks, problem fixed! I removed the hinge and made the first link of
> the wam static. I also added the first link transform to the TPoint of
> the trajectory, as in the example (this was actually the crucial
> part!). By the way, why do i need to specify the transformation of the
> first robot link if i just do joint space control?
>
> And two more questions:
> 2) If I place a dynamic cylinder on the static table, I'll never
> manage to have the equilibrium state, when the physics are turned on.
> The cylinder is always bouncing forth and back on the table surface,
> it's never standing still. Do I have to tune any ode-parameters?
>
> 3) I want to grasp that cylinder. But if I just close the gripper (set
> the first 3 joints of the BarrettHand to the upper limit) the cylinder
> will finally just slip out of the hand in a physical implausible
> manner. How do I grasp something correctly? (Do I have to use
> robot->grab(KinBody.....)? Even if i don't care if the object becomes
> part of the robot structure?)
>
>
> Thanks!
> -clemens
>
>
> On Tue, Jul 27, 2010 at 1:54 PM, Rosen Diankov <[hidden email]> wrote:
>> If you do not send a trajectory, do you still get the translation?
>> Have you made sure that all your points hold the transformation of the
>> robot (as in the example)?
>>
>> What is the 0 limit hinge actually connecting? If you have a static
>> body, you shouldn't need to connect it with hinges... perhaps there is
>> a bug in openrave for this condition...
>>
>> rosen,
>>
>>
>>
>> 2010/7/27 Clemens Eppner <[hidden email]>:
>>> hi rosen,
>>>
>>> thanks, after doing a scoped_lock and waiting for the
>>> Controller->IsDone(), it works!
>>>
>>> But I'm still missing something. I have a simple xml-setup: A wam
>>> sitting on a static table (connected by a 0 limit hinge) and a dynamic
>>> cylinder, also on top of the table.
>>> As soon as I start the trajectory, the table+wam combo is translated
>>> into the ground but also in x- & y-direction, while the cylinder
>>> remains where it was.
>>> What's going on here?
>>>
>>> When I activate the physics engine the same happens (of course, the
>>> cylinder falls away), but additionally the motion of the robot
>>> flickers: every second frame the first wam-joint is disconnected from
>>> the wam-base (for a constant offset) ??
>>>
>>> Thanks for your help!
>>>
>>> -clemens
>>>
>>> On Mon, Jul 26, 2010 at 8:32 PM, Rosen Diankov <[hidden email]> wrote:
>>>> hi clemens,
>>>>
>>>> make this r1675, the collision detection checking was not complete
>>>>
>>>> rosen,
>>>>
>>>> 2010/7/26 Rosen Diankov <[hidden email]>:
>>>>> hi clemens
>>>>>
>>>>> I'm not sure what the problem is, perhaps you are waiting when you
>>>>> have the environment locked? If the environment is locked, no other
>>>>> module will modify bodies in it.
>>>>>
>>>>> Anyway, I just put up a new cpp example (r1674) showing how to start
>>>>> trajectories in cpp:
>>>>> http://openrave.programmingvision.com/ordocs/en/html/ortrajectory_8cpp-example.html
>>>>>
>>>>> rosen,
>>>>>
>>>>> 2010/7/26 Clemens Eppner <[hidden email]>:
>>>>>> Hello,
>>>>>>
>>>>>> I'm having problems setting up a trajectory, the final configuration
>>>>>> is always immediately active, no motion is visible at all. Here's my
>>>>>> code:
>>>>>>
>>>>>> std::vector<OpenRAVE::dReal> q0( 11 );
>>>>>> q0[0] = 0;
>>>>>> q0[1] = 0;
>>>>>> q0[2] = 0;
>>>>>> q0[3] = 0;
>>>>>> q0[4] = 0;
>>>>>> q0[5] = 0;
>>>>>> q0[6] = 0;
>>>>>> q0[7] = 0;
>>>>>> q0[8] = 0;
>>>>>> q0[9] = 0;
>>>>>> q0[10] = 0;
>>>>>>
>>>>>> OpenRAVE::TrajectoryBasePtr traj =
>>>>>> this->environment->CreateTrajectory( q0.size() );
>>>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );
>>>>>>
>>>>>> q0[3] = DEG2RAD(120.0);
>>>>>>
>>>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
>>>>>> traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
>>>>>> false, false );
>>>>>> this->robot->GetController()->SetPath( traj );
>>>>>>
>>>>>>
>>>>>> It's controlling a WAM+BarrettHand.
>>>>>> What am I doing wrong?
>>>>>>
>>>>>> Thanks for your help,
>>>>>> clemens
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> The Palm PDK Hot Apps Program offers developers who use the
>>>>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>>>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>>>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>>>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>>>>> _______________________________________________
>>>>>> Openrave-users mailing list
>>>>>> [hidden email]
>>>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>>>
>>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The Palm PDK Hot Apps Program offers developers who use the
>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: using trajectories

Rosen Diankov
Administrator
CloseFingers just moves the fingers to the final configuration, it
does not apply torque.
rosen,

2010/7/27 Rosen Diankov <[hidden email]>:

> hi clemens,
>
> Glad you got it fixed. The reason you need to specify the transform is
> because a trajectory also holds the transformation of the base link.
> If you are specifying the full dof, the transformation is also
> included. If you are specifying active dof, then the transformation is
> copied from the current robot position.
>
> Yes, you'll have to do a lot of tweaking. The simplest, most
> effective, and recommended method is to:
>
> - compile openrave with double precision
> (http://openrave.programmingvision.com/ordocs/en/html/installation.html)
> - to decrease the simulation step size
> - to use only primitives (which i think you are doing)
>
> As for grasping things *correctly*, there are many answers to this
> loaded question. If you want to use physics, i suggest you look into
> moby physics simulator (http://physsim.sourceforge.net/). I've been
> working closely with the author and eventually we will have an
> openrave plugin for it, but it is never to early to start on one now
> ;0)
>
> the TaskManipulation problem also has a 'CloseFingers' command which
> closes the fingers until they cannot go any further. You can then use
> the Grab commands to make the object a part of the robot hand.
>
> good luck!
> rosen,
>
> 2010/7/27 Clemens Eppner <[hidden email]>:
>> hi rosen,
>>
>> thanks, problem fixed! I removed the hinge and made the first link of
>> the wam static. I also added the first link transform to the TPoint of
>> the trajectory, as in the example (this was actually the crucial
>> part!). By the way, why do i need to specify the transformation of the
>> first robot link if i just do joint space control?
>>
>> And two more questions:
>> 2) If I place a dynamic cylinder on the static table, I'll never
>> manage to have the equilibrium state, when the physics are turned on.
>> The cylinder is always bouncing forth and back on the table surface,
>> it's never standing still. Do I have to tune any ode-parameters?
>>
>> 3) I want to grasp that cylinder. But if I just close the gripper (set
>> the first 3 joints of the BarrettHand to the upper limit) the cylinder
>> will finally just slip out of the hand in a physical implausible
>> manner. How do I grasp something correctly? (Do I have to use
>> robot->grab(KinBody.....)? Even if i don't care if the object becomes
>> part of the robot structure?)
>>
>>
>> Thanks!
>> -clemens
>>
>>
>> On Tue, Jul 27, 2010 at 1:54 PM, Rosen Diankov <[hidden email]> wrote:
>>> If you do not send a trajectory, do you still get the translation?
>>> Have you made sure that all your points hold the transformation of the
>>> robot (as in the example)?
>>>
>>> What is the 0 limit hinge actually connecting? If you have a static
>>> body, you shouldn't need to connect it with hinges... perhaps there is
>>> a bug in openrave for this condition...
>>>
>>> rosen,
>>>
>>>
>>>
>>> 2010/7/27 Clemens Eppner <[hidden email]>:
>>>> hi rosen,
>>>>
>>>> thanks, after doing a scoped_lock and waiting for the
>>>> Controller->IsDone(), it works!
>>>>
>>>> But I'm still missing something. I have a simple xml-setup: A wam
>>>> sitting on a static table (connected by a 0 limit hinge) and a dynamic
>>>> cylinder, also on top of the table.
>>>> As soon as I start the trajectory, the table+wam combo is translated
>>>> into the ground but also in x- & y-direction, while the cylinder
>>>> remains where it was.
>>>> What's going on here?
>>>>
>>>> When I activate the physics engine the same happens (of course, the
>>>> cylinder falls away), but additionally the motion of the robot
>>>> flickers: every second frame the first wam-joint is disconnected from
>>>> the wam-base (for a constant offset) ??
>>>>
>>>> Thanks for your help!
>>>>
>>>> -clemens
>>>>
>>>> On Mon, Jul 26, 2010 at 8:32 PM, Rosen Diankov <[hidden email]> wrote:
>>>>> hi clemens,
>>>>>
>>>>> make this r1675, the collision detection checking was not complete
>>>>>
>>>>> rosen,
>>>>>
>>>>> 2010/7/26 Rosen Diankov <[hidden email]>:
>>>>>> hi clemens
>>>>>>
>>>>>> I'm not sure what the problem is, perhaps you are waiting when you
>>>>>> have the environment locked? If the environment is locked, no other
>>>>>> module will modify bodies in it.
>>>>>>
>>>>>> Anyway, I just put up a new cpp example (r1674) showing how to start
>>>>>> trajectories in cpp:
>>>>>> http://openrave.programmingvision.com/ordocs/en/html/ortrajectory_8cpp-example.html
>>>>>>
>>>>>> rosen,
>>>>>>
>>>>>> 2010/7/26 Clemens Eppner <[hidden email]>:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I'm having problems setting up a trajectory, the final configuration
>>>>>>> is always immediately active, no motion is visible at all. Here's my
>>>>>>> code:
>>>>>>>
>>>>>>> std::vector<OpenRAVE::dReal> q0( 11 );
>>>>>>> q0[0] = 0;
>>>>>>> q0[1] = 0;
>>>>>>> q0[2] = 0;
>>>>>>> q0[3] = 0;
>>>>>>> q0[4] = 0;
>>>>>>> q0[5] = 0;
>>>>>>> q0[6] = 0;
>>>>>>> q0[7] = 0;
>>>>>>> q0[8] = 0;
>>>>>>> q0[9] = 0;
>>>>>>> q0[10] = 0;
>>>>>>>
>>>>>>> OpenRAVE::TrajectoryBasePtr traj =
>>>>>>> this->environment->CreateTrajectory( q0.size() );
>>>>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 0.0) );
>>>>>>>
>>>>>>> q0[3] = DEG2RAD(120.0);
>>>>>>>
>>>>>>> traj->AddPoint( OpenRAVE::TrajectoryBase::TPOINT(q0, 5.0) );
>>>>>>> traj->CalcTrajTiming( this->robot, OpenRAVE::TrajectoryBase::CUBIC,
>>>>>>> false, false );
>>>>>>> this->robot->GetController()->SetPath( traj );
>>>>>>>
>>>>>>>
>>>>>>> It's controlling a WAM+BarrettHand.
>>>>>>> What am I doing wrong?
>>>>>>>
>>>>>>> Thanks for your help,
>>>>>>> clemens
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> The Palm PDK Hot Apps Program offers developers who use the
>>>>>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>>>>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>>>>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>>>>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>>>>>> _______________________________________________
>>>>>>> Openrave-users mailing list
>>>>>>> [hidden email]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> The Palm PDK Hot Apps Program offers developers who use the
>>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>>>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>>>> _______________________________________________
>>>> Openrave-users mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> The Palm PDK Hot Apps Program offers developers who use the
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> of $1 Million in cash or HP Products. Visit us here for more details:
>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users