rosjs/rosjs — pull request #3 by baalexander (2012-04-19 03:47:29+00:00)
Title: Gets rid of topics, services, and params. Eliminates backings.

The main change here is I removed ros.node, ros.topics, ros.services, and ros.params. Example.js has an updated example of using the code. But here's a snippet:

```javascript
var ros = new ROS('http://localhost:8000');
ros.types([
'std_msgs/String'
], function(String) {
var cmdVel = new ros.topic({
node: 'talker'
, topic: 'cmd_vel'
, messageType: String
});
cmdVel.subscribe(function(message) {
console.log(message);
});
});
```

I realized while trying to implement the bridge for rosnode that only the types() call has to wait, the rest of the functions can lazily connect and the program should still run as intended. Another advantage is it should get rid of another layer of callbacks.

But the important part I want to discuss is backing bridge alternatives. I closed my previous pull request that moved most of the functions to rosbridge.js. I'm currently wondering if it can just make straight up web socket calls to a URL and not need a backing. Then we can run rosserver.js or rosbridge at that URL and interpret the data.

Thoughts?

/cc @trevorjay