WilCrofter/crust

Status, April 26, 2015.

Closed this issue · 1 comments

Not having a UR5 at home (regrettably,) we are prototyping a simulator as the closest practical substitute. Since the real thing involves rigid bodies and rigid body motion, an object model would seem to be the right approach. The R language offers 3 formal object-oriented systems, S3, S4, and Reference Classes, plus various informal possibilities such as using closures.

Initially, we've decided to use an informal system. In R, functions and scopes are first class objects which can be manipulated like data. A function maintains a reference to the lexical scope, or environment in which it was defined. That environment can contain both data and other functions, hence provides an easy, if not particularly elegant, representation of an object with fields (data) and methods (functions.)

Programming interfaces evolve with use, so the system will probably change. When it's reasonably stable, we'll bundle it for easy installation as an R package on github using drat.

Closing this issue since the simulator is essentially done. Bundling as a package would be a bit premature at this point.