Skip to content

Commit 2237c2d

Browse files
authored
Bug Fix
Fixed a small error that labeled the first saved pose as 'pose2' instead of 'pose1'
1 parent f827cf9 commit 2237c2d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

PoseGen.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,8 @@ def save_pose():
522522
# Save in a file
523523
folder_path = current_folder + "/saves"
524524
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))])
525+
os.makedirs(folder_path)
526+
count = len([f for f in os.listdir(folder_path) if os.path.isfile(os.path.join(folder_path, f))])
529527

530528
with open(current_folder + "/saves/pose" + str(count+1) + ".psgn", "w") as file:
531529
file.write(json.dumps(joint_states, indent=2))

0 commit comments

Comments
 (0)