How to set object' orientations? #1050
Replies: 2 comments
-
@ChengshuLi probably has a great answer to this. |
Beta Was this translation helpful? Give feedback.
-
@dexin-wang For the OnTo and Inside sampling, the current code already randomizes orientation in the z-axis (yaw angle). And the code also assumes that the default orientation ([0, 0, 0, 1]) is a stable orientation. If you want to randomize the orientation more aggressively, you can sample a random orientation in the following lines: OmniGibson/omnigibson/utils/object_state_utils.py Lines 134 to 137 in 255a4e4 The downside is that this random orientation might not be stable, so even if you successfully place the object, it might roll away. |
Beta Was this translation helpful? Give feedback.
-
I noticed that the OnTop and Inside functions sample the object rotation based on the object's orientations, and orientations are all empty lists.
I want to sample the x or y axis rotation when setting the OnTop and Inside states of the object. Is this possible?
I currently think of an indirect method, which is to rotate the object along the x and y axes after setting the OnTop state, and adjust the object's z coordinate based on the aabb before and after.
But is there a more direct way?
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions