How to start the Ergo Jr web simulator

simulator
ergo-jr
Tags: #<Tag:0x00007f5cf06831f8> #<Tag:0x00007f5cf0683068>

#1

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 !


#3

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.


#4

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 ?


#5

Hey everybody,

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

Thanks for your help


#6

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…


#7

you can lunch in python

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

#8

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


#9

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:


#10

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


#11

: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)


#12

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.


#13

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)


#14

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 ?


#15

:frowning:

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


#16

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


#17

hello all

same bug are solved in :slight_smile: