Creating a rosbag from images and imu data using bag.write
I have seen some examples of how to make a rosbag from images (https://answers.ros.org/question/1153...), but I don't know how to do this with imu data (or any other type of data). I don't want to use the rosbag record feature, I want to create the rosbag using data already on my computer and the bag.write method. Can someone please show me how to do this for imu data? I don't know what format the rosbag wants the imu data in. The documentation for rosbag is very limited.
I prefer using python, but if someone could show how to do it for both python and C++ that would be extra helpful.
Thank you so much in advance!