Getting all the colliding bodies/links in a single call

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

Getting all the colliding bodies/links in a single call

Mehmet Remzi Dogar
Hi,
I would like to make a CheckCollision(robot,report) call and get all
the bodies/links colliding with the robot. The vLinkColliding vector
(in the CollisionReport struct) is documented to do just what I want,
but it does not get filled in. Also it is not in the python version of
the CollisionReport struct. Do you have any suggestions?
Thanks,
-mehmet

------------------------------------------------------------------------------
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://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting all the colliding bodies/links in a single call

Rosen Diankov
Administrator
Hi Mehmet,

Can you please explain a case where the robot will be colliding with
multiple bodies, and you need to know which?

If this turns out to be a useful feature to have, Implementing this in
the API shouldn't be difficult. We could add a CO_AllLinks options
that fills the vLinkColliding struct.

rosen,

2010/7/28 mehmet dogar <[hidden email]>:

> Hi,
> I would like to make a CheckCollision(robot,report) call and get all
> the bodies/links colliding with the robot. The vLinkColliding vector
> (in the CollisionReport struct) is documented to do just what I want,
> but it does not get filled in. Also it is not in the python version of
> the CollisionReport struct. Do you have any suggestions?
> Thanks,
> -mehmet
>
> ------------------------------------------------------------------------------
> 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://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> 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://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting all the colliding bodies/links in a single call

Mehmet Remzi Dogar
Sure. Roughly: I have a grasp planner which can also reason about
moving obstacle objects out of the way, if needed. Given a pose of the
robot hand to grasp the goal object, it gets all the other colliding
objects, and then plans to move them away, so that the original grasp
can be executed.
In fact, I have already been doing this by calling CheckCollision over
and over until no collision occurs, each time adding the object
pointed to by report->plink1 to the vbodyexcluded argument to the next
CheckCollision. Then, when CheckCollision returns false, vbodyexcluded
gives you all the colliding bodies. But of course this takes a huge
amount of time.

-mehmet


On Wed, Jul 28, 2010 at 1:23 PM, Rosen Diankov <[hidden email]> wrote:

> Hi Mehmet,
>
> Can you please explain a case where the robot will be colliding with
> multiple bodies, and you need to know which?
>
> If this turns out to be a useful feature to have, Implementing this in
> the API shouldn't be difficult. We could add a CO_AllLinks options
> that fills the vLinkColliding struct.
>
> rosen,
>
> 2010/7/28 mehmet dogar <[hidden email]>:
>> Hi,
>> I would like to make a CheckCollision(robot,report) call and get all
>> the bodies/links colliding with the robot. The vLinkColliding vector
>> (in the CollisionReport struct) is documented to do just what I want,
>> but it does not get filled in. Also it is not in the python version of
>> the CollisionReport struct. Do you have any suggestions?
>> Thanks,
>> -mehmet
>>
>> ------------------------------------------------------------------------------
>> 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://p.sf.net/sfu/dev2dev-palm
>> _______________________________________________
>> 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://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting all the colliding bodies/links in a single call

Rosen Diankov
Administrator
Hi mehmet,

You present a very good argument. I'm not sure what it will take to
fully add this feature, but i have added a ticket for it:

https://sourceforge.net/apps/trac/openrave/ticket/60

Patches are always welcome.
rosen,

2010/7/28 mehmet dogar <[hidden email]>:

> Sure. Roughly: I have a grasp planner which can also reason about
> moving obstacle objects out of the way, if needed. Given a pose of the
> robot hand to grasp the goal object, it gets all the other colliding
> objects, and then plans to move them away, so that the original grasp
> can be executed.
> In fact, I have already been doing this by calling CheckCollision over
> and over until no collision occurs, each time adding the object
> pointed to by report->plink1 to the vbodyexcluded argument to the next
> CheckCollision. Then, when CheckCollision returns false, vbodyexcluded
> gives you all the colliding bodies. But of course this takes a huge
> amount of time.
>
> -mehmet
>
>
> On Wed, Jul 28, 2010 at 1:23 PM, Rosen Diankov <[hidden email]> wrote:
>> Hi Mehmet,
>>
>> Can you please explain a case where the robot will be colliding with
>> multiple bodies, and you need to know which?
>>
>> If this turns out to be a useful feature to have, Implementing this in
>> the API shouldn't be difficult. We could add a CO_AllLinks options
>> that fills the vLinkColliding struct.
>>
>> rosen,
>>
>> 2010/7/28 mehmet dogar <[hidden email]>:
>>> Hi,
>>> I would like to make a CheckCollision(robot,report) call and get all
>>> the bodies/links colliding with the robot. The vLinkColliding vector
>>> (in the CollisionReport struct) is documented to do just what I want,
>>> but it does not get filled in. Also it is not in the python version of
>>> the CollisionReport struct. Do you have any suggestions?
>>> Thanks,
>>> -mehmet
>>>
>>> ------------------------------------------------------------------------------
>>> 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://p.sf.net/sfu/dev2dev-palm
>>> _______________________________________________
>>> 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://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting all the colliding bodies/links in a single call

Rosen Diankov
Administrator
Hi mehmet,

I forgot to mention that you can register a collision callback (both
in C++ and in Python) and get all the links and contact points that
collide.

http://openrave.programmingvision.com/ordocs/en/html/classOpenRAVE_1_1EnvironmentBase.html#a04548c3dc0b848f82c493a27ce85aedc

As long as your function returns CA_Ignore, it should cycle through
all the links. Check out the collision.py example:

http://openrave.programmingvision.com/ordocs/en/openravepy-html/openravepy.examples.collision-pysrc.html

rosen,

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

> Hi mehmet,
>
> You present a very good argument. I'm not sure what it will take to
> fully add this feature, but i have added a ticket for it:
>
> https://sourceforge.net/apps/trac/openrave/ticket/60
>
> Patches are always welcome.
> rosen,
>
> 2010/7/28 mehmet dogar <[hidden email]>:
>> Sure. Roughly: I have a grasp planner which can also reason about
>> moving obstacle objects out of the way, if needed. Given a pose of the
>> robot hand to grasp the goal object, it gets all the other colliding
>> objects, and then plans to move them away, so that the original grasp
>> can be executed.
>> In fact, I have already been doing this by calling CheckCollision over
>> and over until no collision occurs, each time adding the object
>> pointed to by report->plink1 to the vbodyexcluded argument to the next
>> CheckCollision. Then, when CheckCollision returns false, vbodyexcluded
>> gives you all the colliding bodies. But of course this takes a huge
>> amount of time.
>>
>> -mehmet
>>
>>
>> On Wed, Jul 28, 2010 at 1:23 PM, Rosen Diankov <[hidden email]> wrote:
>>> Hi Mehmet,
>>>
>>> Can you please explain a case where the robot will be colliding with
>>> multiple bodies, and you need to know which?
>>>
>>> If this turns out to be a useful feature to have, Implementing this in
>>> the API shouldn't be difficult. We could add a CO_AllLinks options
>>> that fills the vLinkColliding struct.
>>>
>>> rosen,
>>>
>>> 2010/7/28 mehmet dogar <[hidden email]>:
>>>> Hi,
>>>> I would like to make a CheckCollision(robot,report) call and get all
>>>> the bodies/links colliding with the robot. The vLinkColliding vector
>>>> (in the CollisionReport struct) is documented to do just what I want,
>>>> but it does not get filled in. Also it is not in the python version of
>>>> the CollisionReport struct. Do you have any suggestions?
>>>> Thanks,
>>>> -mehmet
>>>>
>>>> ------------------------------------------------------------------------------
>>>> 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://p.sf.net/sfu/dev2dev-palm
>>>> _______________________________________________
>>>> 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://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users