Monday, September 26, 2016 at JavaOne 2016 - few words framework has been selected for JavaOne4Kids part. autor (@miragemiko) and the main commiter to the project has also attended many talks about robotics, Internet of Things and future inotvations, similar to the different discussion about Java 9 fugure. He also participated at Java Community Process and Java Hub at JavaOne 2016. 

  Out of all JavaOne 2016 experiences have crystallised and confirmed the future directions of framework development. Although this post is not fully focused on the details we can separate those direction in following groups: 
1. Reactive framework (platform)
    robo4j has been since the beginning designed a the non-blocking platform for highly concurrent tasks/events that needs to under the certain conditions synchronised and processed.
2. Microservices design 
   robo4j has been divided into the fully independent units. Those units are accepting/providing connection with the rest of the world using specific protocols. Units are distributed over the ecosystem and they are fully independent.
3. Machine-learning and big data
  robo4j provides sockets to plug different types of data storages and algorithms that are later used as the inputs/outputs for internal or external actions. 

 We do pay special attention on those three mentioned points. Why ? framwork intents to be the framework that fully hightly supports distributed systems. Such point is becoming to be crucial in the upcoming age of Internet Of Things, Clouds etc. 

   All of three mentioned points are representing a lot of work and touched framework continual evolution that need to be done to achieve the expecting goal.

   ...And as the CERN is taking a care about small things, Let's move the robo4j forward
to the next milestone!!

Sunday, September 11, 2016

Robo4j Design Sketch

Following design sketch should draw out the core ideas how the Robo4j framework is internally designed and what to expect. The ability of any Image  to carry much bigger mass of information than written text is fully appreciated here. 
  Robo4j Framework is meant to be fully agent system. Every agent has ability to interact with any other agent over appropriate interfaces. Every agent can create his own decision which is then transmitted to the Robo4j core message bus. 
  Robo4j Message Bus represents the abstraction of the communication line with underlying core system logic. Core logic is then executed on real hardware which represent the robot to the outside word.  
  Robo4j provides direct IO Socket based communication line which allows user to interact with the Robo4j System. Every external user action is then transmitted to the system core, analysed and presented as the Robo4j Event (Reaction). Robo4j provides also various connector with different data storages.
  In general Robo4j is Agent and Event based system which synchronises asynchronously incoming events.

Wednesday, September 7, 2016

Robo4j Officially at JavaOne, JavaOne4Kids :: we will create the future

  Robo4j will introduce and present its simplicity at JavaOne4Kids (not Only for Kids ;) as the part of JavaOne conference.
We have reserved 2 hours slot full of fun. We in those two amazing hours we will assemble the robot and write different programs. 
Robo4j will make robot alive. 
  See you there! Robo4j is looking forward for you!
JavaOne4Kids agenda 

Thursday, August 11, 2016

Robo4j Brick Client Update : new SETUP service

  Before JavaOne 2016 conference there will be available new release, but currently development focus is on properly and easy to use working usage of Robo4j. 
  Robo4j Client module is basically based on agents. One of those agent is responsible for the system configuration. 
  On the Lego Brick is running Robo4j Client Module as the program executed inside the LejOS container. The new SETUP service can is available over the web browser by requesting link:


  By calling this service the agent responsible for the Brick configuration (configuraiton agent) broadcast the brick setup to the agent responsible for the web page generation (web agent).  Web agent is calling internal services to properly generate simple view as an HTML output. For the HTML output is used Robo4j templating service.

  User has any time an overview how the Robot was created.
This service is intended to allow in the future full dynamic system reconfiguration.

Stay Tuned! 

Tuesday, August 9, 2016

JavaOne4Kids and JavaOne :: Robo4j will be there proudly announces that it takes a 2 hours long slot at JavaOne4Kids as part of JavaOne conference. It's great step for the robotics framework to prove its simplicit in building robotic system. 
  The framework currently offers for Lego EV3 the RESTlike API and RMI API. Those APIs allow to access Lego EV3 Brick hardware which will be the core of the Robot. But such functionality is not all what Robo4j framework offers. 
  Beside the APIs Robo4j allows to the connection with Graph Database Neo4j and other databases are coming to be supported soon, such as SQL, NoSQL and etc.
  The Robo4j team is currently working on session details. The main goal is to introduce framework as the solid upcoming fully capable framework for Internet Of Things like systems develoment. 

Stay tuned! 
Miro  (@miragemiko)

Thursday, July 28, 2016

Robo4j and upcoming Neo4j connector, and why neo4j is the first

   Recently project got couple of new modules. One of them is the 1st database module.  It's the connector with Neo4j database. None of those modules is currently available on github due to lack of time and ongoing development process. 
 But here are few fact about  the new robo4j-neo4j module. Example of the robot data visualization is on the picture above. 

1. The Green points represent the limits of the space where the robot is currently located. 
2. The Blue point is the Start Robot location which is inside the defined space.  
3. The Yellow points represent the Robot movements, more precisely, the command which have been processed by the robot. 

each colored point has its assignment and relation to another one. On the images there are visible three relations: 
1. DIST represents the relation between the limit point. Limit points are created by the sonic sensor.
2. START represents the relation between limit point and refers the starting location of the robot
3. COMMAND refers to the type of command then has neeb processed inside the robot space (inside Green area)

   As all around the robot can be scanned by sensors the Neo4j database will play the significant role in next step decision making. Let's see in of the next post how finding the shortest path performs.
Stay tuned!

Wednesday, July 13, 2016

Robo4j updatelog: 201607132242 - from command to Consumers and Producers


  Robo4j framework has received new major update of the core logic and architecture. The small first taste has been already mention in previous blog post as simple sketch. The sketch has pictured the relation between RoboUnits and RobotAgents. In simplified written words the RoboUnit contains the number of agents. Those agents are interacting between each other and providing the result of the RoboUnit according to its assignment.  
  Let's focused little bit on RoboAgents. RoboAgents behaviour can be simplified as the relation between Producers and Consumers. 
  The Producers are basically providing result of the external inputs to the Consumers. External Producers inputs can be defined by Sensors or the result of the external computation/process. 
  On the other-hand Consumers are applying desired logic on such inputs. Consumers are allowed to use bounded resources, which are provided to the RoboUnit. 

   Current Robo4j framework release contains 1st simple example of RoboUnit implementation by implementing Robo Front-Hand. The front-hand unit is located in the front part of the robot and it's able to carry small things. 
  The Robo Front-hand consists from one engine and one touch sensor. This is enough to employ Producer Consumer scenario where the sensors provides appropriate data to the consumer which is represented by the engine. 
@RoboUnit(value = FrontHandUnit.UNIT_NAME,
        system = FrontHandUnit.SYSTEM_NAME,
        producer= FrontHandUnit.PRODUCER_NAME,
        consumer= FrontHandUnit.CONSUMER_NAME)
public class FrontHandUnit extends DefaultUnit implements LegoUnit {
    /* all connected pars  */
    private static final int CONNECTED_ELEMENTS = 2;
    private static final int DEFAULT_SPEED = 300;
    private static final int AGENT_POSITION = 0;
    static final String UNIT_NAME = "frontHandUnit";
    static final String SYSTEM_NAME = "legoBrick1";
    static final String PRODUCER_NAME = "frontHandSensor";
    static final String CONSUMER_NAME = "frontHand";

    public LegoUnit init(...

                    new FrontHandTouchProducer(exchanger, sensorCache.entrySet()
                            .filter(sensorEntry -> sensorEntry.getValue()
                            .map(legoSensor -> 
                            .reduce(null, (e1, e2) > e2)),

                    new FrontHandEngineConsumer(exchanger,  engineCache.entrySet()
                            .filter(entry -> entry.getValue()
                            .map(legoEngine -> 
                                  legoEngine.getPort(), DEFAULT_SPEED))
                            .reduce(null, (e1, e2) > e2))));
    @SuppressWarnings(value = "unchecked")
    public boolean process(RoboUnitCommand command){

            return false;

        ProcessAgent processAgent = (ProcessAgent) agents.get(AGENT_POSITION);
        return processAgent.process(command, (cm) -> {
            final FrontHandCommandEnum commandEnum = (FrontHandCommandEnum)cm;
            return logic.get(commandEnum).apply(processAgent);

    @SuppressWarnings(value = "unchecked")
    protected Map<RoboUnitCommand, Function<ProcessAgent, AgentStatus > > initLogic(){
        final Map<RoboUnitCommand, Function<ProcessAgent, AgentStatus > > result = new HashMap< >();
        result.put(FrontHandCommandEnum.COMMAND, (ProcessAgent agent) -> {
            agent.getExecutor().execute((Runnable) agent.getProducer());
            final Future<Boolean> engineActive = 
                    .submit((Callable<Boolean>) agent.getConsumer());
            try {
            } catch (InterruptedException | ConcurrentModificationException 
                  | ExecutionException e) {
                      throw new 
                        FrontHandException("SOMETHING ERROR CYCLE COMMAND= ", e);
            return new AgentStatus<String>(AgentStatusEnum.ACTIVE);

        result.put(FrontHandCommandEnum.EXIT, (ProcessAgent agent) -> {
            FrontHandEngineConsumer consumer = (FrontHandEngineConsumer) 
            FrontHandTouchProducer producer = (FrontHandTouchProducer) 
            try {
            } catch (RemoteException e) {
                throw new FrontHandException("RUN ERROR PROCESS: ", e);
            return new AgentStatus<String>(AgentStatusEnum.OFFLINE);
        return Collections.unmodifiableMap(result);

  Following code has shown that RoboUnit consist from two agents one Producer and one Consumer. Producer is represented by TouchSensor and Consumer by Engine. The RoboUnit does accept two commands from outside as the input -> COMMAND and EXIT. 

 The following RoboUnit implementation allows Robo4j-Brick-Client to accept following POST request
  "commands" : [
    {"name" : "hand",
     "target" : "hand_unit",
     "value" : "command"}

And this is not all we can add additional properties to the command as following example 
  "commands" : [
    {"name" : "hand",
     "target" : "hand_unit",
     "value" : "command"},
     {"name" : "move",
     "target" : "platform",
     "value" : "20",
     "speed" : "400"
...but more in the upcoming posts... 
Stay tuned!!!


Thursday, June 30, 2016

RoboUnit, RoboAgent implementation log

   These days is so much happening in robo4j project. The easies way how to express the most of changes is the attached image. Although robo4j system S has been already able partially reconfigure itself upcoming implementation offers massive improvements. 
  Stay tuned !

Monday, June 27, 2016

Robo4j-Joystick demo update

   Together with robo4j-joystick demo, the update is coming of the main package is coming  too.  All main package changes are focused on improving the robo4j system configuration procedures, exception handling and agents. In the case of main package there will be soon published much more, including blog post.
  The robo4j-Joystick demo got improved the JavaFx UI interface with exception handling and information publishing. The communication between robot has be also improved. 
  The current demo version provides the information about the robot connection state. The Button provides two different states: Connect, Close. The Information about the connection procedure success is displayed aside in the connection label.

Have a fun and Stay tuned!

Thursday, June 23, 2016

1st Robo4j Demo is coming :: first taste of JavaFx Joystick

  Few days ago I've mentioned an Idea of having Robo4j JavaFx Joystick to my friend  @eppnikos . At that time he was seriously investigating JavaFx features. He completely open to take the challenge. 
  After few days he come up with base of Robo4j Java FX Joystick. I've connected the JavaFx app with Robo4j and pretty cool demo is born.

  What is Robo4j JavaFx Joystick ? 
  It's JavaFx application using library for connection with robot. JavaFX app is generating events. Those events are handled by one of Robo4j agent which communicates with another internal agents.... 
More detailed post will be released soon.

  Stay tuned and enjoy video!
Robo4j is alive! May the force be with it! 

Sunday, June 19, 2016

Robo4j brick-client POST request using JSON arrays

   The 1st robo4j brick-client POST request version has been using JSON field "command". There was not  implemented support for JSON Arrays. Old POST command has also any type of response. The robo4j socket has been only closed.
$curl -H "Content-Type: application/json" -X 
POST -d '{"command" : "right=10;left=10;back=20;move=50"}' http://:8022
   Robo4j alfa-0.2 release introduces POST request with JSON Arrays support. The new array field has name "commands". 
$curl -H "Content-Type: application/json" -X POST -d '{"commands" : 
       [{"name" : "move", "value" : "20"},
        {"name" : "back", "value" : "20"}
       ]}' http://:8022
  The new POST request also provides the simple response. The response consists from the HTTP header and text message:
No Information about POST
   The new support of JSON Arrays will allow in upcoming future much better integration with 3rd party technologies.  

@miragemiko has written the short blog post with attached video. The video shows the stability of the robo4j-brick-client.

Saturday, June 18, 2016

Robo4j brick-client socket server update

  Robo4j framework has released update of its light-weight socket server. Update contains possibility to use cURL to command the robot directly. 
$curl  -X GET  http://:8022?move=30\&left=10\&right=10\&back=20
The internal socket server is planned to run fully asynchronously. The result is printed out after being processed with the result state. In case of mentioned command the following output is printed directly into the command line:
Robo4j Client success page    
<H1>Robo4j Client default success page</H1>
<p>    Robo4j Command has been successfully processed!<BR>    Congratulation</p><p>    command= [ClientRequestDTO{type=RequestCommandEnum{code=1, name='move'}, value='30'}, ClientRequestDTO{type=RequestCommandEnum{code=3, name='left'}, value='10'}, ClientRequestDTO{type=RequestCommandEnum{code=2, name='right'}, value='10'}, ClientRequestDTO{type=RequestCommandEnum{code=4, name='back'}, value='20'}]</p>
When robot status is required following command is used:
$curl  -X GET
Robot answers through the command line in the following form:
Robo4j Client status page    
<H1>Robo4j Client default status page</H1>
<p>    Robo4j Core agent status successfully generated!<BR>
<p>    CACHE= [AgentStatus{status=AgentStatusEnum{code=1, def='active'}, messages=[]}, AgentStatus{status=AgentStatusEnum{code=4, def='request_get'}, messages=[[ClientRequestDTO{type=RequestCommandEnum{code=1, name='move'}, value='30'}, ClientRequestDTO{type=RequestCommandEnum{code=3, name='left'}, value='10'}, ClientRequestDTO{type=RequestCommandEnum{code=2, name='right'}, value='10'}, ClientRequestDTO{type=RequestCommandEnum{code=4, name='back'}, value='20'}]]}]</p>

   The small update contains also code changes according to the way how the incoming events/tasks are being processed.
Enjoy and more is coming soon!

Wednesday, June 15, 2016 alfa-0.2 release - documentation : part2

  This post is the second extension to the previous documentation post part1. Previously has been shown how to instruct the robot by commands over HTTP connection by using POST, GET  request types.  
$curl  -X GET  http://brick_ip:8022?left=10\&right=10
$curl -H "Content-Type: application/json" -X 
POST -d '{"command" : "right=10;left=10"}' http://brick_ip:8022
  The following post will explain and introduce another services which are available in current robo4j alfa-0.2 release. Those services are provided by the robo4j-brick-client light-weight socket server. 
  The socket server is responsible for handling HTTP requests. It is open on the port 8022. The running services also provide access to the robo4j AGENT. This agentis running on the brick. This specific AGENT implementation is currently responsible for cashing processed command requests. You can access it by using cURL or simply your favorite web browser.
  The robo4j-brick-client returns its current state with information which commands have been received. 
  The next service provided by GET request is, already mentioned, command request. After the command has been send the robot will generate following response

Such response provides information about command process state. 
   The last service which is touch in this post is the EXIT service .
By sending exit request to the robot the exit response is generated.
The response is generated after all Executors are stopped and application process is ready to finish.
Have a great day! 
Stay tuned and enjoy all news.

Tuesday, June 14, 2016 alfa-0.2 release - documentation : part1

   The Robo4j alfa-0.2 release is another big step for Robo4.j framework. It contains 1st version of robo4-brick-client. 
   The Robo4j brick-client is standalone module which uses native robot hardware. The module contains also stand alone server which is able to communicate with rest the of the word.    The communication with the robo4j-brick-client uses JSON lightweight data-interchange format. The current implementation allows to send basic robot platform orient commands. 
Such commands allow to process simple movements (move, back, right, left) with the Robo4j Alfa Robot unit
   Before you can use the build-in features of the robo4j-brick-client you need to run application itself directly on the Levo EV3 brick. It means that client needs to becompiled as fatJar and uploaded on the brick by busing, for example, the following command:
$scp ./Robo4jBrick.jar brick_user@brick_ip:/home/root/lejos/samples
example of accessing Robo4j brick-client from command-line using cURL:
$curl  -X GET  http://brick_ip:8022?left=10\&right=10
Before we go little more into the details it's worthwhile to mention that POST service is also available.
The POST request will be in future preferred over the SSL communication layer.
$curl -H "Content-Type: application/json" -X 
POST -d '{"command" : "right=10;left=10"}' http://brick_ip:8022

  You've seen the main visible change in alfa-0.2 release. But it's not everything, the robot hardware specific apart has been move to the package robo4j-lego module and robo4j Agent structure has been improved. 
  Robo4j alfa-0.2 also comes up with robo4j-commons which is the set of commonly used utils and features across the whole Robo4j project.
  Last visible improvement it Robo4j template engine PageParser. This engine is currently responsible for generation robo4j-line help and robo4j-brick-client web pages.
Videos and more is coming 
Stay tuned!


Monday, June 13, 2016

Braking news: Robo4j supported by JetBrains

  Yesterday has proudly announced new alfa-0.2 release. 
  Today Robo4j proudly announces that framework has been added on the list of JetBrains supported Open-Source projects. Today Robo4j has become, officially ! 

JetBrains supported Open-Source project
Thank you JetBrains!

Sunday, June 12, 2016

Robo4j alfa-0.2 release is successfully OUT !

  Robo4j proudly announces successful alfa-0.2 release. The release is already available over the GitHub account but documentation is not ready at this moment. 
  The documentation with all new features will be published in next days. is also preparing some new videos.
  Stay tuned! 

Tuesday, June 7, 2016

Command-line Interface

   Robo4j framework currently offers the command-line interface. The command-line interface allows you to create your own commands and process them. Following post should get you little closer. To exit any of sections it's enough to type "exit" key word. 
   At the beginning (after start) is displayed set of options: 

------------------------------------- command-line interface info

options numbers:

1. show help
2. available commands
3. save new command
4. run command-line
5. exit

   Let's go through the possibilities step by step
  •  "show help" :: allows you to any time review how interface works 
------------------------------------ command-line module is designed for full interaction with the robot.
It allows you to use Active, Basic, Complex commands
to controll Alfa robot.
Every command-line section contains its own help to properly inform user how to interact within.

Options summary:
2. Available commands
The table contains the command name and robot command the will be processed after command has been typed.

|   name       |  consist of commands              |
|   basic42    |  move(10),back(10)                |

3. Save command
Save specific command by using predefined prefix.
a) Basic command    ->  B:
b) Complex command  ->  C:

example: {"type" : "B", "name" : "magic22", "content" : "move(22),right(360),back(33)" }

4. Run Robo4j Command line
Usage of prexes allows you to send specific command to the Robot
a) A: - Active command :: usage A:move available option
   A: (move,back,left,right)
b) B: - Basic command
c) C: - Complex command
d) H: - Hand command :: usage H:command 

  • "available commands" :: display list of currently available commands
available commands...
type B: name= exit content= exit
type B: name= rotate1 content= move(10),right(30),left(30),back(10)
type B: name= line1 content= move(30),back(30),move(30)


  • "save new command" :: 

------------------------------------ new command section
You can create new command for the robot and store it into system internal cache. new command format is JSON like.
example: {"type" : "B", "name" : "magic22", "content" : "move(22),right(360),back(33)" }
  • "run command line" :: robot command line allows you to command the robot. 
command-line section...
BridgeCommandProducer INIT
BridgeCommandConsumer INIT
BridgeCommandProducer READY and IN CYCLE
AGENT ACTIVE = [AgentStatus{status=AgentStatusEnum{code=1, def='active'}, messages=[]}]

Saturday, June 4, 2016

NEWS: Robo4j alfa-0.1 release is out

   Great news! Promised release date has been achieved and source-code has been deployed on GitHub under GPL license version 3. 
   What the release contains: 
  • robo4j-core
    •  core functionality which provides communication with robot, synchronisation of asynchronous events and etc.
  • robo4j-line
    • command line interface which is capable to dynamically extend robot behaviour
  To make the robot work it's necessary to follow previous blog post about how to build the robot.
   The configuration of the framework is then straight forward. It's necessary to link all robot parts properly together. For those purposes offers following types of annotations:
  • @SystemProperties - such annotation configures underlaying system, in this case it's Lego Mindstorms brick
  • @RoboEngine - such annotation is necessary to configure any engine available on the brick 
  • @RoboSensor - annotation allowos to link robot sensor with the Robo4j infrastructure 
  • @BatchAnnotation - allows to pre-configure Basic Commands. Such command are then available and ready to be used by the interface
   All configuration parts are then processed at initiation time of the inside the entry point. 
This entry point is the the class ControlPad.

   Pictured configuration is pretty straight forward and more will be published soon!
   Enjoy kick-off  

Monday, May 30, 2016

robo4j-alfa release news - building robot

   The first alfa release is planed to use LEGO Mindstorms EV3 build system. LEGO build system has been chosen because it allows build a robotic kind of device without any additional requirements. 
  For accessing LEGO units will be used RMI (Remote Method Invocation) communication Java API as the easies option. RMI allows access Java Object from another Virtual Machine. 
  Another reason why LEGO Mindstorms EV3 has been chosen is the fact that at the beginning has been planed primary for LEGO usage only. 

 1st alfa release will not contain any advanced Machine-to-Machine (M2M) communication. alfa release is meant to be kick-off of the whole project. There are already prepared bunch of features ready to deploy but everything has its time and they will be continually published in future. 

Current start with may look complicated but don't worry it's not. The hardest step is to prepare LEGO brick. Following steps should make it much easier

1. install LejOS 
   see installation steps : STEPS
2. we need to compile some libraries 
   this step consist from 4 small sub-steps: 
   a) download from leJOS version (used version 0.9.1beta-3)
   b) compile library DBUSJAVA 
   c) compile library EV3CLASSES that includes DBUSJAVA
   d) store EV3CLASSES library in your localMaven
   comment: this library is necessary to compile application
3. clone github repository
4. build a robot  

The winner of robot type competition for alfa release is MODEL GRIPP3R Alfa model competition winner -> Mr. GRIPP3R
LEGO provides all instruction how to build this model over YouTube channel or over the PDF

Saturday, May 28, 2016

-- under construction -- 

News: is preparing for the alfa-release (4.6.2016). has currently updated the section About
@miragemiko has written 1st blogpost mentioning

Tuesday, May 10, 2016 -> is making progress websites still doesn't look awesome but everything is coming
here is one more video 
Now we can say that is able to take care about drinks ... 

Sunday, May 1, 2016

rObO4j : Let's Dance(\/)

underConstruction .... all coming soon ...