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

I found out I have to read the messages as structures as in this example.

bSel = select(bag, 'Topic', '/amcl_pose');

msgStructs = readMessages(bSel, 'DataFormat', 'struct');

I am then able to read amcl_pose as a struct and can then extract the first covariance matrix by

msgStructs{1}.Pose.Covariance

I now have to iterate through all the matrices and concatenate them in order to plot their values.

I found out I have to read the messages as structures as in this example.

bSel = select(bag, 'Topic', '/amcl_pose');

msgStructs = readMessages(bSel, 'DataFormat', 'struct');

'struct');

I am then able to read amcl_pose as a struct and can then extract the first covariance matrix by

msgStructs{1}.Pose.Covariance

I now have to iterate through all the matrices and concatenate them in order to plot their values.