How to rotate object to look at a specific world coordinate in replicator composer using python api?

May I know how can we rotate an object to look at a specific world coordinate using the replicator composer python api?

I understand that the camera viewport is able to look at a specific world coordinate using the following function (set_camera_view via set_camera_target_attribute), but may I know how can i do that for objects? I cannot seem to find set_camera_target attribute in the viewport_legacy class.

1 Like

Hi - Sorry for the delay in the response. Let us know if you still having this issue/question with the latest Isaac Sim 2022.2.1 release.

Do you want to do this using Composer in YAML files or using Replicator API?

Using replicator, you can use rep.modify.pose(look_at=(1, 1, 1,).

For example:

cube = rep.create.cube(position=(0, 0, 0))
with cube:
    rep.modify.pose(position=rep.distribution.uniform((2, 2, 2), (5, 5, 5)), look_at=(0, 0, 0))

Best,
Andrei

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.