ml-agents
ml-agents copied to clipboard
GridSensor Observation Stacks Greater Than 1 Throws Exception
Describe the bug Using an observation stack of 1 works for GridSensor, but using a stack greater than 1 results in a UnityObservationException.
To Reproduce Steps to reproduce the behavior:
- Go to the FoodCollector scene in the examples folder.
- Select all "Agent" game objects in the hierarchy.
- Change the Observation Stacks value from 1 to 4.
- Try training.
Console logs / stack traces
mlagents_envs.exception.UnityObservationException: Compressed observation and its mapping had different number of channels - observation had 15 channels but its mapping had 24 channels
Screenshots

Environment (please complete the following information):
- Unity Version: Unity 2020.3.4f1
- OS + version: Ubuntu 18.04.6 LTS
- ML-Agents version: release_19
- Torch version: 1.8.1
- Environment: 0.28.0 (from release_19 branch)