Strange orientation information from Gazebo ROS topics

asked 2018-04-20 04:01:53 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am trying to publish tf frame of a gazebo model. I get position and orientation of model from "/gazebo/link_states" topic, calculate a frame with respect to world frame and broadcast it. For now i just insert model from Gazebo gui. This works fine with xyz position but when i change orientation from gui i see strange numbers in ROS topics. Topics publish correct quaternion values when i set RPY values individually (like 0,1.5707,0). But when i set two or more values in the same time quaternion is wrong. XYZ position is (0,0,0) for following experiments.

RPY: {1.5707, 1.5707, 0} Expected Quaternion: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} Gazebo Given Quaterion: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}

RPY: {1.5707, 1.5707, 1.5707} Expected Quaternion: {x: 0.7, y: 0.0, z: 0.7, w: 0.0} Gazebo Given Quaterion: {x: 0.0, y: 0.7, z: 0.0, w: 0.7}

It looks like a newbie problem but i couldn't get over it.

edit retag flag offensive close merge delete