dkes 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dkes-0.0.1/CHANGELOG.txt +1 -0
- dkes-0.0.1/LICENCE.txt +7 -0
- dkes-0.0.1/MANIFEST.in +1 -0
- dkes-0.0.1/PKG-INFO +28 -0
- dkes-0.0.1/README.txt +1 -0
- dkes-0.0.1/dkes/__init__.py +1 -0
- dkes-0.0.1/dkes/kinematics.py +31 -0
- dkes-0.0.1/dkes.egg-info/PKG-INFO +28 -0
- dkes-0.0.1/dkes.egg-info/SOURCES.txt +11 -0
- dkes-0.0.1/dkes.egg-info/dependency_links.txt +1 -0
- dkes-0.0.1/dkes.egg-info/top_level.txt +1 -0
- dkes-0.0.1/setup.cfg +4 -0
- dkes-0.0.1/setup.py +24 -0
dkes-0.0.1/CHANGELOG.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Initial commit.
|
dkes-0.0.1/LICENCE.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2026 Stijn Oude Groeniger
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
dkes-0.0.1/MANIFEST.in
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
global-include *.txt *.py
|
dkes-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dkes
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: D4tadriven's Kinematics Essentials (DKE) is a Python package that provides essential functions for calculating the inverse kinematics of a 2D robotic arm with two links. It allows users to determine the joint angles required to position the end effector at a specified (X, Y) coordinate in a 2D plane.
|
|
5
|
+
Home-page: https://github.com/d4tadriven/dkes
|
|
6
|
+
Author: Stijn Oude Groeniger
|
|
7
|
+
Author-email: d4tadriven@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: kinematics robotics inverse-kinematics robotic-arm
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
License-File: LICENCE.txt
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: keywords
|
|
22
|
+
Dynamic: license
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
This is a test library
|
|
27
|
+
|
|
28
|
+
Initial commit.
|
dkes-0.0.1/README.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is a test library
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .kinematics import inverse_kinematics
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import math
|
|
2
|
+
|
|
3
|
+
def inverse_kinematics(XPos, YPos, l1=100, l2=100):
|
|
4
|
+
|
|
5
|
+
# distance from origin
|
|
6
|
+
r = math.hypot(XPos, YPos)
|
|
7
|
+
|
|
8
|
+
# check if the point is reachable
|
|
9
|
+
if r > l1 + l2:
|
|
10
|
+
print("Target is out of reach.")
|
|
11
|
+
exit()
|
|
12
|
+
|
|
13
|
+
# calculate angle 2
|
|
14
|
+
cos2 = (XPos**2 + YPos**2 - l1**2 - l2**2) / (2 * l1 * l2)
|
|
15
|
+
|
|
16
|
+
# Clamp to avoid floating point errors
|
|
17
|
+
cos2 = max(-1, min(1, cos2))
|
|
18
|
+
|
|
19
|
+
theta2 = math.acos(cos2)
|
|
20
|
+
|
|
21
|
+
# calculate angle 1
|
|
22
|
+
theta1 = math.atan2(YPos, XPos) - math.atan2(
|
|
23
|
+
l2 * math.sin(theta2),
|
|
24
|
+
l1 + l2 * math.cos(theta2)
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# convert to degrees
|
|
28
|
+
theta1_deg = math.degrees(theta1)
|
|
29
|
+
theta2_deg = math.degrees(theta2)
|
|
30
|
+
|
|
31
|
+
return theta1_deg, theta2_deg
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dkes
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: D4tadriven's Kinematics Essentials (DKE) is a Python package that provides essential functions for calculating the inverse kinematics of a 2D robotic arm with two links. It allows users to determine the joint angles required to position the end effector at a specified (X, Y) coordinate in a 2D plane.
|
|
5
|
+
Home-page: https://github.com/d4tadriven/dkes
|
|
6
|
+
Author: Stijn Oude Groeniger
|
|
7
|
+
Author-email: d4tadriven@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: kinematics robotics inverse-kinematics robotic-arm
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
License-File: LICENCE.txt
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: keywords
|
|
22
|
+
Dynamic: license
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
This is a test library
|
|
27
|
+
|
|
28
|
+
Initial commit.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dkes
|
dkes-0.0.1/setup.cfg
ADDED
dkes-0.0.1/setup.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
classifiers = [
|
|
4
|
+
'Development Status :: 5 - Production/Stable',
|
|
5
|
+
'Intended Audience :: Education',
|
|
6
|
+
'Operating System :: Microsoft :: Windows :: Windows 10',
|
|
7
|
+
'License :: OSI Approved :: MIT License',
|
|
8
|
+
'Programming Language :: Python :: 3'
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
setup(
|
|
12
|
+
name='dkes',
|
|
13
|
+
version='0.0.1',
|
|
14
|
+
description="D4tadriven's Kinematics Essentials (DKE) is a Python package that provides essential functions for calculating the inverse kinematics of a 2D robotic arm with two links. It allows users to determine the joint angles required to position the end effector at a specified (X, Y) coordinate in a 2D plane.",
|
|
15
|
+
long_description=open('README.txt').read() + '\n\n' + open('CHANGELOG.txt').read(),
|
|
16
|
+
url="https://github.com/d4tadriven/dkes",
|
|
17
|
+
author='Stijn Oude Groeniger',
|
|
18
|
+
author_email='d4tadriven@gmail.com',
|
|
19
|
+
license='MIT',
|
|
20
|
+
classifiers=classifiers,
|
|
21
|
+
keywords='kinematics robotics inverse-kinematics robotic-arm',
|
|
22
|
+
packages=find_packages(),
|
|
23
|
+
install_requires=['']
|
|
24
|
+
)
|