Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when generating results from log #3

Closed
ShinyueYao opened this issue May 14, 2024 · 2 comments
Closed

TypeError when generating results from log #3

ShinyueYao opened this issue May 14, 2024 · 2 comments

Comments

@ShinyueYao
Copy link

ShinyueYao commented May 14, 2024

Hi @yunshengtian , I'm very impressed by your work and meet a problem when "generating results from log". Everything looks good and following the README I can get the assembly result without showing the robotic arm.

Then I try to add some arguments in the sequence planning:
python plan_sequence/run_seq_plan.py --dir beam_assembly --id original --planner dfs --generator heur-out --max-gripper 2 --base-part 6 --log-dir logs/beam_seq --early-term --render --plan-arm --plan-grasp --gripper robotiq-140
And it works,

[check_stable] success: True, parts_fall: None, parts_fix: ['6'], parts_move: []
[get_stable_plan_1pose_serial] success: True, n_fix: 1, parts_fall: None, parts_fix: ['6'], parts_move: []
[planner.base.plan] stopped: solution found

But when I try to generate the result, it shows:

python plan_sequence/play_logged_plan.py --log-dir logs/beam_seq/dfs-heur-out/s0/original/ --assembly-dir assets/beam_assembly/original --result-dir results/beam_seq/ --save-all --camera-pos 3.15 -1.24 1.6 --camera-lookat 2.59 -0.55 1.16 --show-grasp --show-arm --gripper robotiq-140
0%| | 0/4 [00:00<?, ?it/s]
0%| | 0/4 [00:08<?, ?it/s]
[play_logged_plan] exception: list indices must be integers or slices, not str from assets/beam_assembly/original
Traceback (most recent call last):
File "plan_sequence/play_logged_plan.py", line 160, in play_logged_plan
body_matrices = render_path_with_grasp_and_arm(asset_folder, assembly_dir, part_move, parts_rest, parts_removed, pose, path, gripper_type, gripper_scale, grasp, optimizer, camera_lookat, camera_pos,
File "/home/kaidon/code/ASAP/plan_robot/render_grasp_arm.py", line 276, in render_path_with_grasp_and_arm
gripper_pos, gripper_quat = grasp['gripper_pos'], grasp['gripper_quat']
TypeError: list indices must be integers or slices, not str
Traceback (most recent call last):
File "plan_sequence/play_logged_plan.py", line 251, in
play_logged_plan(asset_folder, args.assembly_dir, sequence, tree, args.result_dir, args.save_mesh, args.save_pose, args.save_part, args.save_path, args.save_record, args.save_all,
File "plan_sequence/play_logged_plan.py", line 199, in play_logged_plan
raise e
File "plan_sequence/play_logged_plan.py", line 160, in play_logged_plan
body_matrices = render_path_with_grasp_and_arm(asset_folder, assembly_dir, part_move, parts_rest, parts_removed, pose, path, gripper_type, gripper_scale, grasp, optimizer, camera_lookat, camera_pos,
File "/home/kaidon/code/ASAP/plan_robot/render_grasp_arm.py", line 276, in render_path_with_grasp_and_arm
gripper_pos, gripper_quat = grasp['gripper_pos'], grasp['gripper_quat']
TypeError: list indices must be integers or slices, not str

Do you have any idea about it and how to fix it? Thank you for any help you can offer.

@yunshengtian
Copy link
Owner

Hi @ShinyueYao , thank you for your interest and raising this issue! There are indeed some small bugs in the code, mainly because I forgot to update some parts of the code to my latest APIs. I have fixed them and now it runs smoothly on my end. Please let me know if this fixes your issue and keep me updated if you see any further issues. Thanks!

@ShinyueYao
Copy link
Author

Hi @yunshengtian,
Your help works and the code runs smoothly now! Thank you for your response and congrats on your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants