# Revision history [back]

The orientation that your node is publishing isn't a valid quaternion.

The details of quaternions are too complex to explain here, but there's a nice tutorial on them: http://wiki.ros.org/Tutorials/Quaternions

The short version is that you should initialize the w part of your quaternion to 1.0 or use a function to create your quaterninon instead of just setting the z value:

initPose_.pose.pose.orientation.w = 1.0;


or

initPose_.pose.pose.orientation = tf::createQuaternionFromRPY(0.0, 0.0, 0.0);


or

initPose_.pose.pose.orientation = tf::createQuaternionFromYaw(0.0);


Note that if you want to use the tf convenience functions for creating quaternions, you'll want to include the appropriate tf header and add a dependency on tf to your CMakeLists.txt