mirror of
https://github.com/rndlabsoy/fly-brain-full.git
synced 2026-09-10 11:20:43 +02:00
Fix crash when running without --flight flag and Unicode crash on Windows
- fly_embodied.py: fly_name was only assigned inside the `if args.flight` block but used unconditionally by the proboscis joint lookup. Added fly_name = fly.name before the proboscis section. - benchmark.py: replaced Unicode checkmark/cross (U+2713/U+2717) with ASCII "OK"/"FAIL" to prevent encoding crash on Windows consoles.
This commit is contained in:
+1
-1
@@ -217,7 +217,7 @@ def print_summary_table(all_results, backend_name, logger):
|
||||
|
||||
for result in all_results:
|
||||
t = result.get('timings', {})
|
||||
status_icon = "\u2713" if result['status'] == 'success' else "\u2717"
|
||||
status_icon = "OK" if result['status'] == 'success' else "FAIL"
|
||||
|
||||
setup_time = t.get(
|
||||
'network_creation_total', t.get('model_setup_total', 0)
|
||||
|
||||
@@ -429,6 +429,7 @@ def main():
|
||||
|
||||
# ── Find proboscis joint (added dynamically to Rostrum) ──
|
||||
model_ptr = sim.physics.model.ptr
|
||||
fly_name = fly.name
|
||||
for jname_candidate in [f"{fly_name}/joint_Proboscis", "joint_Proboscis"]:
|
||||
proboscis_jnt_id = mujoco.mj_name2id(
|
||||
model_ptr, mujoco.mjtObj.mjOBJ_JOINT, jname_candidate)
|
||||
|
||||
Reference in New Issue
Block a user