Blockly

Overview

This package provides web-based visualization and block programming tools for robots and drones based in blockly (github.com/google/blockly).

Blockly

Background

For several weeks we (Erle Robotics) taught different groups (going from the high-shool level to the PhD one) how to make use of our robots. While most of the people quickly understand the different mechanical parts of a robot, understanding the underlying software is something that took quite a bit of effort.

When making our training sessions, one of the first things we try to introduce is the concept of the Robot Operating System (ROS). While there're many resources on this topic, it's a fact that learning ROS takes some effort even at the PhD level so we started prototyping ideas to make this process as simple as possible.

We wanted to reach high schools students so we realized that we had to remove the assumption of "coding skills" from the equation. This made us look into systems like Scratch for robot programming. Taking inspiration on some previous work we started prototyping. The output of these prototypes has become robot_blockly. A multiplatform web-based tool for programming robots and drones that use ROS.

Nodes

blockly_server

Backend with the corresponding websockets to launches the ROS code coming from the frontend.

Subscribed Topics

blockly (invalid message type for MsgLink(msg/type))
  • Communication with the robot_blockly server. To be used in a later stage.

Usage

Frontend

cd <catkin_ws_root>/src
git clone https://github.com/erlerobot/robot_blockly
cd robot_blockly/frontend
git clone https://github.com/erlerobot/blockly
git clone https://github.com/erlerobot/ace-builds
cd ../scripts

# install apache
sudo apt-get install apache2
# make sure that Apache is running properly in your robot and then
./deploy.sh

Backend

# Install dependencies
sudo pip3 install rosdep rosinstall_generator wstool rosinstall
sudo pip3 install autobahn
cd <catkin_ws_root>
catkin_make_isolated --pkg blockly --install
source install_isolated/setup.bash
rosrun blockly blockly_backend.py

# now go to http://erle-brain-2.local/
#  and start playing!

Resources

More information about robot_blockly

More information is available at Erle Robotics docs.

Wiki: blockly (last edited 2015-12-07 12:51:31 by VictorMayoral)