Skip to content
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

generator scripts parses new types #292

Merged
merged 2 commits into from
Sep 21, 2018
Merged

generator scripts parses new types #292

merged 2 commits into from
Sep 21, 2018

Conversation

machinaut
Copy link
Contributor

Not quite done for now, but it unlocks a bunch of new mujoco_py.functions

How this is used right now (gross):

import mujoco_py
from ctypes import c_int, addressof

return_value = c_int(0)

# use this in place of `int*` arguments that are used as return values
mujoco_py.functions.mj_aray(addressof(return_value))

# return_value has now been updated (new value) by C function

The better solution is to figure out which int* arguments (all of them?) are used as return values, and have them appended to the return value tuple. Don't have the time for this now, but writing it down for the future.

@machinaut
Copy link
Contributor Author

cc @bowenbaker

@machinaut
Copy link
Contributor Author

reviewed by @bowenbaker

@machinaut machinaut merged commit c3a4f8b into master Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant