google-research / dreamer

Dream to Control: Learning Behaviors by Latent Imagination
https://danijar.com/dreamer
Apache License 2.0
607 stars 74 forks source link

Use Dreamer on custom ENV #9

Closed alietestep closed 4 years ago

alietestep commented 4 years ago

hi, thanks for great work. i'm seeking a workaround for using Dreamer on custom ENVs. ENVs are wrappers like gym and have almost all gym's methods . i'm talking about robotic simulators that u can get sensor inputs like picture and so on. i have looked the code for couple of days ,its complicated and get no success there yet. any tutorial, example, tips or walk through would be great.

attackordie commented 4 years ago

I'm also interested in having a custom ENV for robotic simulation. One example would be having Dreamer work with Gazebo.

Options that might work:

  1. Pipe the images out of the Gazebo simulator and feed to Dreamer bypassing dm_control.
  2. Have dm_control manage Gazebo or create a similar ENV.
danijar commented 4 years ago

Gym environments should work. However, they need to return dictionary observations that contain an image key. You can use a simple env wrapper if your environment doesn't use dictionary observations. Also check out the newer code base that runs faster and is quite a bit easier to work with: http://github.com/danijar/dreamer

alietestep commented 4 years ago

@danijar thanks for replay, i'm working on RL control in Airsim simulator. I've done some tests with DDPG, D4PG and others but they all time/resource consuming and with complex tasks,, actually not so good results. but Dreamer seems to be interesting if can control with much less interaction and resource. so i'm gonna go through simpler code and will get back with results.

danijar commented 4 years ago

Sounds good, let me know if you run into problems setting it up and I'll see if I can provide more suggestions (especially if you're using the new code base).