Skip to main content

A set of classes for physcis variables

Project description

Physics Struct

A package containing set of classes for physics variables

Example

Create instance, default value is (0, 0, 0)

data = vector3D()
data2 = vector3D((1, 2, 3))

Assign new value, can be either list or tuple

data.set([2, 2, 2])

Get data, the function will return a np.array()

  • get_round() return a rounded value
  • dec (optional): the decimal point can be specified, default value is 2
data.get()
data.get_round()
data.get_round(dec= 5)

Print value of each dimension

  • dec (optional): set the decimal point, default value is 2
  • end (optional): same as 'end' parameter in a print() function
data.print()
data.pritn(dec= 3)

Other Classes in the 3D vector space

orientation = orientation_rpy()
# stored data in RPY as radian
# include .get_deg() which return the value in degree

velocity = cartesian_vector()
# stored data in XYZ
# include .rotate() to caluculate 3D Euler Rotation
# .set() include increment mode => .set(inc= True)

acc = IMU_acc()
# inherite cartesian_vector()
# .rotate() ignore yaw as IMU linear acceleration does

ROS2 Implementation

Some classes contain a method to transfer data from ROS2 geometry_msgs
geometry_msgs/msg/Vector3 can be use with cartesian_vector()

data = Vector3()
velocity.set_ros2_geometry_msgs_vector3(data)

geometry_msgs/msg/Quaternion can be use with orientation_rpy()

data2 = Quaternion()
orientation.set_ros2_geometry_msgs_quaternion(data2)

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

physicsstruct-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

physicsstruct-1.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file physicsstruct-1.1.0.tar.gz.

File metadata

  • Download URL: physicsstruct-1.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for physicsstruct-1.1.0.tar.gz
Algorithm Hash digest
SHA256 589ada410ae6e3d17910b3b56f1479f55052064bea86a60a829b9ea081b0a480
MD5 860f9f0bb186255301a4460950739a63
BLAKE2b-256 bbee300f67b15f8cddeb53462f8848b6b727b27579c993e2739256cd74e7d5fd

See more details on using hashes here.

File details

Details for the file physicsstruct-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: physicsstruct-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for physicsstruct-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d65e3cf821a3cd32edf990eb01b55392f7ccd714539d8433fa060d330a87226
MD5 3218c167499f3fad98c95882afca36e9
BLAKE2b-256 35f9277abd59f30a8d9fedf5b24ec6063670576a41ebbb13ae792b53ef979dab

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