Code Monkey home page Code Monkey logo

scratch3-ros-vm's Introduction

ROS Extension for Scratch 3

animation

An extension to connect Scratch 3 to ROS enabled platforms!

Supports:

  • publishing and subscribing topics
  • calling services
  • getting and setting rosparam variables

About

This extension packs with utility blocks for creating and manipulating JSON objects, which are integrated to Scratch variables and used to represent ROS messages.

When communicating with the ROS interface, message types are mostly infered by the topic or service name, being occluded from the user. This way the user do not need to worry that much about types, allowing easier and more intuitive usage of this extension.

This also means, however, that this extension doesn't do well in advertising new topics or serving services. Maybe these will be supported in future releases, but for now Scratch interface is designed to act as a ROS client, publishing to topics and called nodes already advertised by some other node, which should be responsible to handle the message from Scratch and do all of the robotics stuff.

Quick Start

  1. Install ROS and the following dependencies. This project was tested on ROS kinetic, but should run well in other distributions as well.
# Install main dependencies
sudo apt install ros-kinetic-rosbridge-server
# Install examples dependencies
sudo apt install ros-kinetic-turtlesim ros-kinetic-actionlib-tutorials 
  1. Access http://scratch3-ros.jsk.imi.i.u-tokyo.ac.jp

  2. Open a terminal and fire up the following command

roslaunch rosbridge_server rosbridge_websocket.launch
  1. Add the ROS Extension from the bottom left button and input localhost as the master URI

Examples

Examples can be found at the examples directory. To run the examples:

  1. On a terminal, launch roslaunch rosbridge_server rosbridge_websocket.launch
  2. Access http://scratch3-ros.jsk.imi.i.u-tokyo.ac.jp and load the example file
  3. Click on the warning sign near the ROS blocks menu to connect with rosbridge. Use localhost as the master URI. warning
  4. Check comments for other required nodes
  5. Click the green flag to start!

Blocks API

Details of provided blocks can be found at BLOCKS.md.

Run from Source

Git clone the repositories below and follow instructions at https://github.com/LLK/scratch-gui/wiki/Getting-Started

Develop a library for your own robot

You can include Scratch3-ROS on your Scratch project and create custom block libraries for your own robot. An example is given in the fetch_extension branch:

scratch3-ros-vm's People

Contributors

ericrosenbaum avatar kchadha avatar paulkaplan avatar tmickel avatar evhan55 avatar thisandagain avatar mzgoddard avatar rschamp avatar fsih avatar picklesrus avatar knandersen avatar greenkeeper[bot] avatar cwillisf avatar towerofnix avatar griffpatch avatar thebrokenrail avatar gnarf avatar affonso-gui avatar ktbee avatar hyperobject avatar kenny2github avatar chrisgarrity avatar joker314 avatar khanning avatar apple502j avatar sillyinventor avatar greenkeeperio-bot avatar morantsur avatar sjhuang26 avatar technoboy10 avatar

Watchers

James Cloos avatar  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.