Hello everyone,
I am trying to record a snapshot of topics when I used a button of my joypad. A naive approach consist to specify a topic trigger for rosbag record.
I found something look good in the source code (github.com/ros/ros_comm/blob/groovy-devel/tools/rosbag/src/recorder.cpp) :
if (options_.snapshot)
{
record_thread = boost::thread(boost::bind(&Recorder::doRecordSnapshotter, this));
// Subscribe to the snapshot trigger
trigger_sub = nh.subscribe<std_msgs::Empty>("snapshot_trigger", 100, boost::bind(&Recorder::snapshotTrigger, this, _1));
}
but I don't understand how to use this option !
Maybe someone can help me or suggest another way to capture topics when I want ?
Thanks
best regards
Originally posted by Jérôme on ROS Answers with karma: 36 on 2013-06-10
Post score: 0
Original comments
Comment by Procópio on 2013-06-10:
what is the format you want for your snapshot? another bag file? or you just want to store the data, in a txt file, for example?
Comment by Jérôme on 2013-06-11:
Thanks for you answer, I want to keep the bag file format, I know it's possible to develop something to do that, but if it's possible I prefer to use a standard way (like a rosbag record with option) !