Xuan Sang Le is a PhD student who has joined our team mid-february. His work is co-supervized by Ecole des Mines and ENSTA is about speed optimization of Smalltalk robotic software by means of FPGAs. The first step is to develop an application fully in Smalltalk and our PhaROS Robotics framework that will serve as a reference for our metrics. The app we have chosen is a simple tracker robot that follows an object of a particular color. Beside being fun, the result shown by the video below is interesting. As we have initially expected we can’t pretend to be real-time. Still, Pharo is capable of fetching an image through wifi, process it and discover the position of the object 650 milliseconds. And this is with non-optimized code. Figures are likely to be better after optimization.
Faisant suite aux différentes précédentes éditions des JNRH et JNCAR, les GT Robotique Humanoïde et Architecture de Contrôle en Robotique (http://www.gdr-robotique.org) et l’Université de Versailles Saint Quentin (Laboratoire LISV) ont le plaisir de vous annoncer la tenue des journées nationales de la robotique humanoïde et des architectures de contrôle des robots les lundi 23 et mardi 24 juin 2014.
Ces journées ont pour objectif de réunir les communautés nationales de la recherche et de l’industrie autour des problématiques de la robotique humanoïde et des architectures de contrôle des robots.
Ces problématiques concernent par exemple la conception mécanique de nouvelles structures anthropomorphes, la modélisation, la commande, ou l’optimisation pour la gestion de la redondance ou la planification de trajectoires.
Pour ce qui est des architectures de contrôle, les préoccupations concernent les logiciels embarqués pour contrôler des robots individuels ou coordonner des systèmes multi-robots. L’intégration logicielle des fonctionnalités du robot est devenu une problématique centrale pour la future industrie de la robotique de service (médicale, d’assistance, industrielle, etc.), amenant à considérer de multiples aspects dont par exemple la montée en abstraction via l’ingénierie dirigée par les modèles et les langages dédiés, les problèmes d’exécution distribuée, la validation et la simulation (e.g. hardware in the loop).
Un deuxième objectif, sera de renforcer les liens entre la communauté des architectures de contrôle en robotique et celle de la robotique humanoïde afin de pouvoir s’enrichir mutuellement des connaissances et résultats réciproques. Cela se traduira notamment par des sessions uniques pour favoriser les échanges entre les deux communautés.
Participation et déroulement de ces journées :
Nous invitons la communauté scientifique à proposer des présentations autour des thèmes précédemment cités. Cette proposition sera faite sous la forme d’un résumé d’une page à soumettre au format pdf à l’adresse suivante :
Ces présentations seront d’une durée d’environ 30mn avec une place importante accordée aux questions et à la discussion (15mn).
Ces journées débuteront lundi 23 juin à 9h30 et se termineront le mardi 24 juin à 17h.
Agenda des journées :
- Soumission du résumé avant le 09/05/2014
- Programme des journées disponible le 30/05/2014
I am pleased to announce Phratch website.
Thanks to the support of ESUG, it is possible to make visible this wonderful project.
For now, what is available on the site:
- a presentation of Phratch (you can refer to it now)
- installation files, there is a portable version for Windows, Linux, MacOS.
- block documentation: generated from a Phratch image !
- Some elements for Jetstorm (a lot of new articles will come soon)
- a category with news
Now about the versions, I am developing the version 3.0
Why this number ? Why a third version in one year of work ?
It is clear that a lot of work is already done. Each version represents strong changes in the architecture.
- version 1.0 is the port of Scratch + BYOB + Panther in Pharo. It is working but not extendable.
- version 2.0 makes Phratch really extendable. We can develop our own block for everything in Pharo. I also make Phratch more modular with the use of Pragmas for some menus, declaration of blocks… It is available only in Pharo 3.0. There are some languages available, I hope more people can translate in other languages.
- version 3.0 is the version in development. What is new here: Before this version Phratch was really slow. I am cleaning the code, and now it begins to be fast, really fast ! We also begun to write tests.
I am really happy to have the support of ESUG and Pharo.
Thanks to the community to make Pharo as usable as it it, it makes our dreams possible.
This was our first session on Phratch. The main goal of this course is to program the Lego Minstorm Ev3. The course is a sequence of 6 sessions.
In this first session, we were interested only on the software part: the students learned how to use Phratch, how to use blocks, variables, how to make a block…
The goal for them was to build the famous game: a Pong-like !
We also addressed an interesting point in software engineering: how to report a bug. Yes, you know that Phratch is in development and the current version is instable. So the idea for the students is: when they found a problem, there had to reproduce it at least one time and only afterthey reproduced it they call the teacher. The teacher validate the bug, then the student had to write a small bug report on a post-it and paste it on the white board.
Why a post-it ? It is small, and make the student thinking about what is important to write. It allows them to develop the deductive reasoning skill.
Phratch is clearly more stable that I expected. Now, we need to make it faster !
Let’s go for Phratch3.0.
More photos here.
Agile methods are now used in a large number of companies specialized in IT, including IT services. These agile methods are taught often in a specific course containing a part with theory and a practical part.
The problematic is the following: we say that agile methods are effective and provide a better project management. Why we , teachers, are not using the agile gaits out of this specific course?
The project has two goals : firstly teaching agile methods transversally to the main courses . On the other hand, it is set to make the course more flexible and adapted to students. The result is a fragmented learning, so students are better able to assimilate knowledge.
The gait is as follows: The students have an access to a pdf document of the course. They have to read it. A 4 hours session goes as follows: Each student (or binomial) has a task-board on which it will add tasks (written on post-it). This task-board comes from the SCRUM agile method. When he finish a task, he updates his task board . The task board is particularly important for the teacher : it allows him to see the progress of students in their work, in the same manner as for the management of an IT project.
One of the tasks is reading course. This needs to create a synthetic and readable pdf. The students are invited to read the document for 30 to 45 minutes depending on the difficulty . Then the teacher organizes a session of oral course of 20 minutes, just explaining the main elements to start the work. Other tasks are the completion of the User Stories of the project.
To apply this method, we add different tools (for example: board planning, the pomodoro and equivalent stand-up meeting in writing) that can be visible in the photos.
As i already shout in the FOSDEM 2014 slides post, i have presented PhaROS in the last edition of FOSDEM, under the title of PhaROS: Towards Live Environments in Robotics.
I bring now to you this video taken during the presentation. I wish you to enjoy it!
Sorry if my hair is disheveled :), i am not very photogenic.
PhaROS tool has the mission of installing and creating packages into a ROS installation.
For doing this we have several commands, from installing and creating to administrating repositories, so you can manage your own packages and creating templates without major problems.
Install PhaROS tool
We are working for having this package in Ubuntu and ROS repositories, but meanwhile you can download it from here: pharos-deb
Once downloaded just execute
sudo dpkg -i pharos.deb
Install PhaROS based Package
pharos install PACKAGE [OPTIONS]
pharos install esug –location=/home/user/ros/workspace –version=2.0
pharos install –help
Create PhaROS based Package
pharos create PACKAGE [OPTIONS]
pharos create –location=/home/user/ros/workspace –version=2.0 –author=YourName –author-email=YourEmail
Tip: Be sure the email is a correct one. If is not a correctly spelled one you will notice during last step.
pharos create –help
Register Repository of packages
pharos register-repository –url=anUrl –package=aPackage [ OPTIONS ]
pharos register-repository –url=http://smalltalkhub.com/mc/user/YourProject/main –package=YourProjectDirectory –directory=YourProjectDirectory
Tip: If your repository requires user/password for reading add –user=User –password=Password to the example.
Disclaimer: User/Password will be stored in a text file without any security.
pharos register-repository –help
Listing registered repositories
Creating a directory for your own project repository
pharos create-repository PACKAGENAME [ OPTIONS ]
pharos create-repository example –user=UserName > directory.st
pharos create-repository example –user=UserName –output= directory.st
pharos create-repository –help
We are now really glad to present an enhanced way to deal with PhaROS.
Since we want to keep with the ROS community spirit of collaborative development for robotics, we introduce now our own command for managing packages made in PhaROS.
This command is mean to install existing packages and create new packages with cool snippets and examples for going faster through the learning time.
PhaROS tool is made completely in Pharo smalltalk and it allows to deploy an existent package into a pharo 1.4/2.0/3.0 in any distribution of ROS that uses catkin package. It automatize the generation xml, makefiles, type and scripts creation, going on the direction of letting the pharo programmer to focus just in programming and not in infrastructure stuff.
For Installing and Using please check this post: using-pharos-tool
CodeJam is a programming contest. It includes a lot of problems.
For each problems, 2 data sets are provided: a small one and a large one. It is really interesting to learn programming.
You can try a solution on the small data set and also send it to the CodeJam web site to know if it is correct and then try on the larger data set.
CJSover is a framework written in Pharo to easily implement algorithms to solve CodeJam problems.
It simplifies data file reading and writing. I also implemented some (really naïve and non-optimized ;-)) solutions to some problems.
And for those “solved” problems, I commit here the correct solution to then be able to run automated tests that re-run them.
HOW TO USE
$ git clone https://github.com/LucFabresse/CJSolver.git CJSolver.git $ cd CJSolver.git $ sh newImage.sh # this will download the Pharo VM + Pharo image + load the CJSolver code $ ./pharo-ui cjsolver.image
I did this small framework because:
- I want that students learn Pharo,
- I want that students participate to some programming contests using Pharo,
- I want to show students that YES, we can also implement these problems in Pharo
Please, checkout the code,
optimize already implemented solutions,
or implement solution to new problems,
and have fun ;-)
1- Create a category
Before creating a block, you probably need to create a category. By default, in Phratch there are 10 shown categories. Each of these categories has 4 properties:
- a label, which is shown as the name of the category (for example “Motion”)
- a color, which is the color of the blocks inside the category. For now, the category has not necessarily the same color because the display of a category is based on an image in the scrachSkin subdirectory. This point is not explained here. We will use a basic color for the category.
- an order number, which represents the place of your category in the display screen.
- a viewer page, which represents how the category is displayed when we click on it. Most of the categories have the basic behavior (displaying blocks), but sometimes, we can need specific ones. For example,the category “Variables” has some buttons (Make a variable, Make a list and Make a block). Here we will use the basic viewer page.
So, let’s go for creating our own category.
In the Pharo environment, create a class which is a subclass of PhratchCategory, like the following one:
PhratchCategory subclass: #PhratchCategoryMyFirst instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: ‘MyOwnBlocks’
In the class side of your new class, add these methods:
color ^(Color r: 0.1 g: 0.2 b: 0.7)
where the color can have others values.
label ^'my category'
This label will be used to place your future block in this category and is used for the display.
which gives the place where the category will be placed.
Your first category is done. Congratulation !
To see it in Phratch, just relaunch Phratch, with this command:
Your empty category is available in the Phratch environment.
A last thing about category: when a category is created, a new setting appears in the Setting browser. This setting allows to show or hide the category in Phratch. By default, the value is true.
2- Create a specific sprite
In Phratch a block is a message sent to a Sprite. By default the Sprite “Sprite1” is a PhratchSpriteMorph. If you need to have a specific behavior, just create a subclass of it. Then, you will have the possibility to select this new specific sprite when creating a new sprite in Phratch.
In this tutorial, we do not create a new sprite. We will use the generic one.
3- Create a first blocks
In PhratchSpriteMorph, create a protocol “*MyOwnBlocks”, to be clean with the modularity of the system.
Then you can add your behavior. It can be what you want. For example, I want to open a Transcript. For that, my method is:
openTranscript ^Transcript open
For now, the method is not visible in Phratch. To make it visible, add the following pragma:
openTranscript <phratchItem: 'open a transcript' kind: #- category: 'my category' defaultValues: #() subCategory: #a special: #()> ^Transcript open
When updating the view in Phratch, by clicking on “My category” a new block appears. By clicking on this block a transcript appears.
You have written your first block !
4- About the pragma
The pragma used to declare a new block in Phratch has the following form:
<phratchItem: '' kind: #- category: '' defaultValues: #() subCategory: #a special: #()>
- phratchItem contains the label of the block. It contains also the entry for parameters.
- kind is the kind of block. By default “#-“ means that the block is a CommandBlockMorph.
- defaultValues is an array with the default parameter if your block needs them.
- subCategory is a symbol that allows you to order blocks inside your category.
- special is an array with special behavior that should be executed on the block before the block execution (the main use is the parametrization of the block itself).
Let’s go for another example. Write this method, which open a Nautilus browser a a specific class:
openBrowserOn: aStringClass <phratchItem: 'open a browser on: $String$' kind: #- category: 'my category' defaultValues: #('Collection') subCategory: #a special: #()> Nautilus fullOnClass: (Smalltalk at: aStringClass asSymbol)
Here, you can see that a parameter is present in phratchItem: this parameter is a String. So, we have a block that open a browser on a class that you can parametrize. The default value is ‘Collection’. You can change it by an existing class.
In Phratch environment, click on this new block, you will see a browser on Collection.
All types are declared in the class PhratchType.
Each type is declared with the pragma <phratchType: #’’>. You can browse these methods to see existing types.
6- Kind of blocks
A block can have multiple forms. In our examples, we manipulated the CommandBlockMorph. It exists multiple ones. You can see them as subclasses of BlockMorph.
The main ones are CommandBlockMorph that executes a command, ReporterBlockMorph that returns a value, BooleanBlockMorph that returns a boolean.
I stopped this tutorial here. It is enough to write simple blocks in Phratch. You can discover kinds of block or types by right-clicking on an existing block of the system, then ‘show block’ in the menu. You will see the method and particularly the associated pragma.