Open arwhalley opened 4 months ago
Thanks for reporting @arwhalley I'm assuming you used your 3.10 environment to build in cmake and to run, please let me know otherwise
Hi Ayman, Yes, the Python3.10 environment was used for the build. Rob
On Fri, 1 Mar 2024 at 19:04, Ayman Habib @.***> wrote:
Thanks for reporting @arwhalley https://github.com/arwhalley I'm assuming you used your 3.10 environment to build in cmake and to run, please let me know otherwise
— Reply to this email directly, view it on GitHub https://github.com/opensim-org/opensim-core/issues/3718#issuecomment-1973761983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQR5L7I6RPRIQJKRBAQIHTYWDGNHAVCNFSM6AAAAABDWOHZZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTG43DCOJYGM . You are receiving this because you were mentioned.Message ID: @.***>
Actually, the C++ example, built with VISUALIZER defined, behaves in exactly the same way, and gives the same broken pipe error. This seems to be connected with OpenSim::Model.setUseVisualizer architecture because the C++ double pendulum example, that creates a MultibodySystem instance and adds it to a Visualizer instance during construction, works perfectly. Unfortunately, that latter API doesn't appear to be available for Python. In addition, I have tried the scripts on a fresh Ubuntu 22.04 installation with the same result.
Thanks for the update @arwhalley my conjecture is that the set of paths that simbody uses to search for the the visualizer executable maynot be complete or has baked in expectation of layout that's not satisfied. I assumed this has to do with the layout of the python package but based on your C++ example that's not accurate. Generally you can set an environment variable to tell simbody where to locate the visualizer as described here https://github.com/simbody/simbody/blob/6e7913c3851105f3d24b3fad2fdc4a42a7d86f50/Simbody/Visualizer/src/VisualizerProtocol.cpp#L253C21-L253C39 if you can set an environment variable and get the visualizer to work consistently that would be a good workaround. With a variety of settings for C++/Python/Matlab environments this may end up more robust than trying to guess the variety of layouts and baking the assumptions into the code anyway. Thank you
A minimal non working C++ setup would be best to troubleshoot if you can describe it (which example, running from what layout (build vs install) and what FHS setting was chosen in Cmake as it changes the installation layout.
I have tried setting SIMBODY_HOME and SimTK_INSTALL_DIR. I've checked that SIMBODY_VISUALIZER_INSTALL_DIR, used in the build, still refers to a valid directory. I've copied the simbody-visualizer executable into the current directory. I've created a symbolic link in the current directory to the simbody-visualizer.
I have compiled the simple_arm_model_build from https://simtk.org/api_docs/opensim/api_docs/md_doc_APIGuide.html and I've tried running from both build and install layouts.
My build was created using the opensim-gui build script and hence its layout is $HOME/opensim-core and $HOME/opensim-workspace, and it has installed into /opt/opensim-gui.
Having said all that, the visualizer window opens every time. Sometimes it works correctly, but more often the window is briefly black, and then closes, with the segfault and error messages complaining of a broken pipe. So I think that the search path must be correct, and the visualizer is found everytime. It seems to be more to do with the creation of the pipe itself.
Any updates on this one?
Mint 21.3 (Ubuntu 22.04 based) using opensim-gui build script.
Run opensim-core-source/Bindings/Python/examples/build_simple_arm_model.py using Python3.10. The visualizer window opens and immediately closes again, with the following:
RuntimeError Traceback (most recent call last)