scratch4robots repository

Repository Summary

Checkout URI
VCS Type git
VCS Version master
Last Updated 2018-10-21


Name Version
scratch4robots 0.0.2



Full installation video



Scratch 2.0

wget -O
chmod +x; sudo ./

Download the scratch file from here: and then double click to install it.


Follow the ROS tutorial installation:

Python requirements

pip install -r requirements.txt

Gazebo and worlds

Follow the Gazebo tutorial installation:

With this line we get some prepared worlds based on ROS ready to use:

sudo apt-get install ros-${ROS_DISTRO}-kobuki-gazebo


Install our ROS package

sudo apt-get install ros-kinetic-scratch4robots

Install Scartch4Robots extension to use in Scratch

In scratch keep pressing shift key while you click on "File" > "Import experimental HTTP extension" and add our extension. The extension will be stored in the "extension" directory of your package.

Note: This step is necessary each time you initialize Scratch

Download the tool from git

Here you will find some usefull examples.

git clone

How to Use

Make a scratch project

Make a scratch project and save it.

Make the translation from Scratch to python

Generate the code:

rosrun scratch4robots scratch2python /path/to/your/scratchproject.sb2

This command will generate the python script on your current work directory

Launch the simulated world

For example:

roslaunch kobuki_gazebo kobuki_empty_world.launch --screen

Execute the generated code

The generated code need a configuration file .yml as parameter, you will find some usefull configuration files in this git repository.

./ /path/to/robot_ros.yml

Running an example

You have all you need for running the examples in the examples folder

More information about the tool