From d28a474698f541672e628f110ec13b9e1945ec28 Mon Sep 17 00:00:00 2001 From: Sharwin24 Date: Tue, 25 Feb 2025 11:44:10 -0600 Subject: [PATCH] math constants --- content/posts/delta-robot/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/posts/delta-robot/index.md b/content/posts/delta-robot/index.md index 08cced2..840ec09 100644 --- a/content/posts/delta-robot/index.md +++ b/content/posts/delta-robot/index.md @@ -36,6 +36,13 @@ The forward and inverse kinematics were then implemented in C++ following the ap // this->SB = Base Side Length [mm] // this->SP = Platform (EE) Side Length [mm] + const float sqrt3 = sqrt(3.0); + const float sin120 = sqrt3 / 2.0; + constexpr float cos120 = -0.5; + const float tan60 = sqrt3; + constexpr float sin30 = 0.5; + const float tan30 = 1 / sqrt3; + void DeltaKinematics::forwardKinematics(const std::shared_ptr request, std::shared_ptr response) { // Locally save the request data (joint angles) float theta1 = request->joint_angles.theta1;