Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Resolved Collect Observations sensor is null

Discussion in 'ML-Agents' started by Rocket098, Jan 19, 2021.

  1. Rocket098

    Rocket098

    Joined:
    Mar 13, 2018
    Posts:
    3
    When I try to override the function CollectObservations(VectorSensor sensor), said sensor is null.
    I don't know if i'm using it correcly, but I can't find anywhere how to use it. I want to tell my agent where the target is.

    Thanks
     
  2. vincentpierre

    vincentpierre

    Joined:
    May 5, 2017
    Posts:
    160
  3. metebayhan

    metebayhan

    Joined:
    Sep 13, 2018
    Posts:
    2
    I am using ml-agents version 1.6.0. I have got same error to.
     
  4. vincentpierre

    vincentpierre

    Joined:
    May 5, 2017
    Posts:
    160
    Can you send me a screen shot of your Behavior Parameters in the inspector? If the number of vector observations is greater than 1, the VectorSensor should not be null. This would be a bug
     
  5. metebayhan

    metebayhan

    Joined:
    Sep 13, 2018
    Posts:
    2
    I did another solution and null error is gone. My mistake. Sensor works fine.
     
    celion_unity likes this.
  6. vycanis1801

    vycanis1801

    Joined:
    Feb 11, 2020
    Posts:
    12
    WHAT DID YOU DO?
     
    pekegan likes this.