ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Check out the message doc here

Afaik, there is no difference between arduino or regular C++ in this case. Do something along the lines of

pose_msg.position.x = 1.0
pose_msg.position.y = 2.0
pose_msg.position.z = 3.0
pose_msg.orientation.x = 4.0
pose_msg.orientation.y = 5.0
pose_msg.orientation.z = 6.0
pose_msg.orientation.w = 7.0

But make sure, that your quaternion is normalized, which it isn't in the example above! Also, check again the documentation of how to set up your publishers. What you have there is not correct....