Ask Your Question

Revision history [back]

Rosbag has a C++ API that should allow you to open a new rosbag file, write the single motion plan, and close it. Code would be something like:

// Open new rosbag.
rosbag::Bag bag;
bag.open("test.bag", rosbag::bagmode::Write);

// Write the message.
bag.addMessage("my_lonely_topic", motionPlan_position);

// Close the bag:
bag.close();