whoenig/crazyflie_ros

transfer quaternion into Euler angles in topic /tf

Closed this issue · 0 comments

Hi all, I use the launch file external_position_vicon.launch to do the autonomous flying. I echo the topic /tf using the rostopic echo /tf. The sample looks like:


transforms:

header: 
  seq: 0
  stamp: 
    secs: 1574817405
    nsecs: 846164606
  frame_id: "/world"
child_frame_id: "vicon/cf1/cf1"
transform: 
  translation: 
    x: 0.0220311362154
    y: 0.018269594248
    z: 0.015730223606
  rotation: 
    x: 0.0172112712763
    y: 0.0116523005586
    z: 0.0338153541435
    w: 0.999211948416

I can get the position and orientation of drone relative to the world frame.

For rotation(quaternion, I have one question: How can I transfer the quaternion into the rotation matrix R composed of three euler angles.