It_Robotics_Pong_Robot/include/Kinematics.h

25 lines
901 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
#include <iostream>
#include "opencv2/opencv.hpp"
// Derece <-> Radyan dönüşüm fonksiyonları
float deg2rad(float angle);
float rad2deg(float angle);
// Yeni 4-eklemli robot için ileri kinematik (Forward Kinematics)
std::vector<float> computeForwardKinematics(float q1, float q2, float q3, float q4);
// Yeni 4-eklemli robot için ters kinematik (Inverse Kinematics)
std::vector<float> computeInverseKinematics(float x, float y);
// Jacobian matris fonksiyonları (isteğe bağlı olarak genişletilebilir)
std::vector<float> computeDifferentialKinematics(float q1, float q2, float L1, float L2);
int computeJacobianMatrixRank(std::vector<float> vJacobianMatrix, float threshold);
cv::Mat computeInverseJacobianMatrix(std::vector<float> vJacobianMatrix);
float getEndEffectorX();
float getEndEffectorY();