question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing object meta after InitialRandomSpawn

See original GitHub issue

Hi team,

I found that for certain environment and certain random seed, after InitialRandomSpawn action, there will be objects missing from the returned object metadata. One example to reproduce this issue is attached. I tested it on both 3.3.1 and 3.3.4.

After running the following script, the two print statements will print 38 and 37 respectively. The credit card object is missing.

Could you please help take a look at this? Thanks!!


import ai2thor.controller

scene = 'FloorPlan214_physics'
controller = ai2thor.controller.Controller(
    width=300,
    height=300,
    local_build=False,
    start_unity=True,
    scene=scene,
    port=8201,
    host='127.0.0.1',
    agentMode='default',
    )
event = controller.reset(scene)
object_meta = event.metadata['objects']
print(len(object_meta))


controller.reset(scene)
shuffled_event = controller.step(
    action='InitialRandomSpawn',
    randomSeed=17,
    forceVisible=False,
    numPlacementAttempts=5,
    placeStationary=True
    )

object_meta = shuffled_event.metadata['objects']
print(len(object_meta))

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mattdeitkecommented, Jul 19, 2021

FWIW, here are where the tests are running and failing still: https://colab.research.google.com/drive/1jysHfPA5NJdvjbTuXq1aWGK1fX4UNVeZ?usp=sharing

2reactions
winthoscommented, Jul 19, 2021

ok, i’ve confirmed all these issues were cascades off of each other. I’ve tried the same test collab matt threw together using the commit from my PR #821 and it correctly shows all 38 objects even after randomization, and the credit card is in scene.

https://colab.research.google.com/drive/1W9k6TPMOjD7k8vVdeXLhH3uB0u-Hu6Cy?usp=sharing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Several InitialRandomSpawn/Remove Object issues #773
It seems there is an issue with the internal logic being called every time an action that could change the number of objects...
Read more >
Domain Randomization - AI2-THOR
After calling initial random spawn, each object will have its objectId recomputed (in the form of "objectType|x|y|z").
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found