#36 More Misc. API features for libstage

Reed Hedges

This (1) remembers the token by which a model was
defined in the world file, (2) provides little accessor
functions for model.token and model.type, and (3) also
provides a way to iterate over the top-level models
(models with no parents) in the world (with a wrapper
API around g_hash_table_foreach).

Example of the model definition thing: given this world
define p3dx position (
p3dx (
name "my_robot"

The *type* of the model with name "my_robot" is
"position" (2), but the "typestr" I add will be "p3dx".

I use this in MobileSim to indicate which Pioneer model
you want, so I can send that to the client, and do
other things. An alternative to this scheme would be
to have a way of just throwing stuff into the model's
"props" datalist "property bag" from the world file,
which I may implement anyway to store some very
pioneer-specific conversion factors and other parameters.


  • Jeremy Asher

    Jeremy Asher - 2008-08-01
    • milestone: --> 829871
  • Toby Collett

    Toby Collett - 2009-07-23
    • labels: 382482 -->
    • milestone: 829871 -->

Log in to post a comment.