You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to filter sites based on class names. According to documentation, The following code will return the class name mjcf_model.find_all('site')[0].dclass
But instead, it returned an MJCF Element, mjcf_model.find_all('site')[0].dclass.dclass will return the actual class name.
This makes filtering sites based on class names very ugly because sites with no default class names will return None, then doing mjcf_model.find('site','mysite').dclass.dclass will result in errors.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to filter sites based on class names. According to documentation, The following code will return the class name
mjcf_model.find_all('site')[0].dclass
But instead, it returned an
MJCF Element
,mjcf_model.find_all('site')[0].dclass.dclass
will return the actual class name.This makes filtering sites based on class names very ugly because sites with no default class names will return None, then doing
mjcf_model.find('site','mysite').dclass.dclass
will result in errors.The text was updated successfully, but these errors were encountered: