Loading
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more

crowdAI is shutting down - please read our blog post for more information

Learning How to Walk

Reinforcement learning environments with musculoskeletal models


Completed
200
Submissions
125
Participants
18028
Views

Error: Setup on Windows

Posted by flopit over 2 years ago

When trying to run the example under Windows (following install with anaconda2, see https://github.com/stanfordnmbl/osim-rl), everything runs fine until running the example code given:

Sample Code: skelett1.py

from osim.env import GaitEnv

env = GaitEnv(visualize=True) observation = env.reset() for i in range(500): observation, reward, done, info = env.step(env.action_space.sample())

running this with:

opensim-rl) C:\Users\Florian>python skelett1.py

Then I am getting following output and error (looks executing “GaitEnv(visualize=True)” is a problem):

Updating Model file from 30000 to latest format… Loaded model gait9dof18musc_Thelen_BigSpheres.osim from file C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\osim\env../models/gait9dof18musc.osim pelvis femur_r tibia_r talus_r calcn_r toes_r femur_l tibia_l talus_l calcn_l toes_l torso head Traceback (most recent call last): File “skelett1.py”, line 3, in env = GaitEnv(visualize=True) File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\osim\env\human.py", line 41, in __init__ super(GaitEnv, self).__init__(visualize = visualize, noutput = noutput) File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\osim\env\osim.py", line 103, in __init__ self.reset() File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\osim\env\human.py", line 14, in reset return super(GaitEnv, self).reset() File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\gym\core.py", line 123, in reset observation = self._reset() File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\osim\env\osim.py", line 112, in _reset self.osim_model.reset() File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\osim\env\osim.py", line 30, in reset self.state0 = self.model.initSystem() File "C:\Users\Florian\Anaconda2\envs\opensim-rl\lib\site-packages\opensim\simulation.py", line 54023, in initSystem return _simulation.Model_initSystem(self) RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': SimTK Exception thrown at VisualizerProtocol.cpp:163: Error detected by Simbody method VisualizerProtocol::ctor(): Unable to spawn executable 'simbody-visualizer' from directories:

Error detected by Simbody method VisualizerProtocol::ctor(): Unable to spawn executable ‘simbody-visualizer’ from directories: c:\Users\Florian\Anaconda2\envs\opensim-rl\ C:/Anaconda2/conda-bld/opensim_1484883138348/_b_env/Library/simbody/bin/ C:\Program Files\Simbody\bin\ C:\Program Files\SimTK\bin\ Final system error was errno=2 (No such file or directory). (Required condition ‘status == 0’ was not met.)

It looks it is trying to “spawn executable ‘simbody-visualizer’, but searching in directories that do not even exist. Moreover, some path are given with slashes, other with backslashes… Anything else needs to be installed or added to path variable to get everything running???

Thanks for helping.

Posted by spMohanty  over 2 years ago |  Quote

Hi Florian,

Thanks for pointing it out. Looks like simbody-visualizer is not packaged in the binaries released for windows. We will try to have that fixed as soon as possible.

In the meantime, if you initialise GaitEnv by env = GaitEnv(visualize=False) it should work fine.

We will post on this thread as soon as we have dealt with this.

Cheers, Mohanty

Posted by flopit  over 2 years ago |  Quote

Hi, thanks for the quick reply, yes I had the same Idea :-) , will try to use =False.

1

Posted by spMohanty  over 2 years ago |  Quote

Also, Can you try : conda install -c conda-forge simbody

And then try running with GaitEnv(visualize=True) ?

I have a feeling this will work too in the meantime :D

Cheers, Mohanty

Posted by flopit  over 2 years ago |  Quote

Thanks again, I tried that, getting a “UnsatisfiableError”… do I need to remove sth before?

Details: (opensim-rl) C:\Users\Florian>conda install -c conda-forge simbody Fetching package metadata …………. Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict: - simbody Use “conda info " to see the dependencies for each package.

(opensim-rl) C:\Users\Florian>conda info simbody Fetching package metadata ………..

NoPackagesFoundError: Package missing in current win-64 channels: - simbody

Posted by spMohanty  over 2 years ago |  Quote

Thats weird :-?

Can you try directly downloading : https://anaconda.org/conda-forge/simbody/3.5.4/download/win-64/simbody-3.5.4-vc14_204.tar.bz2

And then try installing it by :

conda install <path-to-downloaded-file>

Cheers, Mohanty

Posted by Lukasz_  over 2 years ago |  Quote

Hi Florian,

actually in the windows version the paths were mixed up – few days ago we put the new version on anaconda which should have it fixed. Please just try to remove and add the OpenSim package ( to be sure that the right build is downloaded, you can run conda install https://anaconda.org/kidzik/opensim/4.0.0/download/win-64/opensim-4.0.0-py27_10.tar.bz2)

Another solution is to copy the visualizer manually from c:\Users\Florian\Anaconda2\envs\opensim-rl\Library\bin\simbody-visualizer.exe to c:\Users\Florian\Anaconda2\envs\opensim-rl\simbody-visualizer.exe

In both cases env = GaitEnv(visualize=True) should work fine and you should see the visualizer.

Please let us know if this works.

Best, Lukasz

Posted by flopit  over 2 years ago |  Quote

Great, solution 1 worked, I can see it :-)) Thanks!