learningLogisticsLab / robosuite

robosuite: A Modular Simulation Framework and Benchmark for Robot Learning
https://robosuite.ai
MIT License
5 stars 3 forks source link

Empty goal returned after a fallen object is detected #6

Closed Hanziscool closed 2 years ago

Hanziscool commented 3 years ago

image

Pull commit 3080530..9a6b193 (minor clearing of comments) Bug:

  1. object loaded and modelled with self.object_randomization=False (using same objects after reset).
  2. objects falls
  3. during the next Picking._reset_internal() cannot generate a new goal as this object has been removed from self.object_names (or possibly not_yet_considered_object_names).

Brainstorming:

Hanziscool commented 3 years ago

How to reproduce this bug :

  1. put a brakepoint on L1250, when you reach there, overwrite the obj_pos[2] (as you did, but don't need to change the code, just do it directly in the 'output' window while you debug).
  2. Then you should see how the relevant object is removed from self.object_names
  3. Then further down, when you call get_goal_object() this will return an empty dictionary.
  4. Then at the time we try to place it, there will be nothing there.

I am not quite sure if it matters if we have object_randomization.

Hanziscool commented 3 years ago

image

Current code:

Hanziscool commented 3 years ago

That may not be enough.

  1. I think self.object_placements is still not empty... and this list is used further down to place objects. Do we need to revisit how to update self.placement_initializer when an object is removed?
  2. I would like you to just run the train_binPicking.py to see how these exceptions pop up...
  3. I placed the train_binPicking.py:run_experiment_here.algorithm.train() around a try/except block with some code to let you debug from the terminal if there is a bug...
Hanziscool commented 3 years ago

after all objects fell, then it will be picked up by done and we will reset and we will always sample new object_placements in line 1146 before positioning objs in L 1151

Hanziscool commented 3 years ago

image image

Hanziscool commented 3 years ago

for relationalRL do:

  1. get fetch
  2. get pull origin picking_environment

This should help you get the latest changes.... as shown here:

Hanziscool commented 3 years ago

We can remove these empty assignments in get_goal_object and then test if that will cause any downstream problems, or perhaps more robust would be to check that the the name is not empty before trying to place anything....

Hanziscool commented 3 years ago

i think checking for not empty names is better to tackle other unforeseen cases where the obj.name might be empty

Hanziscool commented 3 years ago

I had put a bad check inside return_sorted_objs_to_model

Check for an empty goal

    if goal == {}:
        return {}

probably should be if goal == {} or goal['name']==[]

Hanziscool commented 3 years ago
Screenshot 2021-09-04 at 12 22 19 PM

check empty goal commit

Hanziscool commented 3 years ago

image

Still getting the same error... We are still missing something...

Hanziscool commented 3 years ago