My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ROSScratch  
ROS from Scratch: Scratch interface for ROS
Updated May 7, 2011 by alex.k.unger

ROS from Scratch

ROS from Scratch is a variation of the Scratch programming environment developed by Brown University to teach programming to middle school students through the use of robots. Scratch is actively developed at MIT as a programming environment for Middle School students and can be found here.

Installation processes and project outlines have also been developed to allow instructors to get up to speed quickly and teach programming through robotics.

ROS from Scratch currently supports the iRobot Create but can be easily customized to work with any ROS compatible robotic platform, such as the Parrot AR.Drone.


Project Modules

Click here for information on how to use ROS from Scratch in your classroom. Project Modules outline basic programming features and the features of ROS from Scratch and how to introduce them to students who have no background in Scratch, Robotics, or Programming.


Troubleshooting

The following points will help solve the most common issues that might arise while using ROS from Scratch. If you encounter other issues please contact cjenkins@cs.brown.edu

  • Robot Disconnected: If the robot becomes disconnected from your computer and Scratch can no longer send commands to the robot, try restarting the VM and the robot. The robot should already be connected when the VM starts up. Restarting the VM and robot will reset the connection. When the connection is reestablished the robot will play a short tune to indicate that the connection is ready.
  • Robot Connected: If the robot and computer have been successfully connected but commands from Scratch are not being sent properly, try disabling and re-enabling remote sensor connections. This can be done by opening the Sensing block category and right clicking on the <sensor [button pressed ?> block. If the menu contains disable remote sensor connections click that option. Now right click on it again and click on enable remote sensor connections.

Installation

ROS from Scratch can be installed in two different ways. For none technical users we have created Virtual Machine images which have all the necessary software installed. For advanced users you can install the individual components onto your computer.

Installation via VMs

Using either a VirtualBox VM or VMware VM allow you to launch the entire ROS from Scratch system without installing ROS or Scratch individually, which requires advanced knowledge. By downloading and using one of these virtual machines the entire setup will be ready to go right out of the box. The virtual machines we have created will automatically connect to the robot when they start up.

Click here if you'd like to download the VirtualBox image.

Click here if you'd like to download the !VMware image.

Both images are about 6GB in size. When installing onto multiple computers make sure to only download it once and use a USB drive to transfer it between machines as the download will take a significant amount of time.

Take a look at these videos to get help on installing and using the virtual machines.

Installing the VM

Launching ROS from Scratch from the VM

Manual Installation

More advanced installation are outlined below and require that you can download and install packages in Ubuntu or other ROS and Scratch compatible operating system. This process yields a much smaller download size but requires that you know a great deal more about installing complex software packages via the command line.

Install ROS from Scratch (our modified version of Scratch)

Install Scratch via aptitude (cmd: sudo aptitude install scratch ). Obtain the ROSfromScratch package and unzip it on your $PATH. Modify the path within the executable wrapper ROSfromScratch to reflect the path to the file ROSfromScratch.image file that was included in the zip file.

ROS and ROS/Scratch Bridge

Install ROS, then install brown-ros-pkg by checking it out of SVN and adding the checked out code to your $ROS_PACKAGE_PATH. After brown-ros-pkg has been installed you can download the ROS/Scratch Bridge. It contains ROS Launch files for icreate, icreate plus camera, and ardrone.


Downloads


Videos

The following videos explain how to use ROS from Scratch and show what you can do with it.


Changes from Scratch 1.4

The following information is for Squeak developers looking to incorporate the changes made in our Scratch image into their own Scratch images. The changes listed below encompass all the changes that were made to Scratch to build ROS from Scratch. The following sections of the virtual filesystem have been modified:

  • Scratch-Objects/ScratchSpriteMorph(class)/block specs/blockSpecs
    • Adds new blocks for use with the robot
  • Scratch-Objects/ScriptableScratchMorph(class)/block specs/blockSpecs
    • Adds new blocks for use with the robot
  • Scratch-Objects/ScriptableScratchMorph(instance)/sensing ops robot/
    • Adds methods for the blocks to use when accessing the robot sensors
  • Scratch-Objects/ScriptableScratchMorph(instance)/motor ops robot/
    • Adds methods for the blocks to use when controlling the robot motors
  • Scratch-Blocks/CommandBlockMorph(instance)/accessing/uncoloredArgMorphFor:
    • Adds drop-down menus for the robot control blocks (the ones that go forward/backward/left/right).

These changes can be found by looking at the Scratch source available here: ROS from Scratch source


Sign in to add a comment
Powered by Google Project Hosting