Skip to content

Commit e903a39

Browse files
tycho_recorder now records a seperate bag for full quality images
1 parent f5af5ea commit e903a39

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tycho_recorder/src/recorder_node

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ from std_msgs.msg import String
1010
class RosbagRecorder:
1111

1212
def __init__(self):
13-
self.process = None
13+
self.summary_process = None # recording the summary ROSBag: positions, compressed video
14+
self.video_process = None # recording the full resolution main camera
1415
self.is_recording = False
1516

1617

@@ -28,14 +29,16 @@ class RosbagRecorder:
2829
return
2930
rospy.loginfo(f"{rospy.get_caller_id()}: Starting recording")
3031
self.is_recording = True
31-
self.process = subprocess.Popen(["rosbag", "record", "-a", "-O", f"tycho-experiment-{datetime.datetime.now().strftime('%y%m%d-%H%M%S')}.bag"])
32+
self.summary_process = subprocess.Popen(["rosbag", "record", "-O", f"tycho-experiment-{datetime.datetime.now().strftime('%Y%m%d-%H%M%S')}-summary.bag", "-e", "/camera_(.)/camera/image_rect_color/compressed", "-e", "/camera_(.)/camera/camera_info", "-e", "/epuck_(.*)/odometry/filtered"])
33+
self.video_process = subprocess.Popen(["rosbag", "record", "-O", f"tycho-experiment-{datetime.datetime.now().strftime('%Y%m%d-%H%M%S')}-video.bag", "-e", "/camera_2/camera/image_rect_color", "-e", "/camera_(.)/camera/camera_info"])
3234

3335
def stop_recording(self):
3436
if not self.is_recording:
3537
return
3638
rospy.loginfo(f"{rospy.get_caller_id()}: Stopping recording")
3739
self.is_recording = False
38-
self.process.terminate()
40+
self.summary_process.terminate()
41+
self.video_process.terminate()
3942

4043
def start_listening():
4144
# In ROS, nodes are uniquely named. If two nodes with the same

0 commit comments

Comments
 (0)