-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding package to Xcode project. #3
Comments
You need to install glfw locally for the GLContext object dependency. I would also recommend you first to try the To install glfw on macOS, If you want to replace with NSOpenGLView, you basically need to write your own GLContext, at that point, I recommend fork / edit and then put up a PR to introduce the new GLXXXContext back. |
simulate and codegen are not frameworks, but a binary target (one is the same as samples/simulate.cc from main MuJoCo repo, the other is the code generator). Can you copy the full command line errors? Make sure you run the command from swift-mujoco repo:
|
Yes I see .o files and swift modules. Here is the output from building simulate. Warnings not errors. The only error is the no such module. |
If swift build --target simulate works. You should be able to find the binary under swift run simulate If all these works, then the library itself is good on your macOS. There are probably just some setup issues on the Xcode end if it fails for your project. I am trying to teething out your macOS dependency issues v.s. the Xcode project setup issues. If |
Yeah. Bazel is not required to know if you don't develop swift-mujoco library yourself. SwiftPM is required and recommended way to introduce swift-mujoco as a dependency for your project. As for the UI, try to drag & drop a model into it and see what happens (./Examples/assets/). |
OK. This looks like simply the event loop is not running, hence no event processed. Could be a new issue with Xcode 14 (which I haven't tried) since we use some of Swift Concurrency primitives. What's your environment? (Which Xcode version, what kind of Mac (M1 / M2 / Intel?)). |
Just tried with Xcode 14.0.1, on a Intel-based Mac Mini, cannot reprod this issue. |
MacOS BigSur 11.6.7 |
Is it possible for you to upgrade? I don't plan to support 5.5 (5.6.x and above, yes) and it would be easier for me to verify (also BigSur is a bit dicey, as I am not sure how compatible some of the concurrency primitives are). |
I'm not sure. I think I have a dependency related to Maya 2019. I will have to carefully think about it. I have another MacBook that I just got back but needs a complete OS reinstall so either I can try that route or do a careful upgrade. Either way it will take some time. |
I upgraded to Monterey, Xcode 14 and Swift 5.7. Things are working better but there are still issues. It doesn't work with dual monitors or fullscreen mode. With dual monitors I had to disconnect my external one and then it looks okay on my laptop screen. If I have external monitor attached then the UI is not legible on either screen. |
Right. I didn't optimize for dual monitor or fullscreen. These should act the same as |
First thank you for this great project!
I've created a MacOS command line tool app in Xcode and attempting to add the swift-mujoco package via Xcode:
After doing this and attempting to build I'm seeing:
My longer term hope is to be able to show mujoco in a MTKView or SCNView. I read that NSOpenGLView is deprecated, but maybe it could be used as an interim step to porting Mujoco's OpenGL code.
The text was updated successfully, but these errors were encountered: