Search Unity

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.