DRL_based_SelfDrivingCarControl
DRL_based_SelfDrivingCarControl copied to clipboard
Reg- unable to run code
Hi ,
I am trying to run your code through jupyter notebook connecting from anaconda prompt by the method you described earlier like unzipping etc. getting few issues like:
ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named 'unityagents'
Name Error: name " UnityEnvironment " is not defined
NameError Traceback (most recent call last)
NameError: name 'UnityEnvironment' is not defined
error Traceback (most recent call last)
C:\Users\Q\Desktop\JejuCamp_ML_Agents\unityagents\environment.py in step(self, vector_action, memory, text_action) 469 self._conn.send(b"STEP") 470 self._send_action(vector_action, memory, text_action) --> 471 return self._get_state() 472 elif not self._loaded: 473 raise UnityEnvironmentException("No Unity environment is loaded.")
C:\Users\Q\Desktop\JejuCamp_ML_Agents\unityagents\environment.py in _get_state(self) 285 self._data = {} 286 while True: --> 287 state_dict, end_of_message = self._get_state_dict() 288 if end_of_message is not None: 289 self._global_done = end_of_message
C:\Users\Q\Desktop\JejuCamp_ML_Agents\unityagents\environment.py in _get_state_dict(self) 241 :return: 242 """ --> 243 state = self._recv_bytes().decode('utf-8') 244 if state[:14] == "END_OF_MESSAGE": 245 return {}, state[15:] == 'True'
C:\Users\Q\Desktop\JejuCamp_ML_Agents\unityagents\environment.py in _recv_bytes(self) 217 try: 218 s = self._conn.recv(self._buffer_size) --> 219 message_length = struct.unpack("I", bytearray(s[:4]))[0] 220 s = s[4:] 221 while len(s) != message_length:
error: unpack requires a bytes object of length 4
once i open the simulator app, I get following exception found at end in log file. I cannot file .cs file. please help me in this regard.
Mono path[0] = 'C:/DL/adas/jas/DRL_based_SelfDrivingCarControl-master (1)/DRL_based_SelfDrivingCarControl-master/environment/jeju_camp_Data/Managed' Mono config path = 'C:/DL/adas/jas/DRL_based_SelfDrivingCarControl-master (1)/DRL_based_SelfDrivingCarControl-master/environment/jeju_camp_Data/MonoBleedingEdge/etc' PlayerConnection initialized from C:/DL/adas/jas/DRL_based_SelfDrivingCarControl-master (1)/DRL_based_SelfDrivingCarControl-master/environment/jeju_camp_Data (debug = 0) PlayerConnection initialized network socket : 0.0.0.0 55335 Multi-casting "[IP] 10.0.3.178 [Port] 55335 [Flags] 2 [Guid] 3442019743 [EditorId] 2618453742 [Version] 1048832 [Id] WindowsPlayer(LAPTOP-MDH1861V) [Debug] 0" to [225.0.0.222:54997]... Started listening to [0.0.0.0:55335] PlayerConnection already initialized - listening to [0.0.0.0:55335] Initialize engine version: 2017.3.1f1 (fc1d3344e6ea) GfxDevice: creating device client; threaded=1 Direct3D: Version: Direct3D 11.0 [level 11.1] Renderer: Intel(R) HD Graphics 5500 (ID=0x1616) Vendor: Intel VRAM: 1130 MB Driver: 20.19.15.4642 Begin MonoManager ReloadAssembly
- Completed reload, in 7.260 seconds <RI> Initializing input.
XInput1_3.dll not found. Trying XInput9_1_0.dll instead... <RI> Input initialized.
<RI> Initialized touch support.
Setting up 2 worker threads for Enlighten. Thread -> id: 3714 -> priority: 1 Thread -> id: 342c -> priority: 1 UnloadTime: 4.280462 ms UnityAgentsException: The brain Brain was set to External mode but Unity was unable to read the arguments passed at launch. at CoreBrainExternal.InitializeCoreBrain (Communicator communicator) [0x00059] in D:\UnityGames\ML_Agent_Jejucamp2017\Assets\Scripts\CoreBrainExternal.cs:37 at Brain.InitializeBrain (Academy aca, Communicator communicator) [0x0000e] in D:\UnityGames\ML_Agent_Jejucamp2017\Assets\Scripts\Brain.cs:209 at Academy.InitializeEnvironment () [0x00056] in D:\UnityGames\ML_Agent_Jejucamp2017\Assets\Scripts\Academy.cs:230 at Academy.Awake () [0x00002] in D:\UnityGames\ML_Agent_Jejucamp2017\Assets\Scripts\Academy.cs:208
(Filename: D:/UnityGames/ML_Agent_Jejucamp2017/Assets/Scripts/CoreBrainExternal.cs Line: 37)
Can you please suggest me step by step procedure to execute as i am beginer to RL concepts... Thank you.
Could you tell me the code execution process for each ipynb files in RL algorithms folder.
@jaswanthiiit Sorry for late reply. I went to military training for a month, so I couldn't use any electronic devices. I moved unityagents folder into the RL_algorithms folder. I think it will fix the issue. I will tell you how to execute this project.
- download the github repo
- download the simulator and put all the files into the environment folder
- open the ipynb file in the RL_algorithm folder and run it!
Thank you.
I have resolved the problem when I modified a line of code:
from RL_algorithms.unityagents.environment import UnityEnvironment
have resolved this using this command.
from mlagents.envs import UnityEnvironment
@JunaidRana Saved my life!