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

Revision history [back]

click to hide/show revision 1
initial version

A PoseWithCovariance consists of: an XYZ position, a Quaternion representing the orientation, and a 6x6 matrix representing the positional and angular uncertainty.

The XYZ position is simple. Note that the units should be in meters.

Quaternions are an alternate method of representing orientation, which are more mathematically stable than euler angles (roll, pitch and yaw) or rotation matrices. You can use the tf library to create a quaternion given the Euler anlges:

geometry_msgs::Quaternion   tf::createQuaternionMsgFromRollPitchYaw (double roll, double pitch, double yaw)

The 6x6 covariance matrix represents the position and orientation covariance between the x, y, z, roll, pitch and yaw variables. If you don't have this or don't care about it for your application, you can leave it as zeroes.