Grabbing robots

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

Grabbing robots

Brennan Peter Sellner
I'm currently having problems with robots grabbing other robots: it works
fine, unless the grabee has moved prior to the grab attempt, in which case
it appears to succeed, but the grabee doesn't move when the grabber does.

So, code along the lines of this works:

Trajectory* traj;
RobotBase* grabber;
RobotBase* grabee;
grabber->Grab(grabee);
grabber->SetActiveDOFs(indices, affineMask);
// ...build trajectory...
grabber->SetActiveMotion(traj);
// grabee moves with grabber

But this doesn't:

Trajectory* traj1;
Trajectory* traj2;
RobotBase* grabber;
RobotBase* grabee;
grabbee->SetActiveDOFs(vector<int>(), AFFINE_X | AFFINE_Y | AFFINE_Z);
// ... build trajectory 1...
grabbee->SetActiveMotion(traj1);
//
// Wait for grabee to finish moving.
//
grabber->Grab(grabee);
grabber->SetActiveDOFs(indices, affineMask);
// ...build trajectory 2...
grabber->SetActiveMotion(traj2);
// grabee doesn't move at all


I've only tested affine moves for the grabbee, as this particular robot
doesn't have joints.  In both cases, grabber->Grab(grabee) returns true,
and grabee appears in output of grabber->GetGrabbed().  In neither case
does grabber appear in the ouput of grabee->GetGrabbed(), although I
thought grabbing was symmetric.  In both cases,
grabber->IsGrabbing(grabee) returns true.

I'm able to repeatedly grab and release the grabee, as long as I don't
move it.

I've tried deactivating the grabee's DOFs after the move via
grabee->SetActiveDOFs(vector<int>()), but that didn't help.

Anyone have thoughts on how to proceed debugging this?

Thanks,

-Brennan



Reply | Threaded
Open this post in threaded view
|

Re: Grabbing robots

Rosen Diankov-2
Hi Brennan,

Your problem is that grabee->GetController() has control of the robot.
Even after the trajectory ends, the controller will hold the robot at
that position until it is reset. There's two ways to do this:

grabee->GetController()->Reset(0);


Please update to rev 309 to get the Reset(0) to work properly.

rosen,

2008/8/11 Brennan Peter Sellner <[hidden email]>:

> I'm currently having problems with robots grabbing other robots: it works
> fine, unless the grabee has moved prior to the grab attempt, in which case
> it appears to succeed, but the grabee doesn't move when the grabber does.
>
> So, code along the lines of this works:
>
> Trajectory* traj;
> RobotBase* grabber;
> RobotBase* grabee;
> grabber->Grab(grabee);
> grabber->SetActiveDOFs(indices, affineMask);
> // ...build trajectory...
> grabber->SetActiveMotion(traj);
> // grabee moves with grabber
>
> But this doesn't:
>
> Trajectory* traj1;
> Trajectory* traj2;
> RobotBase* grabber;
> RobotBase* grabee;
> grabbee->SetActiveDOFs(vector<int>(), AFFINE_X | AFFINE_Y | AFFINE_Z);
> // ... build trajectory 1...
> grabbee->SetActiveMotion(traj1);
> //
> // Wait for grabee to finish moving.
> //
> grabber->Grab(grabee);
> grabber->SetActiveDOFs(indices, affineMask);
> // ...build trajectory 2...
> grabber->SetActiveMotion(traj2);
> // grabee doesn't move at all
>
>
> I've only tested affine moves for the grabbee, as this particular robot
> doesn't have joints.  In both cases, grabber->Grab(grabee) returns true,
> and grabee appears in output of grabber->GetGrabbed().  In neither case
> does grabber appear in the ouput of grabee->GetGrabbed(), although I
> thought grabbing was symmetric.  In both cases,
> grabber->IsGrabbing(grabee) returns true.
>
> I'm able to repeatedly grab and release the grabee, as long as I don't
> move it.
>
> I've tried deactivating the grabee's DOFs after the move via
> grabee->SetActiveDOFs(vector<int>()), but that didn't help.
>
> Anyone have thoughts on how to proceed debugging this?
>
> Thanks,
>
> -Brennan
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>