Unable to run godot-rl (stablebaselines3)
haseebzeeshan2010 opened this issue · 7 comments
I followed the following steps from this tutorial that was listed on the godot_rl github page: https://www.youtube.com/watch?v=f8arMv_rtUU
My computer is running Ubuntu 22.04.4 LTS but I have tried with 24.04 LTS as well and there is no change in result
These are the steps I followed (as stated in the video):
Step 1-3
Step 4 - Download raw file
Step 5 - Place it alongside the rl folder
-----End of Python Setup----
Step 6 - Create project
Now the filesystem looks like this:
Step 7 - Create CharacterBody3D
Step 8 - Add emission
Step 9 - Add floor
Step 10 - Add target(Emission included in this step)
Step 11 - Add walls
Step 12 - Add template script for player
Step 13 - Add Camera3D
Step 14 - Re-arrange target and cube in the scene
Step 15 - Add signals for wall and target to move cube back to original position
Step 16 - Comment out control code
Step 17 - Download the godot_rl_agents_plugin-main.zip from github
Step 18 - Select the script_templates and addons folder
Step 19 - Copy them over
Step 20 - Enable the Plugin
Step 21 - Add and extend script of AIController3D
Add the script_templates script and edit it for purpose of the project
Alter the cube.gd script for AI to control velocity
Step 22 - Finally run the script in the virtual environment through: python3 stable_baselines3_example.py
Step 23 - Add the Sync node in godot
After all this an error appears:
Please check if I've missed a step, I've tried this in both the version of godot used in the tutorial (v4.2.dev1) and the latest stable version, but there is the same issue
Adding ": Node3D" in step 15 does not make a difference to the result
It would be very much appreciated if you could help with this issue
Thanks in advance
Hello, I think it's a version mismatch issue. Try installing the latest version of Godot RL Agents from this repository (main branch).
Thanks for the reply!
I have downloaded the entire main branch, but where do I find the folders for the plugin as there is no addon or script_templates file to copy over to the godot project?
For the main project, try using pip install https://github.com/edbeeching/godot_rl_agents/archive/refs/heads/main.zip
For plugin (the files to copy to the Godot project), use the plugin repository to get the latest version: https://github.com/edbeeching/godot_rl_agents_plugin
I used the command in the environment and made sure I installed the updated plugin but unfortunately the problem still persists.
I looked a little deeper into the error and it looks like the handshake does complete but then it returns a null value that the handle_message() function cannot manage and the server disconnects.
My logic could be mistaken as there might be a problem with the stable_baselines3_example.py(even though I've downloaded it from the correct branch) but here are some images of the error:
Perhaps you can try an example from the examples repository: https://github.com/edbeeching/godot_rl_agents_examples
You could also try unistalling godot rl agents with pip uninstall
before installing (if you didn't try already).
Thanks for the advice, will try and complete one of the examples before coming back to this
I got the example working. Thanks for the help!