In this tutorial we will make basic tests to assert that both the robulab robot and the laptop are configured correctly. We will consider as well configured if we can start a PhaROS node that handle robulab robot, so we can publish motion messages through rostopic pub command and make it to move.

Setup

  1. Robulab charged and switched on.
  2. Laptop with Ubuntu 14.04
  3. ROS Indigo installed on laptop (Read: How to install ROS Indigo in Ubuntu 14.04)
  4. Your .bashrc file you should look like this:

    source /opt/ros/indigo/setup.bash
    source ~/PhaROS-ws/devel/setup.bash
    
    ROS_HOSTNAME=localhost    
    ROS_MASTER_URI=http://localhost:11311
    
  5. PhaROS installed (Read: How to Install PhaROS).

  6. Robot should be unplugged and free to move.

Ok, lets test it

  1. Create a package for testing the robulab. In a terminal run (this could take a couple of minutes):

    $ pharos create testrobulab
    
  2. Open the Pharo image of your PhaROS package by running this:

    $ rosrun testrobulab edit
    
  3. Install the required software to controll Robulab by executing this script.

    Gofer it  
        smalltalkhubUser: 'CAR' 
        project: 'Robulab'; 
        configurationOf: 'PureROS'; 
        load.
    ((Smalltalk at: #ConfigurationOfPureROS) project version: #bleedingEdge) load: {'kompai'}.
    
  4. Connect your laptop to UBNT wireless network.

  5. Start ROS by running roscore in a terminal.

    $ roscore
    

    If everything goes fine it should print something like this:

    ...
    started roslaunch server http://achao:56856/
    ros_comm version 1.11.3
    
    SUMMARY
    ========
    
    PARAMETERS
     * /rosdistro: <...>
     * /rosversion: <...>
    
    NODES
    
    auto-starting new master
    process[master]: started with pid [4073]
    ROS_MASTER_URI=http://achao:11311/
    
    setting /run_id to 6e36ef46-005d-11e4-ac41-b8ee65bb26b0
    process[rosout-1]: started with pid [4086]
    started core service [/rosout]
    

    Where achao is the hostname of the laptop I am using.

  6. Be sure that the Pharo image has not http proxy set, or if it has, they are coherent with your network configuration. To deactivate it you can just execute this in a workspace:

    NetworkSystemSettings useHTTPProxy: false
    
  7. Open a workspace and execute:

    PureROSKompai new scriptKompai1
    

    change it to scriptKompai2 if you are using Robulab2. This will create a PhaROS node that you can check by executing:

    $ rosnode list
    

    and you would see

    /PharoHandle-1404143614
    /rosout
    
  8. Let’s check the available topics to publish, in a terminal execute:

    $ rostopic list
    

    and the list of topics should be:

    /command_velocity
    /initialpose
    /kompai/scan
    /kompai2/pose
    /kompai2/trajectory/differential
    /orientation
    /rosout
    /rosout_agg
    
  9. Let’s publish some motion message in /command_velocity. For that lets use the command pub for rostopic which has the following structure: rostopic pub <topic id> <topic type> <message> command. Press [TAB] key to autocomplete: topic id, topic type and get message template.

    $ rostopic pub /command_velocity geometry_msgs/Twist "linear:
      x: 0.0
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: 0.5"   
    

And the robot will start to rotate. If so you are done :)

Jetstorm is the library to make Pharo communicate with the Lego Mindstorm Ev3. We provide the technical report. It explains the protocol and the architecture of the library.

If you want to cite it, here is the lines to copy and paste in bibtex:

@techreport{Lava14a,
   Author = {Jannik Laval},
   Institution = {URIA -- Ecole des Mines de Douai},
   Title = {JetStorm - A communication protocol between Pharo and Lego Mindstorms},
   Url = {www.jannik-laval.eu/assets/files/papers/Lava14a-JetStorm.pdf},
   Year = {2014}
}

With the evolution of JetStorm, the Technical Report will be improved.

Here are videos of a students’ project of a tracker robot that relies on an external kinect sensor driven through ROS. The kinect observes the whole scene. A PhaROS-based node controls the robot to track a ball based on the the kinect output. When no ball is detected, the robot goes back to a home position.


Ball Following Behavior


Go Home Behavior


Tracker Camera View

We have already reported about a team of our students competing for the 2014 edition of the Eurobot contest (french chapter). The project where they have been using PhaROS is now over. Below the last videos. Hopefully a new team will be continue the effort next year and build up on what has been done so far.


IronMines Bot in the lab scoring 4 balls and 1 triangle


IronMines Bot in the lab scoring 1 ball and 2 triangles


IronMines during the competition

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.

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.
- tutorials
- 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.

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.

http://mirror.as35701.net/video.fosdem.org/2014/K4401/Saturday/PhaROS.webm

 

Enjoy it!

 

 

I begin to write a strong interesting new functionality in Phratch: the Meta Repository.

The idea comes from Pharo: The Meta Repository is an area where you can put the installation process (in our words, a Metacello Configuration) of an extension of Phratch.

You can build a Metacello configuration based on the chapter already written about Metacello, available here: http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/Metacello.pdf.
For now, you just need to have a class that has the pattern name ConfigurationOgYourAddOnName, where YourAddOnName should be changed by the name you want.

Then, just put the new configuration package on the PhratchMetaRepo, using Metacello, and putting it on the server: http://smalltalkhub.com/mc/JLaval/PhratchMetaRepo/main
using the following configuration of the Monticello configuration:

MCHttpRepository
    location: 'http://smalltalkhub.com/mc/JLaval/PhratchMetaRepo/main'
    user: ''
    password: ''

Finally, on the user side of Phratch, you can see a new menu “AddOns”, where you can install all new add-ons. For now, there is one project: JetStorm for Phratch, that allows one to connect the robots Lego Mindstorms to Phratch.

I hope a lot of new projects will appear in following months.

Jannik