Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
Since 0.7 we support color palettes and schemas in ode_robots.
In the implementation of a robot we simply use the color robot1, but we can change the default color set (in the lpzrobots::OsgHandle) such that the robot magically becomes blue.
The default color-set file is located at: ode_robots/osg/data/colors/DefaultColorsSchema.txt
The format is
# comment AliasName ColorName [Set] ...
where ColorName cannot refer to another alias and Set is optional (0 by default)
BTW: By providing your own alias files you can tune the colors of your simulation without recompiling it. The files are searched relative to the folders: data/, PREFIX/share/lpzrobots/data, and if the variable ODE_ROBOTS_DATA exists, then also there.
There is a big palette file called RGB_full.gpl that contains the colors from a book called "Farbwelten" from www.CleverPrinting.de. It is great resource for colors but it is unfortunatelly in German, so most of the color names are in german too.
If you want to change the colors in your simulation you can load a different color-alias-set. See for instance UrbanColorSchema.txt, UrbanExtraColors.gpl in the colors folder. You need to register them with your simulation in the constructor with lpzrobots::Simulation::addPaletteFile and lpzrobots::Simulation::addColorAliasFile. An example is given in ode_robots/simulations/zoo/main.cpp. You may load them later as well, but the colors used for the environment will not be affected this way.