Thanks to ESUG and all the participants of ESUG 2013 at Annecy.
Phratch won the 3rd place of the “Innovation Technology Awards”.
Since a bit more than one year of hard work, we are glad to be able to show the world our pharo client framework for ROS.
ROS (Robot Operating System) provides libraries and tools to help software developers create robot applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more.
In order to make your life easy, we present here a virtualization with all the things needed installed and configured for the Groovy Galapagos version. Sadly, in this version of ROS (the last stable) the Gazebo simulator is not working, and also the most stable code of the previous version (Fuerte) is not working with gazebo anymore. Thats why the examples we show here are based on the easiest ROS simulator, the turtlesim.
We expect to be able to make a better showing up of all this world with the next version (Hydromedusa) which still unstable, but promise to have a whole new way to interact to simulators and so to let us show you a full simulated robot managed from your pharo image.
After you have downloaded the virtualization, and import it into your virtualbox installation, you need to get started into this new world. Remind always that currently, ROS is almost managed thought console commands, so, in order to interact with ROS and PhaROS you will need to use it, and of course, in order to use it you need to know some commands.
Yeah, cool, but you know, i just want to see something working, and i hate to waste my time understanding commands
So, open a terminal and execute:
rosrun esug pharos turtlesimpharo
Ok, you got my attention, i want to know a bit more about how to use ROS
roscd {package name} ” This command step into the folder of the package ”
roscd esug ” This application will drive you to the esug package folder ”
rosrun { package name } { package-binary-name } { arguments } ” This command execute a binary of a package, generally this means a ROS Node that will have some responsibility”
rosrun esug pharos {script name} “punctually this command will execute a given script. ”
rosrun esug headless { script name } ” this command works like pharos command, but starts with a headless VM. Regard the inspects and halts before use this”
rosrun esug edit ” this command will open the image related without execute anything. This way, each package has its own image, and is easy to point to it and edit or browse it”
In order to change IP/Port of the ROS master, you need to change both, ~/.bashrc file (Changing the Environment variables) and also the constructors used by the scripts.
It is there any cheat sheet to have all the commands ?
Yes of course: right here
Ok, i just execute the turtlesimpharo script, nice, there are more examples right?
yes of course :), here you have an other one a bit more complex
rosrun esug turtlesimpursuitturtles
Yeah! I love it, how do i make my own code?
A great way to begin is browsing PhaROSEsug package, it has commented methods and uses all the basic stuff. We will make some tutorials for advanced usage, but mean while you can have fun with that and browsing code and tests is always allowed ;).
I made roscd esug, and i found a lot of folders! i don’t understand anything!
├── bin
│ ├── edit
│ ├── headless
│ └── pharos
├── build
├── CMakeLists.txt
├── ex.launch
├── image
│ ├── Pharo.changes
│ ├── PharoDebug.log
│ ├── Pharo.image
│ ├── PharoV10.sources
│ └── scripts
│ ├── turtlesimpharo
│ ├── turtlesimpursuitturtles
├── include
├── msg
├── package.xml
├── src
└── vm
└── pharo -> /home/pharos/vm/pharo
——————–
bin
——————–
we have the commands to interact with the related package-image
——————–
build
——————–
Is here to keep layout compatibility with ROS. Maybe will store package-cache in the future.
——————–
CMakeLists.txt
——————–
ROS give a make tool in order to generate infrastructure code, like the structures related with topic messages. Actually this file should be mantained by hand.
——————–
image
——————–
In this folder we encounter the related image, the common source/changes bundle, and the scripts folder
——————–
image/scripts
——————–
In this folder we have all the scripts that we can run with this package. This files are actually generated and related with script methods in the package-related-object in the image side. (To look for the object of esug package punctually, browse PhaROSEsug ).
——————–
include
——————–
This folder is for ROS layout compatibility. We are not currently using this folder.
——————–
msg
——————–
This folder is for message definition files ( .msg extention). This folder is mantained automatically with the type generation from image side, but you can also add your own types with no relation with the image side. In any case, messages and it dependancies should be updated in the ros infraestructure files (CMakeLists.txt, package.xml)
——————–
package.xml
——————–
This is the package description file that ROS use to define compile-time / runtime dependancies, author, etc. You should not worry about this file in any case but in the case of new types definition.
——————–
src
——————–
This folder is for ROS-fuerte layout compatibility. Is actually deprecated and it will be removed soon.
——————–
vm
——————–
This folder has the vm needed to run the exisiting image and code. Commonly is a symbolic link to the VM that the image creator of the package.
This folder and vm are usually pointed by the scripts at the bin folder.
At the ESUG 2013 conference, we presented the current status of the RoboShop project. Santiago did a great job and now we are able to run tests of our scenario of a helper robot in a shopping mall. Based on a map built using laser SLAM, the robot computes the shortest path to fetch items listed by a customer in a shopping list. The slides below include a video of the first tests. They also give a bird’s eye view of the architecture, where we use Pharo for orchestration. We also reuse existing software from the ROS community through our client PhaROS.
In this post, I will explain how to install Phratch on an Android device. I created the .apk file for an ARM architecture. The following instructions are based on this page.
First, download a Pharo 2.0 image and execute the following code. It loads the necessary code for Android support and the Phratch package. Deprecation raiseWarning: false; showWarning: false.
"Installation of Android support" Gofer new url: 'http://source.squeak.org/VMMaker'; package: 'Android-Base'; load. SmalltalkImage checkSourcesFileAvailability: false. SmalltalkImage checkChangesFileAvailability: false.
"2 - installation of Phratch" Gofer it url: 'http://smalltalkhub.com/mc/JLaval/Phratch/main' username: '' password: ''; package: 'ConfigurationOfPhratch'; load. (Smalltalk at: #ConfigurationOfPhratch) loadBleedingEdge.
Then, you can execute the following lines that makes Phratch be in User mode:
StartupLoader default removeAllScriptsFromAllDirectories; initialize. PhratchFrameMorph open saveImageForEndUserSilently.
Now, split your image:
split -d -b 1m /path/to/myapplication.image myapplication.
In macosX, the option -d does not exist. It means that you should remove it and rename all created files with extensions as .00, .01, .02, …
Create a new folder for the project. Inside it, unzip the makevm.zip (https://ci.inria.fr/pharo-contribution/view/VM/job/CogDroid/).
Go inside the dir, and, inside it, unzip the nativeVM-xxx.zip (https://ci.inria.fr/pharo-contribution/view/VM/job/CogDroid/). I use the arm file.
Then do
mkdir -p src/phratch/eu/android
Then create a .java file in src/phratch/eu/android/Phratch.java, which contains:
package phratch.eu.android; import org.golubovsky.cogstack.CogActivity; public class Phratch extends CogActivity { }
In assets/image, push the image splitted file (files with extension .00, .01, …), and run:
ls -l assets/image/
Make sure subdirectory assets/zipped exists. From https://code.google.com/p/phratch/downloads/list, download in this folder the files ScratchSkin.zip, Manual.zip, locale.zip, Media.zip, and Help.zip.
Now, comes the need to change files. Go back in the makevm folder.
In AndroidManifest.xml
In build.xml
In res/values/strings.xml
In local.properties
In project.properties, change the two following lines:
by
In project/local.properties
In project/project.properties, change the following line:
by
In res/drawable/, you can replace icons.
Run the commands:
ant clean ant debug
You can run
ant release
The installable apk file will be under bin: Phratch-android-debug.apk.
Deep into Pharo is the second volume of a series of books covering Pharo. Whereas the first volume is intended for newcomers, this second volume covers deeper topics.
TopicsYou will learn about Pharo frameworks and libraries such as Glamour, PetitParser, Roassal, FileSystem, Regex, and Socket.
You will explore the language with chapters on exceptions, blocks, small integers, and floats.
You will discover tools such as profilers, Metacello and Gofer.
Phratch is a programming language that makes it easy to create your own interactive stories, animations, games, music, and art — and share your creations on the web. It is a port of Scratch (http://scratch.mit.edu/) on recent platforms (Phrao 2.0 and Pharo 3.0)
More than Scratch, Phratch includes BYOB, Build your own Blocks (http://byob.berkeley.edu/#download). It allows one to create a block composed by other blocks. Creating a block is available in the category variables below the creation of variable and creation of list. Then, It is possible to edit the block by right clicking.
Phratch is also Panther: It includes two interesting categories: Files and colors. Files allows one to manipulate local and remote files, and Colors to manipulate color features.
Phratch includes new features like Settings, FileSystem, Metacello. For example, I can edit a normal block, and a real browser is opened.
A block is a smalltalk method containing a pragma. This pragma informs Phratch that this method should be displayed as a block. A lot of Blocks are provided by default: from Scratch but also a lots of them comes from BYOB, and Panther.
You can find Phratch and tutorials at code.google.com/p/phratch.
Location: Mines de Douai and ENSTA Brest (France)
Advisor and contacts:
Noury Bouraqadi, Luc Fabresse, Jannik Laval (car _at_ mines-douai.fr, website: http://car.mines-douai.fr/)
Loïc Lagadec (loic.lagadec _at_ ensta-bretagne.fr)
Profile: the candidate must hold a recent Master of Science degree in Computer Science or Software Engineering and must have solid skills in dynamic reflective language and OOP.
Description of the work:
The goal of this PhD is to study Smalltalk integration with FPGAs for robotic applications. This integration will enable us get the best from both worlds. Developers are provided with a high-level dynamic reflective language (Smalltalk) for building and debugging their applications. Still, we can have high performances by projecting part of the programs into FPGAs. These reconfigurable hardware chips can achieve performance faster than C programs, while consuming much less energy.
The work to do can decompose into the following tasks:
-Build reference robotic applications fully in Pharo Smalltalk using actual robots (see http://car.mines-douai.fr/robots/)
-Analyze these applications to identify critical parts to project on FPGAs to significantly increase performances (speed, energy)
-Do the actual projection to FPGA and evaluate performances of the transformed applications
-Generalize the approach and define a methodology for turning Smalltalk code into FPGA
-Propose a solution to automate the methodology
The Ph.D student will receive a grant which net amount is approximately 1420 euros per month for 3 years (36 months).
He will be co-supervised by Loïc Lagadec from the ENSTA-Bretagne (Lab-STICC, Brest) and Jannik Laval, Luc Fabresse and Noury Bouraqadi from Ecole des Mines de Douai (CAR, http://car.mines-douai.fr/).
The first 18th month will be spent in Douai (Lille area), while the last half of the PhD will be spent in Brest.
However, during the full 3 years, there will be a strong interaction with co-supervisers from both labs.
Bibliography:
-A Robust Layered Control System For A Mobile Robot. R. Brooks. IEEE Journal of Robotics and Automation. Vol. 2. Num 1. March, 1985.
-RCS: A Cognitive Architecture for Intelligent MultiAgent Systems. J.S. Albus and A. J. Barbera. Proceedings of the 5th IFAC/EURON Symposium on Intelligent Autonomous Vehicles (IAV 2004). Lisbon, Portugal, 2004.
-Handbook of Robotics. Bruno Siciliano and Oussama Khatib editors. Springer. 2008.
-Multi-Level Simulation of Heterogeneous Reconfigurable Platforms. D. Picard and L. Lagadec. International Journal of Reconfigurable Computing. 2012.
-High-level synthesis for FPGAs: From Prototyping to Deployment. Jason cong and stephen neuendorffer and juanjo noguera and kees vissers and zhiru zhang. IEEE Transactions on Computer-aided design of integrated circuits and systems. Vol. 30. Num 4. April, 2011.
-The MOLEN Polymorphic Processor. S. Vassiliadis and S. Wong and G. Gaydadjiev and K. Bertels and G. Kuzmanov and E. Moscu Panainte. IEEE Transactions on Computers. 2004.
During the execution of object-oriented applications, several millions of objects are created, used and then collected if they are not referenced. Problems appear when objects are unused but cannot be garbage-collected because they are still referenced from other objects. This is an issue because those objects waste primary memory and applications use more primary memory than they actually need.
Relying on the operating system’s (OS) virtual memory is not always enough since it cannot take into account the domain and structure of applications. At the same time, applications have no easy way to parametrize nor cooperate with memory management.
In our latest paper published in JOT, we present Marea, an efficient application-level object graph swapper for object-oriented programming languages. Its main goal is to offer the programmer a novel solution to handle application-level memory. Developers can instruct our system to release primary memory by swapping out unused yet referenced objects to secondary memory. Our approach has been qualitatively and quantitatively validated. Our experiments and benchmarks on real-world applications show that Marea can reduce the memory footprint between 23% and 36%.
Last october the 29th, Mariano Martinez Peck successufuly defended his PhD entitled “Application-Level Virtual Memory for Object-Oriented Systems“. The jury agreed on the importance and the quality of the contributions that were published in different journals and conferences. If you are interested learn more, you can find below the slides of the defense, as well as the video recording of Mariano’s talk.