Skip to main content

Python bindings for the GAFRO geometric-algebra robotics library

Project description

gafropy

Python bindings for the GAFRO geometric-algebra library.

gafropy mirrors the binding surface exposed by gafrojs: one Python class per concrete C++ wrapper, with no template variants or operator overloads. The intent is to expose CGA primitives (Point, Vector, Rotor, Translator, Motor, Line, Plane, Sphere, Circle, PointPair, FlatPoint, DirectionVector, TangentVector, Dilator, Transversion) and the robot System (loaded from URDF/MJCF/YAML) in an ergonomic Python API.

Visualization-specific methods (anything tied to three.js in gafrojs) are not bound. Methods that return arrays/matrices return numpy.ndarray.

Install (from source)

pip install -v .

The build pulls gafro, gafro_robot_descriptions, eigen3, yaml-cpp, tinyxml2, behemoth and sackmesser via CMake FetchContent, the same way gafrojs does.

Usage

import gafropy as ga

p = ga.Point(1.0, 0.0, 0.0)
r = ga.Rotor.from_angle_axis(0.5, 0.0, 0.0, 1.0)
t = ga.Translator(0.0, 0.0, 0.1)
m = ga.Motor(r, t)
p2 = p.apply(m)
print(p2.to_array())   # numpy.ndarray, shape (3,)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

gafropy-2.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file gafropy-2.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gafropy-2.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2827cd33bfdd4bc345af5991c2684cb597e1363b174f0f43b2531f1ff6b13de9
MD5 8bb4d9cc18478fb509831472909f8bc5
BLAKE2b-256 a24d841a02357ea59a90aa18766506e6a9dc113b304ac425b0efaf050971a095

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