Open krishnbera opened 5 years ago
I've reproduced your environment and for me it also doesn't work with python 3.7. We will work on that. In the meantime, can you try it with python 3.6?
Hi,
I re-installed the environment for python 3.6, on running python -c "from osim.env import RunEnv"
,
I get the following error:
Traceback (most recent call last): File "
", line 1, in ImportError: cannot import name 'RunEnv'
This time it is an error in documentation. Please follow the guidelines from the main README
https://github.com/stanfordnmbl/osim-rl#basic-usage
The name of the environment in the new challenge is L2M2019Env
.
RunEnv
is not available anymore. Can you tell me where did you find the reference to it?
Yes, it was from the Quickstart section of Documentation. Also, I am unable to load "Arm2DEnv". Can you confirm if this too has been renamed?
Thanks for pointing that! They are temporarily moved here https://github.com/stanfordnmbl/osim-rl/tree/master/examples/under-construction as we were cleaning up the code and the documentation. We will be fixing that soon, but of course, you can also use them as-is just by running that code in your scripts. I hope that helps for now...
Hi,
I am now facing trouble in importing the "Arm2DEnv" from under-construction folder. Can you please specify how to import the environment? I mean something like from ABC.DEF import XYZ
.
The code base has to be refactored and its under-construction, quick patch would be for you is to just paste the arm2d.py file inside osim.env and run the code
Hi, I tried to run the 'Arm3DEnv' after pasting the files arm.py
and arm2d.py
inside .../osim/env/.
I am trying to run the following code:
from osim.env import Arm3dEnv
env = Arm3dEnv(visualize=True)
observation = env.reset()
total_reward = 0.0
for i in range(200):
# make a step given by the controller and record the state and the reward
observation, reward, done, info = env.step(env.action_space.sample())
total_reward += reward
if done:
break
print("Total reward %f" % total_reward)
However, the visualizer window just pops up and closes. Moreover, it generates the following output.
Updating Model file from 30000 to latest format... Loaded model MoBL_ARMS_Upper_Limb_Model_OpenSim from file /home/krishn/Documents/gym/stanford/osim-rl-master/osim/models/MoBL_ARMS_J_Simple_032118.osim GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'default'. The duplicate is being renamed to 'default_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'default'. The duplicate is being renamed to 'default_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'default'. The duplicate is being renamed to 'default_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'default'. The duplicate is being renamed to 'default_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'default'. The duplicate is being renamed to 'default_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'default'. The duplicate is being renamed to 'default_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_2'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_0'. GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'. The duplicate is being renamed to 'pathwrap_1'. simbody-visualizer: Relink
/home/krishn/.conda/envs/opensim-rl/bin/../lib/././libgfortran.so.3' with
/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' 0 Traceback (most recent call last): File "demo.py", line 10, inobservation, reward, done, info = env.step(env.action_space.sample()) File "/home/krishn/Documents/gym/stanford/osim-rl-master/osim/env/osim.py", line 362, in step return [ obs, self.get_reward(), self.is_done() or (self.osim_model.istep >= self.spec.timestep_limit), {} ] File "/home/krishn/Documents/gym/stanford/osim-rl-master/osim/env/osim.py", line 293, in get_reward raise NotImplementedError NotImplementedError simbody-visualizer: received Shutdown message. Goodbye.
Any idea when the 'Arm2DEnv' will get fixed? I am trying to run it by patching the code but it is not working.
@krishnbera Arm2DEnv is now up. You can test it with: https://github.com/stanfordnmbl/osim-rl/blob/master/examples/arm2d.py
@smsong I am able to run it now. Thank you.
We've just updated the environment so that targets show above the ground. https://github.com/stanfordnmbl/osim-rl/commit/bffb4b0562d1696a79cf348e348696e674422937
There was a change in the OpenSim model that we didn't account for before)
git pull
pip install . -U
in the local repository and with the conda environment activated should do the job
Even after succesfully creating the conda environment and installing all the required dependencies, I get this error when I run
python -c "import opensim"
I am using default Python 3.7
Output for
conda list
: