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.19.tar.gz (12.8 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.19-py3-none-any.whl (219.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octapyx-0.0.19.tar.gz
  • Upload date:
  • Size: 12.8 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.19.tar.gz
Algorithm Hash digest
SHA256 9dbe208ac5bf498114dbf57e4f8be7886331e9567596e00e67e0543b4b8d4c18
MD5 ae3cc845ecb93b9a792c984fd4f24cdf
BLAKE2b-256 c8570706a6c4abe6d4a78021a72da8e701dbb58c0d79bb69438b2cb8056b1ab2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: octapyx-0.0.19-py3-none-any.whl
  • Upload date:
  • Size: 219.1 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.19-py3-none-any.whl
Algorithm Hash digest
SHA256 1a9c4b80661f58ca43ddb0ba14d65f452c5f210a65069405fae07bdc8bb7630d
MD5 2ad72cc4adb1f20655e149c53f6a436c
BLAKE2b-256 2987858173fd12b9b681875b09837b267bca50d6c686b4018e39f6840357454c

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