Closed anuppari closed 3 years ago
Lines 28-31 in mocap_datapackets.cpp incorrectly transform the quaternion. In order to swap the y & z axes, it should be something like this:
factor = sqrt(2)/2; //quaternion for swapping y & z axes is [w,x,y,z]=[sqrt(2)/2,sqrt(2)/2,0,0]
ros_pose.orientation.x = factor*(pose.orientation.x+pose.orientation.w); ros_pose.orientation.y = factor*(pose.orientation.y-pose.orientation.z); ros_pose.orientation.z = factor*(pose.orientation.z+pose.orientation.y); ros_pose.orientation.w = factor*(pose.orientation.w-pose.orientation.x);
ros_pose.orientation.x = factor*(pose.orientation.x+pose.orientation.w);
ros_pose.orientation.y = factor*(pose.orientation.y-pose.orientation.z);
ros_pose.orientation.z = factor*(pose.orientation.z+pose.orientation.y);
ros_pose.orientation.w = factor*(pose.orientation.w-pose.orientation.x);
Closing due to inactivity. Please feel free to re-open if issue persists.
Lines 28-31 in mocap_datapackets.cpp incorrectly transform the quaternion. In order to swap the y & z axes, it should be something like this:
factor = sqrt(2)/2; //quaternion for swapping y & z axes is [w,x,y,z]=[sqrt(2)/2,sqrt(2)/2,0,0]
ros_pose.orientation.x = factor*(pose.orientation.x+pose.orientation.w);
ros_pose.orientation.y = factor*(pose.orientation.y-pose.orientation.z);
ros_pose.orientation.z = factor*(pose.orientation.z+pose.orientation.y);
ros_pose.orientation.w = factor*(pose.orientation.w-pose.orientation.x);