Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dexbotic/exp/navila_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def map_string_to_action(s):

try:
actions = [map_string_to_action(outputs)]
except:
except Exception:
actions = [1]

queue_actions = []
Expand All @@ -401,7 +401,7 @@ def map_string_to_action(s):
try:
match = re.search(r"move forward (\d+) cm", outputs)
distance = int(match.group(1))
except:
except Exception:
distance = 25
if (distance % 25) != 0:
distance = min([25, 50, 75], key=lambda x: abs(x - distance))
Expand All @@ -412,7 +412,7 @@ def map_string_to_action(s):
try:
match = re.search(r"turn left (\d+) degree", outputs)
degree = int(match.group(1))
except:
except Exception:
degree = 15
if (degree % 15) != 0:
degree = min([15, 30, 45], key=lambda x: abs(x - degree))
Expand All @@ -423,7 +423,7 @@ def map_string_to_action(s):
try:
match = re.search(r"turn right (\d+) degree", outputs)
degree = int(match.group(1))
except:
except Exception:
degree = 15
if (degree % 15) != 0:
degree = min([15, 30, 45], key=lambda x: abs(x - degree))
Expand Down
2 changes: 1 addition & 1 deletion dexbotic/exp/rl/rl_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def batch_segment(
return [batch]
try:
original_batch_size = int(original_batch_size)
except:
except Exception:
pass
rollout_num = original_batch_size // num_segment
batch_out = []
Expand Down
2 changes: 1 addition & 1 deletion hardware/so101/bridge_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def Ready(self, request, context):
self.shutdown_event.clear()
try:
cv2.destroyAllWindows()
except:
except Exception:
pass
return services_pb2.Empty()

Expand Down
2 changes: 1 addition & 1 deletion hardware/so101/convert_so101_to_dexdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_task_list(meta_dir):
try:
info = json.loads(line)
tasks.append(info.get("task", info.get("instruction", "")))
except:
except Exception:
continue
return tasks

Expand Down