google-deepmind / google-deepmind/dm_control

Find all sites of a default class

Open
#482 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
764
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.