Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting garbage roll , pitch and yaw values #21

Open
Akumar201 opened this issue Jun 26, 2024 · 0 comments
Open

Getting garbage roll , pitch and yaw values #21

Akumar201 opened this issue Jun 26, 2024 · 0 comments

Comments

@Akumar201
Copy link

I have created a code to get the robotic arm position, but when I am printing the values of x, y and z I am getting correct values but the roll , pitch and yaw is garbage values
Please let me know if there is another service for getting the correct roll, pitch and yaw

this is the function


bool RoboticArmController::getPosition(std::vector<float> &position)
{
   // STEP 7: Get current position
   if (get_position_client_.call(get_position_srv_))
   {
       position = get_position_srv_.response.datas;
   }
   else
   {
       ROS_ERROR("Failed to call service get_position_rpy");
       return false;
   }

   return true;
}

this is the code where I am printing it


       if (!arm_controller.getPosition(curr_pos))
       {

           ROS_ERROR("Failed to get current position. Exiting.");
           return 1;
       }
       // std::cout << "Current Pos is " << curr_pos << std::endl;

       for (auto c : curr_pos)
       {

           std::cout << c << std::endl;
       }


I am getting correct x, y and z but garbage roll pitch and yaw

bash[91871]: 177.778
bash[91871]: -205.09
bash[91871]: -350.83
bash[91871]: 2.41197e-07
bash[91871]: 2.33488e-07
bash[91871]: -3.2904e-07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant