morse-simulator/morse — pull request #463 by HorvathJo (2014-01-08 07:47:01+00:00)
Title: added 2 services to "Object" to get configs and props from components

For our applications we need to know the configurations of an object once at the start.
So I added 2 new services to the class "Object" in /morse/core/object.py:

- "get_properties" gets the property-field of a component
example output:
```
id1 SUCCESS {"properties": {"cam_width": [256, "", "(no documentation available yet)", "image_width"], "cam_height": [256, "", "(no documentation available yet)", "image_height"], "cam_focal": [25.0, "", "(no documentation available yet)", "image_focal"], "cam_near": [0.1, "", "(no documentation available yet)", "near_clipping"], "cam_far": [100.0, "", "(no documentation available yet)", "far_clipping"], "Vertical_Flip": [false, "", "(no documentation available yet)", "vertical_flip"]}}
```

- "get_configurations" gets the configurations of a component by parsing the property-field, if the configurations are needed as key-value-pairs
example output:
```
id SUCCESS {"configurations": [{"Vertical_Flip": false, "cam_focal": 25.0, "cam_width": 256, "cam_far": 100.0, "cam_height": 256, "cam_near": 0.1}]}
```
IMPORTANT:
Do not forget to add a service for your component in your simulation script.