ros-turtlesim-meteor

Synopsis

This is a simple meteor app thats connects to a ROS Node running Turtlesim and draws a turtle's path as it moves. The connection is done using roslibJS (on the client-side) and ros-indigo-rosbridge-server (on the server-side).

Installation

The app should be run on a machine with Ubuntu 14.04 OS and the Meteor framework installed.

The backend should be run on a machine with Ubuntu 14.04 OS with ROS, Turtlesim and the rosbridge_suite installed.

Dependencies for each environment are detailed below, with links for each installation.

Pre-requisites

Back-end

Front-end

Installing and running the app

Back-end

Make sure you have roscore, turtlesim and rosbridge running in the back-end. To do this, execute each of this commands in different terminals:

> roscore
> rosrun turtlesim turtlesim_node
> roslaunch rosbridge_server rosbridge_websocket.launch

You should now be ready to launch the app.

If you are not familiar with ROS, take a look a this tutorials. Same goes for rosbridge and this tutorial!

Front-end

Clone this repository and run meteor:

> git clone https://github.com/luisbosch/ros-turtlesim-meteor.git
> cd ros-turtlesim-meteor
> meteor

After meteor launches the app, you can check it out in the browser at:

http://localhost:3000/

Uploading your own examples

You can upload you own drawings in JSON format. The file consists of an array of instructions that will be executed in series. Each command has two properties:

  • li: is the linear velocity (draws a line)
  • an: is the angular velocity (rotates)

Check out this simple example:

{
  "commands": [
    {
      "li": "2.0",
      "an": "0.0"
   },
  {
      "li": "0.0",
      "an": "2.0"
   },
    {
      "li": "3.0",
      "an": "0.0"
   }
  ]
}

Here we draw a line, then we rotate, and then we draw a longer line. Try it out and see what happens!

Configuring the roslibjs and rosbridge connection

The url and port of the server to which roslibjs connects to the rosbridge can be configured in:

public/config.json
{
  "connectionUrl": "ws://localhost:9090"
}

The app connects to ws://localhost:9090 by default.

Contributors

This is just a test, feel free to fork and use at your own risk! This repo is not maintained.