Skip to main content

Library for creating OCTAS® world XML files through Python.

Project description

octapyx

A Python framework for writing OCTAS® XML files via Python code.

It imports OCTAS® definitions for steppers and properties, and provides these through Python modules.

Python code written based on octapyx XML file to be opened in OCTAS®
import octapyx.oct.world as world
from octapyx.modules.org.octane.oct.ent import Camera
from octapyx.modules.org.octane.oct.prop import Pose, TfTree
from octapyx.modules.org.octane.stdlib import TfTreeStepper

world = world.World()

renderCamera = world.add(
	Camera("renderCamera"))

renderCamera.assign(
	Pose(
		position=[1, 2, 3]))

renderCamera.assign(
	TfTree(
		position=[3, 2, 1]))

tfTreeStepper = world.add(
	TfTreeStepper(
		name="tfTreeStepper"))

tfTreeStepper.registerEntity(
	entity=renderCamera)

tfTreeStepper.step()

world.addToScheduler(tfTreeStepper)

world.write("example.oct.xml")

# Optional: Run OCTAS® directly
# by loading the world.
world.run()
<World>
	<!--Generated by octapyx.-->
	<Entity
		ucn="octane.org/oct/ent/Camera"
		name="renderCamera">
		<Property
			ucn="octane.org/oct/prop/Pose"
			position="1 2 3"
			/>
		<Property
			ucn="octane.org/oct/prop/TfTree"
			position="3 2 1"
			/>
	</Entity>
	<Stepper
		ucn="octane.org/stdlib/TfTreeStepper"
		name="tfTreeStepper">
		<registerEntity
			name="renderCamera"
			/>
	</Stepper>
	<Build
		fromStepper="tfTreeStepper" />
	<Scheduler
		ucn="oct/sched/ASyncThreadScheduler">
		<addStepper
			name="tfTreeStepper" />
	</Scheduler>
</World>

In particular, it enables the use of Python control flows (if, for, ...), libraries and interfaces to generate complex scenes in a flexible, adaptive way.

Installation

Install the octapyx package by running:

pip install octapyx

or

pip install git+https://gitlab.cc-asp.fraunhofer.de/octas/tools/python/octaspyxml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octapyx-0.0.13.tar.gz (12.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octapyx-0.0.13-py3-none-any.whl (204.6 kB view details)

Uploaded Python 3

File details

Details for the file octapyx-0.0.13.tar.gz.

File metadata

  • Download URL: octapyx-0.0.13.tar.gz
  • Upload date:
  • Size: 12.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for octapyx-0.0.13.tar.gz
Algorithm Hash digest
SHA256 acd0e84c2b8964db42071990ab997306579fc3dbe39fcb954385a47164ea4d8f
MD5 652f643e3769131b5483cde75cd2a7b4
BLAKE2b-256 35e4d5ec24f55fa7cd5b77449d01daf4b93a4abc6193169f747c22c8e9298286

See more details on using hashes here.

File details

Details for the file octapyx-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: octapyx-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 204.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for octapyx-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 aa52df4baa54c8c9e69d2d3a4a89345ce2020cf96a4d377dd71dd45425b97725
MD5 a4adfc163e97b60d792b7894f2865dd9
BLAKE2b-256 a2ae394de183292cfc6eab4907a875090ee2e72a49f1f0a988046df253a31422

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page