Skip to main content

Mock-backend Python SDK for simulation-carema.

Project description

qhsim SDK

Mock-backend Python SDK for the simulation-carema v1 API.

Install

python -m pip install -e sdk

Example

from qhsim import SimulationApp
from qhsim.core.api import World
from qhsim.core.math import Position, Target
from qhsim.sensors.camera import Camera

simulation_app = SimulationApp(user_id="3FO4KV8SHSLV")

world = World(simulation_app)
world.load_scene(design_id="3FO3BK4HCD6O")

camera = Camera(
    name="camera",
    position=Position(0.0, 0.0, 1600.0),
    target=Target(0.0, 1938.0, 1300.0),
    fov=80.0,
    clarity=1,
)

world.scene.add(camera)

camera.set_world_pose(
    position=Position(1090.0, 0.0, 1600.0),
    target=Target(100.0, 1938.0, 1300.0),
)

render_data = world.render()
print(render_data.image_urls)
print(world.result[render_data.task_id])
print(camera.get_history_pose())
print(world.scene.get_object(object_name=camera.name))

simulation_app.close()

The default backend is in-process and deterministic. To swap it out, pass a backend object with load_scene() and render() methods:

simulation_app = SimulationApp(config={"backend": custom_backend})

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

qhsim-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

qhsim-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file qhsim-0.1.0.tar.gz.

File metadata

  • Download URL: qhsim-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for qhsim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55987b397008d1e89b5f3ce633d0af50d98d0d02a704784685f0289830ca501d
MD5 52cf603feb10a2f3f76749a46c13d9ae
BLAKE2b-256 b27a90a34a4519d853a0a74d21b87dc0873dbe2a7fbbb39aab2a2d5243656c21

See more details on using hashes here.

File details

Details for the file qhsim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qhsim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for qhsim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7da2ef9867824582e0bfd4aff2c46754847feac4887cf45cfa6189003c23249d
MD5 a9db062318df3a225f72f3d331cbacfb
BLAKE2b-256 540e94d38449177609ab1c855308f85cb01a7c65b3467d8de89a68b71784af38

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