I am using rosbag from Command line in ROS Noetic. When I record the data using rosbag record -a, I can normally analyze data with Matlab using the function canTransform/getTransform to retrieve the transform between two random reference frames.
I decided to try to obtain a smaller bagfile by neglecting topic I don't need. With the same setup, and following the same launch orders, I tried to userosbag record tf tf_static <other topics from rostopic list>. In this case, the bagfile object in matlab seems to have the same structure, but it misses the field "AvailableFrames": then, canTransform always result in a 0, which means no transform exists between the reference frames, even if the parent/child transforms seem to be correctly strored in the bagfile object. Moreover, the same problem happens when I use rosbag record <whole rostopic list output> in the command line, so I don't think it is a matter of missing relevant topics for the canTransform/getTransform function.
Any idea about possible reasons?
I think there are two cases:
the info which is supposed to fill the Matlab BagSelection object property "AvailableFrames" is missing in the bagfile itself when it is recorded without -a option: in this case, whythis happens? And how to solve it?
the info is in the bagfile, but Matlab for some reasons can access that info for a file recorded with -a option, but not for a file recorded by listing the topics in command line (if this is the case, I will I contact Mathworks).
Good evening,
I am using rosbag from Command line in ROS Noetic. When I record the data using
rosbag record -a
, I can normally analyze data with Matlab using the function canTransform/getTransform to retrieve the transform between two random reference frames.I decided to try to obtain a smaller bagfile by neglecting topic I don't need. With the same setup, and following the same launch orders, I tried to use
rosbag record tf tf_static <other topics from rostopic list>
. In this case, the bagfile object in matlab seems to have the same structure, but it misses the field "AvailableFrames": then, canTransform always result in a 0, which means no transform exists between the reference frames, even if the parent/child transforms seem to be correctly strored in the bagfile object. Moreover, the same problem happens when I userosbag record <whole rostopic list output>
in the command line, so I don't think it is a matter of missing relevant topics for the canTransform/getTransform function.Any idea about possible reasons?
I think there are two cases:
the info which is supposed to fill the Matlab BagSelection object property "AvailableFrames" is missing in the bagfile itself when it is recorded without -a option: in this case, whythis happens? And how to solve it?
the info is in the bagfile, but Matlab for some reasons can access that info for a file recorded with -a option, but not for a file recorded by listing the topics in command line (if this is the case, I will I contact Mathworks).
Thanks in advance