Getting names from xml

Discussion in 'Modeling' started by Karthik, Apr 28, 2017.

  1. Hi Emo,

    I need some help in getting the names of the bodies and joints as in xml by just giving their respective indxes and vice versa. I tried using nnames, names and name_bodyadr but i was not successful. When I print using mj_printModel, it prints the entire structure and it has names of all the parts. Can you suggest an easy way to access the names by just using indexes and to get the index by using the names.
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    There are functions that do that: mj_name2id and mj_id2name