# quaternion_actionlib

Hi every body.

I am trying to run a small application using actionlib. I convert in a callback function, degrees to quaternions, as it is shown in the following piece of code:

```
double th=D2R*(atan2( msg.pose.pose.orientation.y, msg.pose.pose.orientation.y));
geometry_msgs::Quaternion gth = tf::createQuaternionMsgFromYaw(th);
```

Then, I am trying to assign that quaternion as it follows:

```
move_base_msgs::MoveBaseGoal goal;
goal.target_pose.pose.orientation.w =gth;
```

Then I get the error:

```
cannot convert ‘geometry_msgs::Quaternion’ to ‘geometry_msgs::Quaternion_<std::allocator<void> >::_w_type {aka double}’ in assignment
```

Can anybody give me a clue, in advance thank you