jacodd commited on
Commit
db29aad
·
verified ·
1 Parent(s): 9869d0d

Update utils/bag_extractor.py

Browse files
Files changed (1) hide show
  1. utils/bag_extractor.py +6 -8
utils/bag_extractor.py CHANGED
@@ -33,10 +33,10 @@ class BagDatasetExtractor:
33
 
34
  # Dynamic Mappings
35
  '''
36
- 11225069610@A70i:~/Desktop/BEV_EDL/data/bags$ ros2 topic echo --once /bev/semantic_labels
37
  data: '{"0":{"class":"BACKGROUND"},"1":{"class":"UNLABELLED"},"2":{"class":"leaf"},"3":{"class":"branch"},"4":{"class":"weed"},"5":{"cl...'
38
  ---
39
- 11225069610@A70i:~/Desktop/BEV_EDL/data/bags$ ros2 topic echo --once /bev/semantic_labels_bb
40
  data: '{"0":{"class":"ground"},"1":{"class":"leaf"},"2":{"class":"branch"},"3":{"class":"weed"},"4":{"class":"obstacle"},"time_stamp":{...'
41
  ---
42
 
@@ -211,18 +211,16 @@ class BagDatasetExtractor:
211
  self.frame_idx += 1
212
 
213
  if __name__ == "__main__":
214
- BAGS_DIR = "/home/11225069610/Desktop/BEV_EDL/data/bags"
215
- OUTPUT_DIR = "/home/11225069610/Desktop/bag_extract/"
216
- LIDAR_TRANSFORM_PATH = "/home/11225069610/Desktop/BEV_EDL/data/lidar.yaml"
217
- CAMERA_TRANSFORM_PATH = "/home/11225069610/Desktop/BEV_EDL/data/camera.yaml"
218
 
219
  # Find all bags in the directory
220
  bag_paths = sorted(glob.glob(os.path.join(BAGS_DIR, "*")))
221
 
222
  if not bag_paths:
223
  print(f"No bags found in {BAGS_DIR}")
224
-
225
- bag_paths = ["/home/11225069610/Desktop/rosbag2_2026_03_27-16_05_37"]
226
 
227
  current_frame_idx = 0
228
  for bag_path in bag_paths:
 
33
 
34
  # Dynamic Mappings
35
  '''
36
+ $ ros2 topic echo --once /bev/semantic_labels
37
  data: '{"0":{"class":"BACKGROUND"},"1":{"class":"UNLABELLED"},"2":{"class":"leaf"},"3":{"class":"branch"},"4":{"class":"weed"},"5":{"cl...'
38
  ---
39
+ $ ros2 topic echo --once /bev/semantic_labels_bb
40
  data: '{"0":{"class":"ground"},"1":{"class":"leaf"},"2":{"class":"branch"},"3":{"class":"weed"},"4":{"class":"obstacle"},"time_stamp":{...'
41
  ---
42
 
 
211
  self.frame_idx += 1
212
 
213
  if __name__ == "__main__":
214
+ BAGS_DIR = "bags"
215
+ OUTPUT_DIR = "dataset/"
216
+ LIDAR_TRANSFORM_PATH = "lidar.yaml"
217
+ CAMERA_TRANSFORM_PATH = "camera.yaml"
218
 
219
  # Find all bags in the directory
220
  bag_paths = sorted(glob.glob(os.path.join(BAGS_DIR, "*")))
221
 
222
  if not bag_paths:
223
  print(f"No bags found in {BAGS_DIR}")
 
 
224
 
225
  current_frame_idx = 0
226
  for bag_path in bag_paths: