Bag created with rosbag api is not publishing
I am new to ROS. I am attempting to take pointcloud data that is in a format not compatible with ROS and convert it to a ROS bag using the C++ rosbag API. I am having an issue with the newly created bag not publishing data to the topic. For example, whenever I use the command "rostopic echo my_topic" while playing the bag with "rosbag play newConverted.bag" there is nothing printed to the console.
If I open the newConverted.bag with rqt_bag, right click on a topic and select publish, the data is then published to the topic and I can see it in rviz and with the rosbag echo command as expected.
I must be missing something in my bag conversion code that tells ROS to automatically publish the topic when playing. Thoughts?
Edit:
$ rosbag info newConverted.bag
path: newConverted.bag
version: 2.0
duration: 15:00s (900s)
start: Jan 08 2019 11:11:02.93 (1546963862.93)
end: Jan 08 2019 11:26:03.04 (1546964763.04)
size: 423.1 MB
messages: 67496
compression: none [557/557 chunks]
types: sensor_msgs/Imu [6a62c6daae103f4ff57a132d6f95cec2]
sensor_msgs/MagneticField [2f3b0b43eed0c9501de0fa3ff89a45aa]
sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
topics: cloud_1 11250 msgs : sensor_msgs/PointCloud2
cloud_2 11248 msgs : sensor_msgs/PointCloud2
imu/data_raw 22499 msgs : sensor_msgs/Imu
imu/mag 22499 msgs : sensor_msgs/MagneticField
Can you post what shows up in the terminal if you type
rosbag info newConverted.bag
?