Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observation Space Interpretation #22

Open
Gigolino2001 opened this issue May 23, 2023 · 7 comments
Open

Observation Space Interpretation #22

Gigolino2001 opened this issue May 23, 2023 · 7 comments

Comments

@Gigolino2001
Copy link

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

@semitable
Copy link
Owner

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

@semitable
Copy link
Owner

related to #17

@Gigolino2001
Copy link
Author

@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?

@semitable
Copy link
Owner

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.

@Gigolino2001
Copy link
Author

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?

@semitable
Copy link
Owner

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

@Gigolino2001
Copy link
Author

Gigolino2001 commented May 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants