I am trying to use Snap! on my Poppy. I re-read the tutorial and what I understood is that I need the following code to be run in the robot:
from poppy_humanoid import PoppyHumanoid
poppy = PoppyHumanoid(use_snap=True)
poppy.snap.run()
And then, on my computer, I should be able to connect to http://poppy.local:8080/snap.
I can’t connect. I had a deeper look and tested with 6969 instead of 8080 and I get a 404 error.
Did I understand something wrong ? I have a freshly installed Odroid, do I need to install something more ?
The 8080 port is for REST API I think (ref).
Snap uses its own webserver on 6969 port. If you have a 404 error on 6969 port, it means probably that everything works (you just have to change host variable in snap from “localhost” to “poppy.local” as explained in the tutorial notebook).
You can check by this url : http://poppy.local:6969/motors/motors which will display every motors name.
It is not specified in the notebook tutorial but you can also use directly the command poppy-snap poppy-humanoid --no-browser in a shell to start the snap webserver with an instance of popy-humanoid (see poppy-snap -h for all other options).
Note : I will soon merge the branch snap-dev to master which will change add more blocks, change some blocks names and removing the synchronization loop,