threedworld-mit / tdw

ThreeDWorld simulation environment
BSD 2-Clause "Simplified" License
502 stars 75 forks source link

adding `use_centroid` in `teleport_object` api? #677

Closed YudiXie closed 9 months ago

YudiXie commented 10 months ago

I am wondering if it would be feasible to add a use_centroid field in teleport_object command call? Similar to the rotate_object_by API call.

When use_centroid = True, it teleports the object so that its centroid (the same as bounds.get_center(0), instead of the object's bottom center) lands on the specified location?

This would be helpful in my use case, where I am sampling random positions and rotations to generate an image dataset; it would make the position sampling and setting easier and more intuitive.