Running Poppy Humanoid on V-REP

Hi, I am following this tutorial: How-To: Control a Poppy Humanoid in a Simulator using a Python lib: pypot

I have everything installed and the following lines compile correctly on notebook:

from pypot.vrep import from_vrep from poppy.creatures import PoppyHumanoid

However, when I launch v-rep I get the following error:

IOError Traceback (most recent call last)
in ()
2 from poppy.creatures import PoppyHumanoid
----> 4 poppy = PoppyHumanoid(simulator=‘vrep’)

/usr/local/lib/python2.7/site-packages/poppy/creatures/abstractcreature.pyc in new(cls, base_path, config, simulator, scene, host, port, id, use_snap, snap_host, snap_port, snap_quiet, use_http, http_host, http_port, http_quiet, use_remote, remote_host, remote_port, start_background_services, sync, **extra)
105 poppy_creature = from_vrep(config, host, port, scene)
106 except VrepConnectionError:
–> 107 raise IOError(‘Connection to V-REP failed!’)
109 elif simulator == ‘poppy-simu’:

IOError: Connection to V-REP failed!

Followed by v-rep force-quitting. I couldn’t find a solution anywhere on the forum. Does anyone have an idea what the issue is?


Are you sure you closed the popup window of V-REP ? They are blocking communication through the API, you have to check 3 time the cross “Do not show this again”.
There is more information about that on the documentation.

Actually, the vrep version compatible with pypot is 3.1.2.(@Theo : right ?) If you downloaded the latest (version 3.3.2), it is not sure that all functions are compatibles. It depends on what platform you are but the vrep API has changed a little bit and may cause issues like that.
If the solution is not the box, check what vrep you have.

1 Like

I never got a popup window in v-rep so I tried @juju’s suggestion and downloaded v3.1.2. And following the documentation tried this command: poppy-services --snap --vrep --no-browser poppy-humanoid

But am still having trouble connecting and am unsure what could be causing it:

Attempt 1 to start the robot…
Remote error
Attempt 2 to start the robot…
Connection to V-REP failed!
Attempt 3 to start the robot…
Connection to V-REP failed!
Attempt 4 to start the robot…
Connection to V-REP failed!
Attempt 5 to start the robot…
Connection to V-REP failed!
Could not start up the robot…
Traceback (most recent call last):
File “/usr/local/bin/poppy-services”, line 11, in
File “/usr/local/lib/python2.7/site-packages/poppy/creatures/”, line 179, in main
with closing(start_poppy_with_services(args)):
File “/usr/local/lib/python2.7/site-packages/poppy/creatures/”, line 38, in start_poppy_with_services
raise exc_inst
IOError: Connection to V-REP failed!

Strange, what OS / python version do you have ?
You should have a popup window for the first connection, so as the api is blocked are you sure that the popup is not in background ?

I’m on Mac OSX, Python 2.7.
And yeah, it’s not popping up in the background for either version…

Hum, not common behavior…

First, open Vrep.
Second, execute the following code :

from poppy.creatures import PoppyTorso
robot = PoppyTorso(simulator='vrep', host='')

If it doesn’t work, you can try to access vrep in low level :
Always with Vrep opened :

from import VrepIO
vrep_io = VrepIO('',19997)

Tell us what happened.

1 Like

You can also check if V-REP API is started with this command (in a terminal) lsof -i :19997

I am having the same problem:

raise IOError(‘Connection to V-REP failed!’)

OSError: Connection to V-REP failed!

even after trying:

from import VrepIO
vrep_io = VrepIO(‘’,19997)

I am on windows 10 and CoppeliaSim Edu

Please advice