Skip to content

Getting garbage roll , pitch and yaw values  #21

@Akumar201

Description

@Akumar201

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions