owl-project / NVISII

Apache License 2.0
328 stars 28 forks source link

Can't find a way to set a volume/cube for the objects to move within the boundary #168

Open ArghyaChatterjee opened 11 months ago

ArghyaChatterjee commented 11 months ago

Hello,

I am trying to set a boundary within which the object will move. I am basically using a script from dope repo:https://github.com/NVlabs/Deep_Object_Pose/blob/master/scripts/nvisii_data_gen/single_video_pybullet.py to randomly place the object within a boundary in front of the camera. I am having issues during setting the volume.

The red dot is the camera. Here is what I want to set for the object to move around. How to do that ??

Screenshot from 2023-10-26 14-52-14

ArghyaChatterjee commented 11 months ago

To add to this, I have been trying to see the object position distribution once it has created 200 ground truth samples. In the original script, the random function used for object movement is using uniform distribution. Screenshot from 2023-10-27 17-52-48.

It looks like the position of the object most of the time remain within: xmin: -0.75, xmax: 0.75 ymin: -0.75, ymax: 0.75 zmin: 0.15, zmax: 2.0

Now, I want to mention that during the calculation, I excluded the samples which does not contain the object itself. So the distribution that you see is probably of 170-180 samples out of 200 (so, 20-30 samples don't include the object and as a result excluded from the distribution calculation) which have the object itself and the object ground truth pose can be read from the exported json file. Here are the object position limits for some other random batches that I produced 1st batch: Maximum X: 0.7968071699142456 Minimum X: -0.5942803621292114 Maximum Y: 0.7744019627571106 Minimum Y: -0.669297456741333 Maximum Z: 1.9320124387741089 Minimum Z: 0.17937348783016205

2nd batch: Maximum X: 0.7546935081481934 Minimum X: -0.7552196383476257 Maximum Y: 0.7662391662597656 Minimum Y: -0.7568234801292419 Maximum Z: 1.9336596727371216 Minimum Z: 0.1591675728559494

3rd batch: Maximum X: 0.5945649743080139 Minimum X: -0.6916602849960327 Maximum Y: 0.6581659913063049 Minimum Y: -0.5869097113609314 Maximum Z: 1.7409515380859375 Minimum Z: 0.1563190221786499

4th batch: Maximum X: 0.6954214572906494 Minimum X: -0.7661757469177246 Maximum Y: 0.7545489072799683 Minimum Y: -0.7764974236488342 Maximum Z: 1.9328440427780151 Minimum Z: 0.36330223083496094

5th batch: Maximum X: 0.8227008581161499 Minimum X: -0.9358417987823486 Maximum Y: 0.8931193351745605 Minimum Y: -0.5309315919876099 Maximum Z: 2.2296056747436523 Minimum Z: 0.4827534556388855

6th batch: Maximum X: 0.836432695388794 Minimum X: -0.32284748554229736 Maximum Y: 0.8445866107940674 Minimum Y: -0.8291597366333008 Maximum Z: 2.216597080230713 Minimum Z: 0.6940929293632507

Apart from the last 2, you can see there is a clear bias towards the limits that I mentioned earlier. I have confirmed with 20-30 times and the position limits remain within that boundary.

So, I wanted to know how to create that volume accurately so that I can see the object is moving (changing the position and orientation) within that specified cuboid volume.