atenpas / gpd

Detect 6-DOF grasp poses in point clouds
BSD 2-Clause "Simplified" License
606 stars 233 forks source link

How to convert the orientation of GraspConfig to quaternion #76

Open kctoayo88 opened 5 years ago

kctoayo88 commented 5 years ago

Hello,

I tried to do this repo with my robot and camera. Then, I want to get the orientation of GraspConfig to move my robot, and I found it's a vector. so, I guess it's RPY value and convert it to quaternion with static Euler angle xyz.

top_grasp_orientation = quaternion_from_euler(top_grasp.approach.x, top_grasp.approach.y, top_grasp.approach.z, axes='sxyz')

But the direction of result is wrong. gpd1

Could you help me to find the correct orientation of approach ?

Thanks a lot

atenpas commented 4 years ago

I think you are not doing the conversion correctly. It seems that you are trying to convert a single column of a rotation matrix to a quaternion. You should convert the complete matrix.