Skip to main content

Kinematics/geometric primitives

Project description

This is the Kinematics/Geometric primitives Python package.

This project provides some types and functions to represent entities like rigid bodies, frames, points, rigid motions.

Most of the types are purely symbolic placeholders, and are meant to be used for building models, with Python.

The ct package contains facilities to model coordinate-transforms, and also to get concrete matrix representations.

Code documentation

API and package documentation is hosted here.

The HTML docs are generated from the docstrings in the source code, using pdoc.

You can generate the docs offline from your working copy, with something like:

cd src/
pdoc --no-show-source -o /tmp/docs kgprim/ motiondsl/

Installation

pip install kgprim

To install from source (usually more up-to-date than the PyPi package):

git clone <repo> kgprim    # replace <repo> with the right URL
cd kgprim/
pip install .              # should also fetch and install the dependencies

Before doing the above, you might want to set up a Python3 virtual environment:

mkdir myvenv && python3 -m venv myvenv
source myvenv/bin/activate  # may need to pick another script depending on your shell

Dependencies

Python > 3.3

Python packages:

  • NetworkX

  • SymPy, for the representation of variables, parameters and constants in the values module. Also for the symbolic matrix representation of coordinate transforms.

  • NumPy, for the numerical matrix representation of coordinate transforms.

  • textX, for the grammar of the MotionDSL language (required by the motiondsl package only).

Testing

Testing code is based on the unittest framework from the standard library. After installation (see above), one may run all the tests with something like:

python -m unittest discover --start-directory test/ --pattern '*.py'

The test modules can also be executed individually, e.g.:

python test/ct/testcore.py

# or
python -m test.ct.testcore

# or
python -m unittest test.ct.testcore

The module test/ct/testcore.py is a test suite for the kgprim.ct package which indirectly also covers the kgprim.motions module.

Similarly, the test/values.py performs some simple tests on the types defined in the kgprim.values module.

The package test/motiondsl has tests for the motiondsl package, though it may also involve kgprim.ct.

License

Copyright 2020-2024, Marco Frigerio

Distributed under the BSD 3-clause license. See the LICENSE file for more details.

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

kgprim-0.1.3.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

kgprim-0.1.3-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file kgprim-0.1.3.tar.gz.

File metadata

  • Download URL: kgprim-0.1.3.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for kgprim-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ec75e7d324f1bf69a010986bdecd920127df86859f9b33fea8974c2a98581614
MD5 d739a49d7f04f1e83574a288011c267f
BLAKE2b-256 fbf84445480355d54998f28104b09eda67bf329ad124fa242990dd7564a93603

See more details on using hashes here.

File details

Details for the file kgprim-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: kgprim-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for kgprim-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d05e546f5890dc6d1adc5f0d6ecdb9676de007b7cd3cd7b6862db5c1bebd398b
MD5 b3ac79b0fccf05d779d9669161f4cc13
BLAKE2b-256 bed3763ca674675ddda576d5089815a47e00786ced017e4f4663ebc1c9846a62

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