-
Notifications
You must be signed in to change notification settings - Fork 725
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
Input position and image into DQN policy #1086
Comments
Duplicate of #133 You can use this trick do feed the 1D data as part of the image. Alternatively stable-baselines3 has almost-done PR that will add support for dictionary observations, which you could try out using. Closing as duplicate of #133. |
@Miffyli I installed the forked version of the stable baselines as you mentioned, but I still received an error: It appears that the VecTransposeImage only works with environments that have single box spaces. I have two box inputs but one is not an image and I'm not sure needs to be transposed. |
The PR is still work-in-progress so issues like this still persist. In the current form you need to change the other "box" observation to be either 1D or a 3D array, where the latter needs to have either 1, 3 or 4 channels (this is the current limitation in the PR). I can not guarantee when this would be fixed, but I try to contribute to it the next week. If that is not possible, you can try the trick I linked above where you combine the two images into one, and then separate them inside the tensorflow code. |
Ok I will try the trick thank, you for your help. |
@Miffyli |
so the real issue here is that you need to have channel first images (we are planning to support channel last too, hence the WIP) |
@araffin |
@araffin Sorry to ping you again but I am kind of in a hurry as I am doing this for a school project that is due soon. I would really appreciate an answer, again sorry for double pinging you. |
Please take a close look at the working example I linked. |
@araffin Ok I took a closer look at what you linked me and was able to din f what I needed, for the most part, but I have one more problem. I cannot figure out how to return a box space as it requests |
Look at the error message: it should contain gym.Spaces objects but you are sampling observations into there. This kind of tech support is not what we offer here, so in future such questions will go unanswered. |
@Miffyli where can I get some tech support for this, it seems not many people online know about this |
@CoolCoder54323 Your best bet could be to ask on RL Discord, or alternatively on stackoverflow. |
Ok thank you for your time. |
Hi, I am currently trying to create an AI for a drone for my observation space I would like to add one box space for the image, and one for position and velocity. Is there any way I would be able to do this or is there a way I can combine them into one box space?
The text was updated successfully, but these errors were encountered: