aseba-community / aseba

Aseba is a set of tools which allow beginners to program robots easily and efficiently. To contact us, please open an issue.
http://aseba.wikidot.com
GNU Lesser General Public License v3.0
49 stars 61 forks source link

Catalog of known robots as targets for offline compilation #825

Open davidjsherman opened 6 years ago

davidjsherman commented 6 years ago

Node descriptions for known robots are kept in two places in targets: the dummy node, which is a target by itself, and the simulated robots in the Playground.

In order to compile an Aesl program, it is necessary to have a node description. Currently the only way to obtain node descriptions is to have a running robot. However, there is a use case for offline compiling a bytecode for a known robot architecture. It would be useful to be able to build a catalogue of node descriptions.

If there were a logical way to refactor the code, with all targets (dummy or simulated) grouped into a common library, this catalog could be constructed statically.

Alternatively, it would be acceptable to instantiate a VM for each kind of known robot, and query each VM for its node description. In this case the catalog would be built by calling all of the robot factories in a structure similar to the robotTypes map from playground.cpp#L430. Note that the logic in Playground is a little bit complicated, since robot factories extend Enki robots.

davidjsherman commented 6 years ago

Is there a use case for adding the dummy node to Playground?

stephanemagnenat commented 6 years ago

I agree that it might be interesting to have a static way of retrieving a node description for testing.

Two comments: