Skip to content

How to modify object properties ? #1003

Answered by hang-yin
johnbhlm asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @johnbhlm , if I'm understanding your question correctly, you can first grab base link prim of the object:

import omnigibson.lazy as lazy
obj_prim = lazy.omni.isaac.core.utils.prims.get_prim_at_path(prim_path="/World/scene_0/object_name/base_link")

Then, you can directly set attributes on this prim, for example:

obj_prim.GetAttributes() # this gives you all available attributes on this prim

obj_prim.GetAttribute('purpose').Get() # this gives you the value of a specific attribute

obj_prim.GetAttribute('purpose').Set("default") # this sets the attribute

Let me know if this helps!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hang-yin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #999 on October 22, 2024 05:21.