publishing bodies

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

publishing bodies

garratt
Hi Rosen,


I'm having trouble with the poses of objects I'm publishing into
openrave.

In objecttransform.h:newdatacb()  I read appropriate values for tnew,
the transform of the published object.  However, in openrave, when I
call kinbody.getTransform(), I get:
array([[  1.00e+00,   0.00e+00,   0.00e+00, 1.00e+04],
       [  0.00e+00,   1.00e+00,   0.00e+00, 1.00e+04],
       [  0.00e+00,   0.00e+00,   1.00e+00, 1.00e+04],
       [  0.00e+00,   0.00e+00,   0.00e+00, 1.00e+00]]

meaning that the transform was lost somehow.  

Do you have any idea what could be happening here?  This seems like a
problem in UpdateBodies...

Garratt


------------------------------------------------------------------------------
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: publishing bodies

Rosen Diankov
Administrator
hi garratt,

this isn't a problem, the object will be put in its right place the
next time newdatacb is called with data.

because the node also tracks when to add new objects, there were
several time sync bugs happening when deciding whether to delete/add
objects.

however, objecttransform should really be tracking the objects in its
own thread with newdata locking a mutex when doing updates. if this
really bothers you, we can try fixing it...

rosen,

2010/4/23 garratt <[hidden email]>:

> Hi Rosen,
>
>
> I'm having trouble with the poses of objects I'm publishing into
> openrave.
>
> In objecttransform.h:newdatacb()  I read appropriate values for tnew,
> the transform of the published object.  However, in openrave, when I
> call kinbody.getTransform(), I get:
> array([[  1.00e+00,   0.00e+00,   0.00e+00, 1.00e+04],
>       [  0.00e+00,   1.00e+00,   0.00e+00, 1.00e+04],
>       [  0.00e+00,   0.00e+00,   1.00e+00, 1.00e+04],
>       [  0.00e+00,   0.00e+00,   0.00e+00, 1.00e+00]]
>
> meaning that the transform was lost somehow.
>
> Do you have any idea what could be happening here?  This seems like a
> problem in UpdateBodies...
>
> Garratt
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: publishing bodies

garratt
Hi Rosen,


> this isn't a problem, the object will be put in its right place the
> next time newdatacb is called with data.
>
Unfortunately, I don't track objects right now - I create a new object
every time I see it, so openrave never gets a second chance to correct
the position.

should I publish the object twice, once to register it and again to get
the right position?

Garratt


> because the node also tracks when to add new objects, there were
> several time sync bugs happening when deciding whether to delete/add
> objects.
>
> however, objecttransform should really be tracking the objects in its
> own thread with newdata locking a mutex when doing updates. if this
> really bothers you, we can try fixing it...
>
> rosen,
>
> 2010/4/23 garratt <[hidden email]>:
> > Hi Rosen,
> >
> >
> > I'm having trouble with the poses of objects I'm publishing into
> > openrave.
> >
> > In objecttransform.h:newdatacb()  I read appropriate values for tnew,
> > the transform of the published object.  However, in openrave, when I
> > call kinbody.getTransform(), I get:
> > array([[  1.00e+00,   0.00e+00,   0.00e+00, 1.00e+04],
> >       [  0.00e+00,   1.00e+00,   0.00e+00, 1.00e+04],
> >       [  0.00e+00,   0.00e+00,   1.00e+00, 1.00e+04],
> >       [  0.00e+00,   0.00e+00,   0.00e+00, 1.00e+00]]
> >
> > meaning that the transform was lost somehow.
> >
> > Do you have any idea what could be happening here?  This seems like a
> > problem in UpdateBodies...
> >
> > Garratt
> >
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Openrave-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/openrave-users
> >



------------------------------------------------------------------------------
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: publishing bodies

Rosen Diankov
Administrator
hi garratt,

What do you mean by 'create new object every time'? the
objecttransform interface should be handling all object creation, so
you never have to call create object or subscribe to the
ObjectDetection message. Ideally your vision system should be
continuously outputting the object's position without caring about
openrave.

By the way, as of yesterday, the ObjectDetection message was moved to
a new posedetection_msgs ros package. when you update ROS, make sure
your vision server switches to it.

rosen,

2010/4/23 garratt <[hidden email]>:

> Hi Rosen,
>
>
>> this isn't a problem, the object will be put in its right place the
>> next time newdatacb is called with data.
>>
> Unfortunately, I don't track objects right now - I create a new object
> every time I see it, so openrave never gets a second chance to correct
> the position.
>
> should I publish the object twice, once to register it and again to get
> the right position?
>
> Garratt
>
>
>> because the node also tracks when to add new objects, there were
>> several time sync bugs happening when deciding whether to delete/add
>> objects.
>>
>> however, objecttransform should really be tracking the objects in its
>> own thread with newdata locking a mutex when doing updates. if this
>> really bothers you, we can try fixing it...
>>
>> rosen,
>>
>> 2010/4/23 garratt <[hidden email]>:
>> > Hi Rosen,
>> >
>> >
>> > I'm having trouble with the poses of objects I'm publishing into
>> > openrave.
>> >
>> > In objecttransform.h:newdatacb()  I read appropriate values for tnew,
>> > the transform of the published object.  However, in openrave, when I
>> > call kinbody.getTransform(), I get:
>> > array([[  1.00e+00,   0.00e+00,   0.00e+00, 1.00e+04],
>> >       [  0.00e+00,   1.00e+00,   0.00e+00, 1.00e+04],
>> >       [  0.00e+00,   0.00e+00,   1.00e+00, 1.00e+04],
>> >       [  0.00e+00,   0.00e+00,   0.00e+00, 1.00e+00]]
>> >
>> > meaning that the transform was lost somehow.
>> >
>> > Do you have any idea what could be happening here?  This seems like a
>> > problem in UpdateBodies...
>> >
>> > Garratt
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > _______________________________________________
>> > Openrave-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/openrave-users
>> >
>
>
>

------------------------------------------------------------------------------
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users