Skip to content

How to get names of bodies and joints in order? #342

Discussion options

You must be logged in to vote

I think you are using Python, but it is not entire clear. Please make that explicit in the future :)

We have an internal open feature request to add a more convenient way to do it, in the meantime you should be able to use a comprehension like

geom_names = [mujoco.mj_id2name(model, mujoco.mjtObj.mjOBJ_GEOM, i) for i in range(model.ngeom)]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rohit-kumar-j
Comment options

Answer selected by rohit-kumar-j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants