tutorials:using_the_skiros_world_model_from_python

Adding a new element to the world model

Example, adding a skiros:Location element to skiros:Scene-0:

element = Element('skiros:Location')
self._wmi.instanciate(element, relations=[{'src': 'skiros:Scene-0', 'type': 'skiros:contain', 'dst': '-1'}])

Modifying an element in the world model

Example, changing the position of an object:

element.setData(':Position', [1.0, 0.0, 0.0])
self._wmi.update_element_properties(element)

Example, changing the frame id of an object:

element.setProperty('skiros:FrameId', 'map')
self._wmi.update_element_properties(element)
  • tutorials/using_the_skiros_world_model_from_python.txt
  • Last modified: 2022/09/02 14:04
  • by 127.0.0.1