andyzeng / visual-pushing-grasping

Train robotic agents to learn to plan pushing and grasping actions for manipulation with deep reinforcement learning.
http://vpg.cs.princeton.edu/
BSD 2-Clause "Simplified" License
883 stars 314 forks source link

IndexError: list index out of range #49

Open Focusssss opened 4 years ago

Focusssss commented 4 years ago

When I run the command, python main.py --is_sim --obj_mesh_dir 'objects/blocks' --num_obj 10 --push_rewards --experience_replay --explore_rate_decay --is_testing --test_preset_cases --test_preset_file 'simulation/test-cases/test-10-obj-07.txt' --load_snapshot --snapshot_file 'downloads/vpg-original-sim-pretrained-10-obj.pth' --save_visualizations

there is a error occur as follows: Testing iteration: 14 Not enough objects in view (value: 0)! Repositioning objects. ('....ret_ints.....', [150]) ('....ret_ints.....', [151]) ('....ret_ints.....', [152]) ('....ret_ints.....', [153]) ('....ret_ints.....', [154]) ('....ret_ints.....', []) Traceback (most recent call last): File "main.py", line 452, in main(args) File "main.py", line 248, in main robot.add_objects() File "/home/dell/CJpan/GitHub/visual-pushing-grasping/robot.py", line 182, in add_objects curr_shape_handle = ret_ints[0] IndexError: list index out of range

How should i solve the probloms?

Focusssss commented 4 years ago

@andyzeng

lijialei666 commented 4 years ago

When I run the command, python main.py --is_sim --obj_mesh_dir 'objects/blocks' --num_obj 10 --push_rewards --experience_replay --explore_rate_decay --is_testing --test_preset_cases --test_preset_file 'simulation/test-cases/test-10-obj-07.txt' --load_snapshot --snapshot_file 'downloads/vpg-original-sim-pretrained-10-obj.pth' --save_visualizations

there is a error occur as follows: Testing iteration: 14 Not enough objects in view (value: 0)! Repositioning objects. ('....ret_ints.....', [150]) ('....ret_ints.....', [151]) ('....ret_ints.....', [152]) ('....ret_ints.....', [153]) ('....ret_ints.....', [154]) ('....ret_ints.....', []) Traceback (most recent call last): File "main.py", line 452, in main(args) File "main.py", line 248, in main robot.add_objects() File "/home/dell/CJpan/GitHub/visual-pushing-grasping/robot.py", line 182, in add_objects curr_shape_handle = ret_ints[0] IndexError: list index out of range

How should i solve the probloms?

我也遇到了这个问题,请问你是怎么解决的?

LZW0123 commented 2 years ago

Just run it a few times!Because the objects are not all loaded.