This page and its links are no longer kept up to date and the serve as a historical record only. You can find the most recent Python instructions here: CKBot Tutorials.
All information and links below serves as a historical record only.
CKBot interface
We use the Robotics Bus Protocol: RoboticsBusInterface1.pdf for the CAN communication.
Installation instructions
Instructions on getting started with the CKBot interface on all supported platforms.
Tutorials and Documentation
CKBot interface documentation
Inline documentation
The CKBot interface code has pages upon pages of detailed documentation inlined in the code. This documentation follows the python conventions for inline documentation, and is therefore accessible from any standard python development environment or documentation browser. For example, typing ckbot.logical?
in the @ipython@ environment (after @ckbot.logical@ was @import@-ed) will give the documentation for the @logical@ module. Another very useful tool is pydoc
, which serves python documentation via a GUI or web-browser.
Video tutorials
Python documentation
New to Python?
If you want a quick 101 crash course on python that is very helpful, check out google's python tutorial here: http://code.google.com/edu/languages/google-python-class/set-up.html
A more complete tutorial on python is found at http://docs.python.org/tutorial/
Invaluable documentation for the standard python libraries is at http://docs.python.org/library/
Programming Style and Philosophy
When writing code we follow these guidelines:
http://www.ros.org/wiki/PyStyleGuide
The @ckbot@ libraries follow a design philosophy which arose from the world of software security: 'The Principle of Least Authority (POLA)', which is closely related to (but not identical with) the principle of least privilege.
Simply stated, POLA means that no object (or class, or function, or module, or other entity) should have the capability to do more than it needs.
For example, a standard practice in object oriented design is for an object Alice
to call a method on object Bob.request(Alice,...)
passing Bob
a handle for Alice
, so that Bob
may call some Alice.method()
of Alice
's. This breaks POLA, because Bob
can also call any other method of Alice
's using that handle. A POLA-correct way would be to pass Bob
the bound method Alice.method
: Bob.request(Alice.method,...)
, which allows him to do ONLY what he is authorised to do.
One obvious advantage of POLA is security, and its kissing cousin, reliability. If objects can't do what they aren't supposed to do, neither malicious nor accidental failures of those objects can cause more than limited damage.
A less obvious advantage is maintainability. If objects are only granted the capabilities they need, the programmers extending them will have to work harder to break encapsulation; the programmers reading the code will have an easier time understanding what objects do. Code quality, flexibility and modularity will be easier to maintain.
So if you wonder what possessed us to invent the ProtocolNodeAdaptor
-- we were possessed by POLA.