Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

11 figure out a nice way of controlling a model #14

Merged
merged 7 commits into from
Aug 14, 2023

Conversation

JamieMair
Copy link
Owner

I am thinking of this as more of a draft WIP. I don't suggest keeping the Controller struct around for very long, but it serves as a temporary way to see if the bindings are working. This also implements the basic renderer, in a very round about way. It doesn't have any camera control at all. However, we can actually see the test rendering correctly now, and the controller "working".

@JamieMair JamieMair linked an issue Aug 7, 2023 that may be closed by this pull request
@JamieMair JamieMair marked this pull request as draft August 7, 2023 16:46
@nic-barbara
Copy link
Collaborator

nic-barbara commented Aug 7, 2023

This doesn't seem to run on my machine (a mac) - it segfaults when trying to run the controller. Extract of the error as follows:

[61334] signal (11.1): Segmentation fault: 11
in expression starting at /Users/Nic97/.julia/dev/MuJoCo/test/controllers.jl:9
unsafe_store! at ./pointer.jl:126 [inlined]
setindex! at /Users/Nic97/.julia/packages/UnsafeArrays/56T02/src/unsafe_array.jl:60 [inlined]
randn! at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-grannysmith-C07ZQ07RJYVY.0/build/default-grannysmith-C07ZQ07RJYVY-0/julialang/julia-release-1-dot-9/usr/share/julia/stdlib/v1.9/Random/src/normal.jl:208 [inlined]
...

@nic-barbara
Copy link
Collaborator

Looks like it's lines in testrender() that affect the controller:

randn!(controller.control)
controller.control .*= 10.0

If I remove these, I get visuals (of a very sad humanoid).

@nic-barbara nic-barbara merged commit 3801255 into main Aug 14, 2023
@nic-barbara nic-barbara deleted the 11-figure-out-a-nice-way-of-controlling-a-model branch August 28, 2023 07:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Figure out a nice way of controlling a model
2 participants