-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MjSpec introspection with visual.rgba
, visual.headlight
, and visual.global_
.
#2291
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the other members of mjVisual (map, scale, quality)?
Can you please do the CLA thing?
Also, thank you! 😊 🙏 |
rgba/headlight have arrays (which map/scale/quality don't), so I think those types need to be explicitly defined in the generated code which calling CLA is done. Thanks! |
Got it, makes sense. Question: are you sure we need the underscore suffix? I.e. did you try not adding it and got an actual error? Sometimes the syntax highlighting will make you think you need it but |
Yeah, I get the following error. $ python -c 'import mujoco; print(mujoco.MjSpec().visual.global)'
File "<string>", line 1
import mujoco; print(mujoco.MjSpec().visual.global)
^^^^^^
SyntaxError: invalid syntax EDIT: after looking into it a bit, seems like all python keywords (i.e. Also, thanks for the quick responses!! |
Great, thanks for doing this! Is there anything that prevents you to put the code inside |
…ed access to MjSpec.visual.global_.
Thanks for taking the time! I don't think |
Can you remove the trailing spaces please? Lines 986, 988 and 989 in specs.cc |
Done |
Fixes issue mentioned here in #2289.