semitable/robotic-warehouse

Observation Space Interpretation

Gigolino2001 opened this issue · 7 comments

I have this environment(photo) and when I print the observation space I receive this list. Where can I find the structure of the observation space to understand better what each elements really means. The only thing that I understand is the position of the agent, which are the first 2 elements ( 5,2).

photo
photo2

This is a good start to understanding it: https://github.com/semitable/robotic-warehouse/blob/master/rware/warehouse.py#L404

you can even use the "slow" observations (observation type DICT) that you can then probe as a dictionary. See here:
https://github.com/semitable/robotic-warehouse/blob/master/rware/warehouse.py#L163

related to #17

@semitable Thank you for the help.

I still dont get it what the sensor range means. Basically it is the range of the agent. But if the sensor_range is 1 it means that the agent has the informations about the cell above,right,left and above?

Btw how could we extract the positions of the requested shelfs?

If sensor range is 1, then the agent can see everything inside a 3x3 box centred around it, i.e. the directions you mention plus the diagonal ones.
For a sensor range of 2 it's a 5x5 box centred around it.

You mean the absolute positions? For that you might have to dig into the code as the absolute position of shelves is not provided in the observation vector.

If sensor range is 1, then the agent can see everything inside a 3x3 box centred around it, i.e. the directions you mention plus the diagonal ones.

For a sensor range of 2 it's a 5x5 box centred around it.

You mean the absolute positions? For that you might have to dig into the code as the absolute position of shelves is not provided in the observation vector.

Yes, I was asking for the absolute positions. Where can i find them to return them on the observation space?

I think you'll have to extract them from self.grid in the warehouse class. Apologies, but I don't have the time capacity to assist with that. The _make_obs function might be a good starting point though:
https://github.com/semitable/robotic-warehouse/blob/master/rware/warehouse.py#L470

I think you'll have to extract them from self.grid in the warehouse class. Apologies, but I don't have the time capacity to assist with that. The _make_obs function might be a good starting point though: https://github.com/semitable/robotic-warehouse/blob/master/rware/warehouse.py#L470

Thank you! I finally manage to extract the absolute positions of the requested shelfs in the observation space.
Screenshot 2023-05-24 200714

P.S: I have changed the original grid from my initial comment. Here is the actual grid:
Screenshot 2023-05-24 201211