Skip to main content

An extension of dqrobotics to use matplotlib.pyplot to plot DQ elements.

Project description

pyplot extensions to dqrobotics

License

LGPL

Installation

python3 -m pip install dqrobotics-pyplot

Calling example

After installation, the example script can be called with

dqrobotisc_pyplot_example

Usage example

See the script in

src/dqrobotics_extensions/pyplot/example.py

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L31-L67

Importing the library

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L24-L25

Seting up the plot

dqrobotics-pyplot uses matplotlib.pyplot, so always remember to create a proper figure and axes with projection='3d''. Other settings are a matter of taste and desired quality.

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L33-L36

Drawing a pose

Calling dqp.plot() without additional settings with a DQ argument will result in a reference-frame-type plot.

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L44-L48

Drawing a line

Call dqp.plot() with line=True to plot a line.

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L50-L54

Drawing a plane

Call dqp.plot() with plane=True to plot a plane.

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L56-L60

Drawing a manipulator

Call dqp.plot() with a DQ_SerialManipulator as argument and always remember to set the q argument, which should be a suitable np.array.

https://github.com/MarinhoLab/dqrobotics-pyplot/blob/7f8a4b02ef1f2e03bdcafa551b3ea8beadfdcf61/src/dqrobotics_extensions/pyplot/example.py#L62-L65

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

dqrobotics_pyplot-25.4.0.13.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

dqrobotics_pyplot-25.4.0.13-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file dqrobotics_pyplot-25.4.0.13.tar.gz.

File metadata

  • Download URL: dqrobotics_pyplot-25.4.0.13.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dqrobotics_pyplot-25.4.0.13.tar.gz
Algorithm Hash digest
SHA256 273b1c71173cfdfc56551b5f57c1b3cfbcad08dcb3a125eba444380c6a6659a3
MD5 a6e8fc5cebe2b398678ebedc4916ab2a
BLAKE2b-256 6601237edea4cfd93f698fe27379a0a1e50d7ca086208be3ff1e3504d5066960

See more details on using hashes here.

Provenance

The following attestation bundles were made for dqrobotics_pyplot-25.4.0.13.tar.gz:

Publisher: python-publish.yml on MarinhoLab/dqrobotics-pyplot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dqrobotics_pyplot-25.4.0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for dqrobotics_pyplot-25.4.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 867caccb91c676e92cef42a4f6d7a53fe749d75315e5a74e9a695a91c4ecdca2
MD5 d0a2d95188305573bb9b2057009f352a
BLAKE2b-256 3caed9d173f1fc6eb9f44b8ce0249230ca2b4e08c6cb6301b7e7ff1aa88e4ff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dqrobotics_pyplot-25.4.0.13-py3-none-any.whl:

Publisher: python-publish.yml on MarinhoLab/dqrobotics-pyplot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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