GSoC 2016 – Soletta Project

 dev  Comments Off on GSoC 2016 – Soletta Project
Sep 092016
 

Soletta Project was accepted as a mentoring organization for Google Summer of Code 2016!

Not only we were accepted as also we received lots of cool proposals from students and 3 slots.

It was my first time as an org admin. I’ve participated before as mentor and as student (a long time ago). And it was amazing. Most Soletta developers got excited with our acceptance and step’ed up as possible mentors and contributed nice ideas to our pool.

We had 5 or 6 really good proposals and some contributions to the project before proposals selection. We’ve chosen the following proposals / students:

  • Go binding, by Vladimir Cernov. He was mentored by Flavio Ceolin and Caio Marcelo.
  • Lightweight Machine-to-Machine (LWM2M) protocol implementation, by Bruno Melo. He was mentored by Guilherme Iscaro.
  • Autocomplete for Soletta-Dev-App (the web IDE), by Kamidi Preetham, mentored by Bruno Bottazzini.

Detailed proposals may be found here.

All of them performed well, delivering everything on time, participating in the community, helping with reviews and bug fixes. All the work was reviewed and merged. I hope they enjoyed this opportunity as much as we did and learned a bit about open source software development.

I would like to thank everybody involved and to congratulate the students for the nice job.

Soletta Project v1

 dev  Comments Off on Soletta Project v1
Jul 222016
 

Soletta (TM) Project finally had its V1 release announced this week.

I’ve been working in this project for almost an year now and I’m very excited with all we got so far.

Soletta Project is a framework for making IoT devices. From day zero it was designed to be used by developers without an embedded systems background. So web developers and smartphone app developers would be able to get IoT products out there more easily. In order to accomplish this goal, we packed all the low level stuff in components that could be just re-used, be it via C API or as nodes in a flow based programming layer. And it works fine on top of the most relevant OSes used for IoT: Linux, Zephyr (TM) Project, RIOT OS, and Contiki.

Between the major features for this first stable release I could highlight:

  • Communication protocols (HTTP, OIC, MQTT, LWMWM and CoAP)
  • Input / Output (GPIO, AIO, I2C, SPI, UART, PWM and IIO)
  • Services and system update
  • Flow based programming layer

Full release note can be seen here.

There are also two side projects that totally worth to be checked too. A machine learning component, focused on client side AI and a web-based IDE for flow based programming. They’re both on experimental stage but seem promising.

50-50 IoT Hackathon na Unicamp

 presentations  Comments Off on 50-50 IoT Hackathon na Unicamp
May 232016
 

No dia 14 de Maio de 2016 tivemos a oportunidade de realizar um workshop / hackathon de projetos para a Internet das Coisas utilizando o framework Soletta na Unicamp junto ao grupo Computing 4 All.

Em busca de maior inclusão de gênero, @s participantes do evento precisariam ser compostos por ao menos 50% de gênero feminino, objetivo alcançado graças ao empenho da professora Dra. Juliana Borin e outras participantes do grupo. Também fizemos algumas escolhas para a condução do evento que poderiam contribuir após lermos alguns posts, especialmente um sobre hackathons realizados pelo time do Spotify.

Com o iminente release V1 do projeto, este evento nos deu a oportunidade de ver quão perto chegamos do objetivo de ter protótipos de um produtos para a Internet das Coisas em poucas horas. Foram utilizadas placas Intel® Galileo Gen 2 e componentes do Grove Kit, entre outros. Além de desenvolvedores do Soletta, que contribuiram com pequenas apresentações e tirando dúvidas, também estiveram presentes alguns designers do Intel-OTC acompanhando a experiencia dos usuários.

Com duração de 4 horas, naturalmente os participantes não chegaram a protótipos muito complexos. Porém foi tempo suficiente para conseguirem fazer a montagem e programação de projetos que fizessem uso de I/O (botões, sensores) e alguma exposição de dados via HTTP. Além de um feedback positivo, também conseguimos identificar alguns pontos de dificuldades que serão tratados antes do primeiro release do Soletta.

Soletta na Latinoware 2015

 presentations  Comments Off on Soletta na Latinoware 2015
Nov 102015
 

O projeto Soletta foi apresentado na conferencia Latinoware, que ocorreu entre os dias 14 e 16 de outubro, em Foz do Iguaçu.

Durante os 3 dias do evento, junto ao colega Leandro Dorileo, tivemos a oportunidade de fazer inúmeras apresentações a respeito de vários aspectos e possíveis usos do Soletta, tanto no espaço de exposição reservado a Intel quanto no espaço de robótica. Dezenas de desenvolvedores e estudantes conversaram conosco e puderam testar desenvolver pequenos projetos utilizando a placa Intel® Edison e componentes do Grove Kit.

 

 

 

Para os interessados, os slides de algumas dessas apresentações podem ser vistos abaixo e baixados na página de apresentações da organização.

 


Jan 212013
 

After a few years writing Edje themes and leading teams doing such task, I’ve faced some errors and I’m going to list them and explain how to start to debug it with a specific tool: edje_player.

General explanations

Edje is the graphical design library, part of the Enlightenment Foundation Libraries. Themes are written as plain texts following the Edje Data Collections syntax and compiled with the program edje_cc. Later, it can be used by any program using Edje API.

Communication between code and theme is done via signals and messages. Signals are composed by two strings, source and signal and can be listened or emitted by a program block in the theme without the need of scripts. Messages can be more complex, can be a float, an integer, a string, an array of these types or a composition, like a string + a float, for example. Also, messages have identifier number. But to handle messages, the theme needs scripts.

So it is a bit error prone regarding typos, since it wouldn’t be checked in compile time (this issue can be reduced with the recently added codegen). Also, many other issues can happen, like a part not appearing where you expected, or a transition that doesn’t seem to be triggered.

Edje Player, more than just a tool used to visualize the theme, can be used to debug it. Between many options, the more relevant are:

  • -g –group : an edc file can have many groups, so if you want to load a group different from “main”, or from the first group of the collection, it should be used. E.g.: edje_player -g groupname file.edc. If you can’t remember the group name, groups can be listed with “–list-groups” option.
  • -Z –size : will try to set a specific size, but minimum sizes will be respected. If not set it will try a default size (that also will respect theme minimum size). E.g.: edje_player -Z 500×500 file.edc
  • -p –print : used to print signals and messages emitted by the theme to stdout. E.g.: edje_player -p file.edc
  • -S –slave-mode : really useful mode that will make edje player listen for commands on stdin. E.g.: edje_player -S file.edc. Main commands:
    • help: list all possible commands
    • signal <emission> <source> : send a signal to edje. If whitespaces are required the string should use double quotes. E.g.: signal “play next” player
    • message <id> <type> <args list>: sends a message to edje. It supports all message types, and args list can vary depending on them, so check the list with help. E.g.: message 2 Float 0.4

Troubleshooting

Usually when facing the following issues, an inexperienced developer tends to waste a lot of time digging into themes code just to get to the conclusion that it was an error in the program code, or make many changes to the program code to trigger the issue more easily or to print debugging information, like adding callbacks to signal “*” “*” of some objects.

So, as a first step, it’s required to check if it’s an issue on the theme or the program code, and I’m providing some suggestions of how to validate the theme using edje_player in many cases.

A general advice: check for typos in signals / sources and part names (for the case of swallows). To prevent it if used in more than one place, you could define a constant.

Animation to be tested is hard to trigger

Suppose you need to test / debug an animation that is triggered only after many interactions in your software, or it only happens after a long task. If the theme program that starts it listens for a signal or message, you can send it using Edje Player slave mode and save a lot of time. If the program is called by others using the after command or via script, you can add a signal there just for debugging purposes (or call the parent program of the whole chain).

Part with apparently wrong geometry

Using the info command of slave mode it will return the geometry of the part.
E.g.: info bg => INFO: “bg” 0,0,512,380

These four values are x and y coords, width and height of the part named “bg”.

If you receives the expected size, but yet theme looks wrong, and if the part is a swallow or text, many issues can be happening, like the swallowed object having a problem instead of the theme. In this case, you can change its type for a rectangle just to validate the part sizing.

Transition triggered by signal doesn’t play

If a transition that should be triggered by a signal doesn’t play, first thing to check is if it is an issue with the transition itself or it is the signal not being emitted by the code. For that, just use the signal command of the slave mode. If the transition plays, you know the theme is fine, you should look for a typo on signal emission on program code or check if it’s not being emitted at all.

Transition triggered by message doesn’t play

The same approach as transition triggered by signal should be used, but here, instead of typos on signal / source, you need to assure the message id and type are correct (or any other checks you are doing in your script). Using the message command of the slave mode is enough for an initial investigation.

Callback of signal or message isn’t called

To check if a theme is emitting a signal or message, you can run edje_player with -p argument. In this case, all the emitted signals and messages will be printed to stdout. If the emission you are looking for is done after a user interaction like clicking a part, dragging, mouse over, etc., just do it and you should read it in your terminal.

If the theme should emit it after a signal or message emitted by the program code, you should run edje player with -p and -S arguments, so it will also run in slave mode. For signals, use signal command, for messages, message command.

If you can see the signal / message emitted by the theme in your terminal, the theme is validated. You should check for:

  • typos of signal / message
  • callback added to the wrong object
  • code that adds the callback isn’t even called.
  • callbacks are deleted before signal / message emission.

Script variables debugging

Embryo scripts run in a sandbox, you can’t print to terminal directly to see a variable value. An easy way to check these values is to send signals or messages with the variables to be checked and run edje player with -p argument, so they will be print to stdout. With that you can inspect integer, string or float variables.

Signals are sent in embryo with emit(signal, source) and messages are sent in embryo with send_message(type, id, values list). For a full list of supported functions by embryo script, check the following files:

  • INSTALL_PREFIX/share/edje/include/edje.inc
  • INSTALL_PREFIX/share/embryo/include/default.inc

Example

A simple example of a theme that shows a background with a message to the user explaining it will emit a signal back when it receives ‘hello’ from source ‘player’:


/* Simple EDC exemplifying how to receive and emit signals */

collections {
   group {
      name: "main";

      parts {
         part {
            name: "bg";
            type: RECT;
            mouse_events: 0;
            description {
               state: "default" 0.0;
               min: 500 50;
               max: 500 50;
               color: 0 0 0 255;
            }
         }

         part {
            name: "text";
            type: TEXT;
            mouse_events: 1;
            description {
               state: "default" 0.0;
               color: 255 255 255 255;
               text {
                  font: "Sans";
                  size: 20;
                  text: "I will reply to the signal 'hello' 'player'";
               }
            }
         }
      }

      programs {
         program {
            name: "reply";
            signal: "hello";
            source: "player";
            action: SIGNAL_EMIT "hi" "theme";
         }
      }
   }
}

It should be compiled and played:

edje_cc signals.edc
edje_player -p -S signals.edj

It will start sending some signals by default to the theme. After that, you can move the mouse cursor over the text. It will emit signals related to mouse movement. It will print in output:

SIGNAL: "mouse,in" "text"
SIGNAL: "mouse,move" "text"
SIGNAL: "mouse,move" "text"
SIGNAL: "mouse,out" "text"

This kind of signals are not emitted when the cursor moves over the background because the “bg” part was set to not handle it with “mouse_events: 0”.

To emit the ‘hello’ signal, just type:

signal hello player

and you’ll see the following output:

SIGNAL: "hello" "player"
SIGNAL: "hi" "theme"

signals_edj

Dec 142012
 

Michael Blumenkrantz, the very acclaimed e17 release manager, and I have been working on Etrophy, and it’s ready for a 0.5 release.

Etrophy is a library that manages scores, trophies and unlockables. It will store them and provide views to display them. It could be used by games based on EFL and any other application where such a thing could make sense.

It’s already in use by Escape From Booty Bay, Econcentration and Echo. And who knows what else is coming ?

Etrophy can be checked out from E Project’s svn repository:

$ svn co http://svn.enlightenment.org/svn/e/trunk/PROTO/etrophy

or downloaded in release tarball form.

Online documentation isn’t in E server yet, but can be accessed here.

There are still a lot of tasks to be concluded before the 1.0 release, including adding a remote backend, adding more views, creating some examples and improving  docs. Since we are developing it mostly in our free time, between many other projects, anyone willing to help to speed up things a bit will be very, very welcome.

Nov 262012
 

EPhysics has been vastly improved since it reached E project’s repository, a few months ago. Most of the road map was implemented, including the release of a game based on it, Escape From Booty Bay. It means EPhysics now support soft bodies and cloths, uses threads, works with the concept of Camera, has helpers to make it easier to use, has a sandbox tool to test scenes without coding and even supports 3D scenes somehow. Details are presented below with screenshots and video.

3D scenes

Perspective: Applying perspective to the camera allows developers to create more realistic scenes, setting the “infinite distance” point and focal distance.

Light: It’s possible to set an environment light and a light point, that can be moved around. Light colors can be changed as well, producing really interesting effects. Bodies that should be affected by light can be configured by the user.

It is simple, having some limitations worth mentioning: it doesn’t support light absorption, refraction or reflection and bodies don’t make shadows over  others.

Primitive types faces: Instead of just setting an Evas Object to each body, support to setting objects for each face of the primitive types was implemented.  So you can have different objects in each one of the six faces of a cube.

Soft Body

A soft body will deform when colliding with other bodies and when suffering specific types of impulse, handling with its mesh. Its hardness and bending constraints can be set to simulate different materials.

Have you always wanted to have a soft button in your software interface that deforms depending where the user press it ?

OK, now it’s possible.

Cloth

A cloth is a kind of deformable open mesh. It can be used to make objects act like pages or flags.

Sandbox

Sandbox is a tool to make it possible to test how bodies will interact under specific conditions. So it’s possible to modify world and bodies attributes  easily, set velocities, apply impulses, forces and see how they interact without a single line of code. Sometimes fine tuning physics scenes is harder, and  tools like that should avoid time spent in many “small code changes, build and test” cycles.

Marina Proni helped designing this tool, and she has posted about its development under a designer point of view. Article in Brazilian Portuguese.

Camera

A camera defines the region of the physics world that will be rendered on the canvas. It sets the point of view. Can be set to follow a specific body or apply  custom perspective.

More

Many helpers were added, so instead of setting body’s mass, for example, it’s possible to set its density, or even its material, so properties like density,  restitution and friction will be set considering default values. Many default values are exposed as well to make developers life easier.

Documentation was heavily improved, with the entire API covered, and many explained examples. A nightly build is now accessible on Enlightenment project site.

Future

We are currently focusing on make its API stable to be released in 1.8 cycle, fixing bugs, and discussing a proposal to support physics on Edje in e-devel  mails list.

p.s.: This post is dedicated to David Seikel, always following the development of EPhysics.

Sep 112012
 

Escape From Booty Bay (efbb) is the newest game made using the Enlightenment Foundation Libraries. It’s a physics puzzle game in which players operate a cannon to stop pirates escaping from the prison. As players advance through the game levels, difficulty increases and new challenges are placed, like firing against moving targets.

The main goal of this game is to test and demonstrate the usage of EPhysics. EPhysics is a library that integrates the EFL and Bullet Physics. More details can be found at this post.

I’ve being working on this game here at ProFUSION with Ricardo de Almeida Gonzaga (software developer) and Marina Proni (designer), while Leandro Dorileo and I continued the development of EPhysics, adding new features and fixing bugs. Great job, team!

Its initial version reached SVN last week, and can be checked out with:

svn co http://svn.enlightenment.org/svn/e/trunk/GAMES/efbb

Building instructions are on the INSTALL file.

In case of doubts, #edevelop at Freenode is a good place to ask.

Bug reports, patches and new levels are very welcome.

Participação no FISL 13

 presentations  Comments Off on Participação no FISL 13
Jul 312012
 

Durante a última semana, dos dias 25 a 28 de Julho, participei da 13a edição do Fórum Internacional do Software Livre – FISL 13 . Além de dar uma palestra no dia 26, fiquei no estande da ProFUSION Embedded Systems, que foi uma das patrocinadoras do evento.

No estande apresentamos alguns projetos desenvolvidos na empresa nos últimos 2 anos, como o software para o refrigerador Infinity I-Kitchen da Electrolux, o sistema de entretenimento de aviões da Zodiac, e o browser Endeavour, projeto nosso que conta com o apoio da FINEP. Todos são baseados nas Enlightenment Foundation Libraries, rodam em cima de Linux e do X11. O último utiliza ainda o port EFL do WebKit, para o qual tanto contribuimos. Durante estes quatro dias muitas pessoas passaram por nosso booth: desenvolvedores, membros das comunidades de software livre, estudantes, curiosos no geral, e inclusive alguns colegas que não via há algum tempo. Havia um grande interesse pelo que a empresa vem fazendo, sua relação com o software livre, e claro, pelos brindes.

Considero que a parte mais interessante de eventos como este é a possibilidade de se encontrar e ter conversas mais longas com desenvolvedores de outros projetos e outras empresas. Conheci algumas pessoas do INDT, conversei com desenvolvedores da Intel, da Red Hat e da Globo.com, além de membros da comunidade do KDE. Conversas sobre formas de contribuir para os projetos de software livre e como conquistar mais desenvolvedores foram frequentes.

Na palestra que dei, chamada “Linux na Geladeira”, utilizei um dos nossos projetos como caso de uso para explicar um pouco sobre desenvolvimento para embarcados e também para discutir formas de contribuir para projetos de software livre mesmo quando se é contratado para desenvolver um software proprietário. Algumas boas práticas de relacionamento com as comunidades foram apresentadas, além de dicas sobre como escolher as camadas onde se deve adicionar funcionalidades, mantendo parte do software desenvolvido com licença livre, permitindo assim seu reuso por todos.

Os slides da apresentação podem ser vistos abaixo ou baixados.

Segundo o site do FISL, o evento contou com a participação de mais de 7000 pessoas, vindas de todos os cantos do mundo e com os mais diversos interesses. Procurei assistir algumas palestras mais técnicas, porém mesmo neste aspecto o evento é muito plural, sendo que várias palestras que tocavam mais aspectos administrativos, legais e mesmo filosóficos foram apresentadas por pessoas muito relevantes nestas áreas.

Jun 262012
 

EPhysics, a fresh new library is reaching Enlightenment project’s SVN repository today. It’s a wrapper between Bullet Physics and EFL to add physics effects in a simple way.

It’s possible to checkout it from our SVN repository:

svn co http://svn.enlightenment.org/svn/e/trunk/ephysics

The video covers the tests that are included in our source code, as one can see the code is pretty simple to an EFL programmer and we expect them to adopt EPhysics to create their next splash screen, transition effects and even more games!

Why Bullet Physics?

Bullet Physics is a very well established physics engine. It’s stable, fast and simple to use, licensed under a permissive license and packaged for most distributions. It’s used by many big companies for games and movies such as Sony, Disney, Activision and Rockstar Games.

How is it structured?

It’s possible to create a World and add many Bodies, that can be represented by Evas Objects. These bodies have physical attributes such as mass, friction and restitution and shape. They may receive impulses and collide between them. Events occur when something happens, as a body moving, two bodies colliding, or the entire world getting halted (all the bodies stopped). The following diagram should help to make it all a bit clearer.

Everything is documented using doxygen, so you can build documentation with:

$ make doc

or access it online here. It’s just a temporary place until it reaches our project’s server.

And much more is coming. On our roadmap we have:

  • Create collision shapes from image;
  • Helpers to help the physics inexperienced people to define attributes and use it;
  • Sandbox tools to try different materials / properties in a live, what-you-see-is-what-you-get way;
  • Deform objects;
  • Adding camera concept (POV);
  • Creating a game

A more extensive list can be found at TODO file. Adding support to physics effects on Edje is planned as well, making it possible to configure physics environment and reacting to events.

So if you liked that, give it a try. I’ll be glad to help. Bug reports, reviews, feature requests and patches are very welcome. I’ll try to post a tutorial on creating applications with EPhysics soon.