How to start the Ergo Jr web simulator

Is there anybody who use the Web simulator ?

I try to run it with

from pypot.creatures import PoppyErgoJr
robot = PoppyErgoJr(simulator='poppy-simu')

There is no answer in the notbook and the simualtor doesn’t move !

Please Help me !

Hi Luc,
You’re right, since pypot>3 there is no more print output when you instantiate the robot in Python.
Moreover, if you don’t have a traceback everything should be working well.

First open a python terminal/ide/Jupyter notebook and exectute this code:

from pypot.creatures import PoppyErgoJr
robot = PoppyErgoJr(simulator='poppy-simu')

# You can make it move 
robot.dance.start()

Note that if you use pypot 3.1, 3.2 or 3.3 you have to add use_http=True, due to this bug/breaking change

from pypot.creatures import PoppyErgoJr
robot = PoppyErgoJr(simulator='poppy-simu', use_http=True)

And if you want program the robot with Snap! and no python exectute this code:

from pypot.creatures import PoppyErgoJr
robot = PoppyErgoJr(simulator='poppy-simu', use_http=True, use_snap=True)

Now, you can open the poppy-simu webpage http://simu.poppy-project.org/poppy-ergo-jr/
If you open the webpage from the same computer than where the python is started, you can let 127.0.0.1 in the “hôte” input, otherwise you have to put the local IP (of the Raspberry Pi if you use the Jupyter instance of the Ergo Jr robot)

And check “synchroniser” checkbox.

1 Like

Hello Theo,

All is ok now ! with Simulator/ Notebook

My aim is now to use snap /simulator

The web adress http://simu.poppy-project.org/ drive me on
http://simu.poppy-project.org/snap/

This snap have no blocks to drive the robot.
Where is the best site to find them ?

How can I run the snap/simulator ?

Hey everybody,

Is there anybody who use the snap/simulator and can help me to run it ?

Thanks for your help

Je ne sais si cela pourra t’aider mais j’ai décrit l’utilisation du simulateur dans ce document. Est-il encore à jour c’est un autre problème…

you can lunch in python

from pypot.creatures import PoppyErgoJr
robot = PoppyErgoJr(simulator='poppy-simu', use_http=True, use_snap=True)

Hi everyone,
I’ve tried to do it with both the “poppy-simu” and the “vrep” but each time i try with use_snap=True it leads to an error :

If anyone can help … thank you

Hi @Franc_k,

I think you have forgetten this argument :

use_http=True

try this

from pypot.creatures import PoppyErgoJr
robot = PoppyErgoJr(simulator='poppy-simu', use_http=True, use_snap=True)

and tell me :wink:

Hi @tibo
Thank you for your answer,
unfortunatly it didn’t work. I get exactly the same error :

:grimacing: arf :grimacing:

On my side, it works! I will investigate!!!

What is your framework (python 2 or 3 ; with without a real robot, etc)

Anaconda 3 64 bits (windows) Notebook -> Python 3 without any real robot (yet :wink: )

Whether i try :

PoppyErgoJr(simulator='poppy-simu', use_http=True, use_snap=True)
PoppyErgoJr(simulator='poppy-simu', use_snap=True)
PoppyErgoJr(simulator='vrep', use_http=True, use_snap=True)
PoppyErgoJr(simulator='vrep', use_snap=True)

I get the same error.

But when I don’t try to use snap, it works in both poppy-simu and vrep modes.

Try to remove all xml file in

anaconda3/site-packages/pypot/server/snap_projects/

and add this xml
poppy-demo-project.xml (83.6 KB)
pypot-snap-blocks.xml (76.1 KB)

Ok I try,
I notice that in this folder i do have those tw files and i also have the ones in french. Should i delete them too ?

:frowning:

Deleted everything then copying the files you gave me but still the same error :’(

ok …

open anaconda terminal prompt and type:

conda env export -n root --file root_export.txt

and send us this file. it will allow us to better understand your problem …

thank you

hello all

same bug are solved in :slight_smile: