1 parent f827cf9 commit 2237c2dCopy full SHA for 2237c2d
1 file changed
PoseGen.py
@@ -522,10 +522,8 @@ def save_pose():
522
# Save in a file
523
folder_path = current_folder + "/saves"
524
if not os.path.exists(folder_path):
525
- os.makedirs(folder_path)
526
- count = 1
527
- else:
528
- count = len([f for f in os.listdir(folder_path) if os.path.isfile(os.path.join(folder_path, f))])
+ os.makedirs(folder_path)
+ count = len([f for f in os.listdir(folder_path) if os.path.isfile(os.path.join(folder_path, f))])
529
530
with open(current_folder + "/saves/pose" + str(count+1) + ".psgn", "w") as file:
531
file.write(json.dumps(joint_states, indent=2))
0 commit comments