Poppy controlled by phratch (a variant of scratch)

FOLUSZNY Danaé and MAHE Solène work on a fun project at Mines Douai. The goal is to connect and to control Poppy with Phratch. All is done with the REST API provided by Poppy. We are doing our test on the Poppy simulator. Now, we have to try on the real one !

You can already download PhratchPoppy in the add-on menu of Phratch ! Blocks are in french for now, but it will be changed soon.

You can see a video at the following page: http://www.phratch.com/archives/1138

3 Likes

Hi @Jannik this is great and very interesting. It would be very useful if these students would register on the forum and explain what they did, what was easy or difficult, what are the challenges, where they would like to go next.

We have developed also a Snap! connection, which should be soon documented on the site by @Theo and @Pierre
and it would be cool to see and compare the kind of visual programming abstractions that are being produced in both initiatives.

Hi,
You can test and see Snap! blocks online [here][1], with the last version of pypot (2.6.1).
Your approach is interesting, you made high level comportment blocks which is quite different of what we made.
I tried to test Phratch (on Linux), but Poppy motion/sensing/connection sections are empty…
Btw, Phratch is based on BYOB (precessor of Snap!) but seems to use its own blocks format, so projects from Snap! could not be imported. Is that true ?

EDIT: snap-dev merged to master
[1]: http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=showok&ProjectName=pypot_orchestration_demo
[2]: https://github.com/poppy-project/pypot/archive/snap-working-demo.zip

Hi,

I just added a button to crreate a Poppy Sprite.
In the previous version you had to click on “new sprite” and select a poppy sprite morph. (ok, this is not trivial :slight_smile: )
When you select a poppy sprite, you can see the blocks.

Phratch is based on byob partly. But the evolution of phratch make that it is not more compatible with byob.

@Theo Great work ! Very clear and simple to use.

Hi,

We worked on the phratch project and would like to explain what we did.
The first difficulties we had were on the installation of a server to control the v-rep simulation, in part because we don’t know the python language.
Then, we had to control the poppy simulator from pharo and we met some difficulties to translate a set request in smalltalk language.
Once the set and get requests worked, we created a robot object, which contains the differents motors of poppy. It was a little tedious to create all the classes corresponding to the motors.
Then, we had to create the phratch blocks: we chose to make 3 categories: poppy motion, poppy sensing and poppy connection. What was hard in that point was to find appropriate names to the blocks.
We first created the blocks inside the class PhratchSpriteMorph and the blocks appeared with the basic sprite of phratch. To be able to connect phratch to a poppy (block connect to port: ip: ), we chose to create a class PoppySpriteMorph, subclass of PhratchSpriteMorph. It means that we have to create a sprite poppy to see the block related to poppy. So we can create differents sprites connected to differents poppy robots, to controll all the robots in the same window.
Finally, we added a class in PhratchTranslator to have the possibility to translate the poppy blocks in french.