Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorials:using_the_skiros_world_model_from_python [2022/03/22 15:44] – created simonkl | tutorials:using_the_skiros_world_model_from_python [2022/09/02 14:04] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Adding a new element to the world model ====== | ====== Adding a new element to the world model ====== | ||
Example, adding a skiros: | Example, adding a skiros: | ||
- | <nowiki> | + | <code python> |
element = Element(' | element = Element(' | ||
self._wmi.instanciate(element, | self._wmi.instanciate(element, | ||
- | </nowiki> | + | </code> |
+ | |||
+ | ====== Modifying an element in the world model ====== | ||
+ | Example, changing the position of an object: | ||
+ | <code python> | ||
+ | element.setData(': | ||
+ | self._wmi.update_element_properties(element) | ||
+ | </ | ||
+ | Example, changing the frame id of an object: | ||
+ | <code python> | ||
+ | element.setProperty(' | ||
+ | self._wmi.update_element_properties(element) | ||
+ | </code> |