Code Monkey home page Code Monkey logo

scratch4robots's Introduction

Scratch4Robots

Full installation video

Scratch4Robots

Prerequisites

Scratch 2.0

wget -O adobe-air.sh http://drive.noobslab.com/data/apps/AdobeAir/adobe-air.sh
chmod +x adobe-air.sh; sudo ./adobe-air.sh

Download the scratch file from here: https://scratch.mit.edu/scratchr2/static/sa/Scratch-456.0.2.air and then double click to install it.

ROS

Follow the ROS tutorial installation: http://wiki.ros.org/kinetic/Installation/Ubuntu

Python requirements

pip install -r requirements.txt

Gazebo and worlds

Follow the Gazebo tutorial installation: http://gazebosim.org/tutorials?tut=install_ubuntu

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

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

Installing

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 https://github.com/JdeRobot/Scratch4Robots.git

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.

./myscratchfile.py /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

http://jderobot.org/Scratch4Robots

scratch4robots's People

Contributors

scarrionv avatar jmplaza avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.