correction IK

This commit is contained in:
Lucas MARAIS 2024-04-02 14:42:29 +02:00
parent bfb9c44dfd
commit 2493e2fe6b
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ float get_q1(float x, float y)
void posCMDCallback(const geometry_msgs::Point& joint_pos) void posCMDCallback(const geometry_msgs::Point& joint_pos)
{ {
float pos_x = joint_pos.x;
float pos_y = joint_pos.y;
if (sqrt(pow(joint_pos.x, 2) + pow(joint_pos.y, 2)) <= 120) if (sqrt(pow(joint_pos.x, 2) + pow(joint_pos.y, 2)) <= 120)
{ {
if (hitting_need == true) if (hitting_need == true)