Issue starting the environment
Closed this issue · 4 comments
I am trying to run the code in the jupyter notebook without success. I have followed the instructions in the README, as well as the suggested code in closed issue #1.
When I run the following in the terminal
docker run --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --runtime=nvidia vrep_ee_reach
I get
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
No protocol specified
QXcbConnection: Could not connect to display :0.0
/app/V-REP/vrep.sh: line 33: 13 Aborted (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"
I have looked around for a solution but haven't anything useful. When I run the command
env_reach = gym.make("dVRLReach-v0")
in the notebook, I get:
Also, how integrated is Docker into the simulation? For instance, can I download V-Rep to my Mac and run the code without Docker?
Thanks!
Can you confirm enabled GUI's with Docker (http://wiki.ros.org/docker/Tutorials/GUI).
As for using your Mac, you should be able to do what you are saying. The issue is that if you want to spawn multiple environments in parallel it can get tricky when not using a docker. But for a single environment, I believe you can do it by just:
- Opening the *.ttt environments in V-REP and starting the simulation
- Comment out the lines 65-69 and line 177 in dVRL_simulator/PsmEnv.py
- Where lines 65-69 were, set the variable "self.container_ip" to be localhost (127.0.0.1) since you are running it locally
- A new instance of the PSM environments should now link with the your opened *.ttt file!
Editing this comment in case of future users running the code on Mac's, Window, or non-Nvidia machines. Please check this comment: #6 (comment) and modify the *.dll, *.dylib, *.so files before step 1 here.
Thanks for the advice about using the Mac, I will give it a try soon.
Thanks for the tip on the GUI, I thought it had been set up correctly, but I forgot to update the command when I upgraded ROS versions. I am now able to get VREP open, but am getting an error with the ClientID. Any idea what's causing this?
Based on a bit of digging online, it seems as though this is a new-style vs old-style clash with python version: https://stackoverflow.com/questions/1713038/super-fails-with-error-typeerror-argument-1-must-be-type-not-classobj-when
I am guessing I am using a different version of python of something, so I never ran into this issue. Could you modify the dVRL/dVRL_simulator/vrep/vrepObject.py file and see if changing line 24 to:
class vrepObject(object):
I switched to python3 and the sample code runs successfully
thank you very much!