rosjs/rosjs — pull request #8 by baalexander (2012-07-02 03:35:32+00:00)
Title: Simplifying API and adding lots of documentation

After talking with Jihoon and @benersuay this week, I realized there were some complexities with the ros.js API that would just cause confusion down the line. The main issue was retrieving the message type and service definitions from the server.

Before these revision, a call to `getMessageTypes` or `getServiceTypes` was required before being able to publish, subscribe, or call a service. While nice to get the definition of a message or a service from the server, the extra step and putting everything inside a callback caused confusion.

These revisions remove those calls so publishing and subscribing and calling services requires fewer extra steps and lines of code. Ros.js is also 33% fewer LOC.

This pull request also contains *LOTS* of documentation. The README.md, ros.js, and example.js all have comments.