Commit Β·
d4fd416
1
Parent(s): 6648f22
fixed gradio version
Browse files
README.md
CHANGED
|
@@ -23,7 +23,6 @@ license: mit
|
|
| 23 |
pinned: true
|
| 24 |
short_description: Interactive 2-DOF robotic arm simulator with real-time inver
|
| 25 |
---
|
| 26 |
-
|
| 27 |
<!--
|
| 28 |
SEO: Interactive Arm Simulator, 2-DOF robotic arm, inverse kinematics, python gradio app, robotics education, interactive simulation, arm kinematics visualization, open source robotics tool, robot arm math, educational robotics, engineering demo, real-time robotics, STEM learning
|
| 29 |
Description: Interactive Arm Simulator is a Python Gradio app for simulating and visualizing the inverse kinematics of a 2-DOF robotic arm. Adjust controls, see real-time results, and learn the math behind robotic arms. Perfect for education, demos, and open source robotics projects.
|
|
@@ -75,24 +74,17 @@ This app calculates the joint angles needed for a 2-link arm to reach a target p
|
|
| 75 |
|
| 76 |
**1. Elbow Angle ($q_2$):**
|
| 77 |
Uses the Law of Cosines:
|
| 78 |
-
|
| 79 |
$$ \cos(q_2) = \frac{x^2 + y^2 - L_1^2 - L_2^2}{2L_1L_2} $$
|
| 80 |
-
|
| 81 |
**2. Shoulder Angle ($q_1$):**
|
| 82 |
Combines the angle to the target and the triangle's internal angle:
|
| 83 |
-
|
| 84 |
$$ q_1 = \alpha - \beta $$
|
| 85 |
Where:
|
| 86 |
- $\alpha = \text{atan2}(y, x)$ (angle to target)
|
| 87 |
- $\beta = \text{atan2}(L_2 \sin(q_2), L_1 + L_2 \cos(q_2))$
|
| 88 |
-
|
| 89 |
If the target is unreachable, the app shows a warning and marks it in red.
|
| 90 |
-
|
| 91 |
---
|
| 92 |
-
|
| 93 |
## π Copy the Core Python Function
|
| 94 |
The app includes a dropdown with the following code for your use:
|
| 95 |
-
|
| 96 |
```python
|
| 97 |
def inver_k(l1, l2, x, y):
|
| 98 |
"""
|
|
@@ -116,7 +108,6 @@ def inver_k(l1, l2, x, y):
|
|
| 116 |
q1 = alpha - beta
|
| 117 |
return (True, q1, q2)
|
| 118 |
```
|
| 119 |
-
|
| 120 |
---
|
| 121 |
|
| 122 |
## π Credits
|
|
|
|
| 23 |
pinned: true
|
| 24 |
short_description: Interactive 2-DOF robotic arm simulator with real-time inver
|
| 25 |
---
|
|
|
|
| 26 |
<!--
|
| 27 |
SEO: Interactive Arm Simulator, 2-DOF robotic arm, inverse kinematics, python gradio app, robotics education, interactive simulation, arm kinematics visualization, open source robotics tool, robot arm math, educational robotics, engineering demo, real-time robotics, STEM learning
|
| 28 |
Description: Interactive Arm Simulator is a Python Gradio app for simulating and visualizing the inverse kinematics of a 2-DOF robotic arm. Adjust controls, see real-time results, and learn the math behind robotic arms. Perfect for education, demos, and open source robotics projects.
|
|
|
|
| 74 |
|
| 75 |
**1. Elbow Angle ($q_2$):**
|
| 76 |
Uses the Law of Cosines:
|
|
|
|
| 77 |
$$ \cos(q_2) = \frac{x^2 + y^2 - L_1^2 - L_2^2}{2L_1L_2} $$
|
|
|
|
| 78 |
**2. Shoulder Angle ($q_1$):**
|
| 79 |
Combines the angle to the target and the triangle's internal angle:
|
|
|
|
| 80 |
$$ q_1 = \alpha - \beta $$
|
| 81 |
Where:
|
| 82 |
- $\alpha = \text{atan2}(y, x)$ (angle to target)
|
| 83 |
- $\beta = \text{atan2}(L_2 \sin(q_2), L_1 + L_2 \cos(q_2))$
|
|
|
|
| 84 |
If the target is unreachable, the app shows a warning and marks it in red.
|
|
|
|
| 85 |
---
|
|
|
|
| 86 |
## π Copy the Core Python Function
|
| 87 |
The app includes a dropdown with the following code for your use:
|
|
|
|
| 88 |
```python
|
| 89 |
def inver_k(l1, l2, x, y):
|
| 90 |
"""
|
|
|
|
| 108 |
q1 = alpha - beta
|
| 109 |
return (True, q1, q2)
|
| 110 |
```
|
|
|
|
| 111 |
---
|
| 112 |
|
| 113 |
## π Credits
|