tutorials:using_the_skiros_world_model_from_python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:using_the_skiros_world_model_from_python [2022/03/22 15:44] simonkltutorials:using_the_skiros_world_model_from_python [2022/09/02 14:04] (current) – external edit 127.0.0.1
Line 4: Line 4:
 element = Element('skiros:Location') element = Element('skiros:Location')
 self._wmi.instanciate(element, relations=[{'src': 'skiros:Scene-0', 'type': 'skiros:contain', 'dst': '-1'}]) self._wmi.instanciate(element, relations=[{'src': 'skiros:Scene-0', 'type': 'skiros:contain', 'dst': '-1'}])
 +</code>
 +
 +====== Modifying an element in the world model ======
 +Example, changing the position of an object:
 +<code python>
 +element.setData(':Position', [1.0, 0.0, 0.0])
 +self._wmi.update_element_properties(element)
 +</code>
 +Example, changing the frame id of an object:
 +<code python>
 +element.setProperty('skiros:FrameId', 'map')
 +self._wmi.update_element_properties(element)
 </code> </code>
  • tutorials/using_the_skiros_world_model_from_python.1647963898.txt.gz
  • Last modified: 2022/09/02 14:04
  • (external edit)