Skip to content

Commit

Permalink
Get id
Browse files Browse the repository at this point in the history
  • Loading branch information
stepjam committed Apr 14, 2024
1 parent 69c3098 commit ef45ad3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mojo/elements/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def __init__(self, mojo: Mojo, mjcf_elem: mjcf.RootElement):
def mjcf(self):
return self._mjcf_elem

@property
def id(self):
return self._mojo.physics.bind(self.mjcf).element_id

def __eq__(self, other):
return (
isinstance(other, MujocoElement)
Expand Down

0 comments on commit ef45ad3

Please sign in to comment.