Open jitendracheripally2003 opened 8 months ago
Is the C# code enough for the track data extraction? I want to give the model input on the distance between the car and track ends, like how LIDAR sensors work so that model can know the environment. LIDAR sensor information can be extracted using image screenshots, but I want to calculate the distance on the fly while driving. Will this work by extracting track information and calculating the distance while racing? Can I know what inputs and how you are feeding them to you model? Thank you for responding!
Well I do the same thing. Check the readme. The c# code gives you two arrays of tuples which indicate the edges.
Okay thank you. I will refer readme, thank you for your guidance.
Hey, I'm so sorry to bother you. I don't have much knowledge about C# so I'm unable to run the C# program. I have installed C# extensions, C# SDK, .Net 8 this all for VS Code. Can you please explain how can I run that code. I even installed choco but that's not installing scripts to run this.
After .NET, cd
to MapExtractor/
and from there run dotnet new console
I think. Then restore the Program.cs via git (because dotnet new console
is going to overwrite it). Then you install GBX.NET and GBX.NET.LZO while you are inside the MapExtractor. Then run the mini project through dotnet. You supply the map file via command line arg.
Thank you it worked and it works only on Tracks you have given in the repo. I have tried to give TMNF tracks but its showing some error: Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List`1.get_Item(Int32 index) at MapExtractor.Program.Main(String[] args) Can you some assurance that with some changes it may work in TMNF tracks?
GBX.NET should work for TMNF, you just need to figure out which classes are for TMNF blocks. I do not know if it is straightforward to convert my script to work on TMNF. Check the GBX.NET repo and dig a bit on how the blocks work. In the end, the simplest thing to do is to record the location of the car while you are driving on the edges and just use those numbers for the track. I know it may not be the best way, but at least you know it will work and you won't get annoyed with automating the whole process. I am working on a solution for 3d tracks and yeah I am stuck with this semi-manual approach because extracting data from the meshes isn't the best way to go.
I will try my best to convert it for the TMNF. Your idea of recording data while driving on edges is very good and reliable but it like hard coding. Lets keep it for worst case scenario. I hope you good luck for you work, I may not be that much helpful but you are so helpful for me. Thank you.
Hi, I have a doubt about one thing, you have implemented PPO, A2C, SAC, TD3 which gives discrete or continuous actions. I wanted to see if this works for DQN, for which the stable baseline3 only supports discrete actions. I want to also know for training are you using GPU or CPU. Thank you in advance!
CPU. I have tried CUDA but it is slower. I don't know, but I guess you can use DQN if you make it's discrete outputs fit the limits of the env inputs.
Hi, I have tried to use DQN, there was a error for Box. I think with some modification to that for taking discrete action it will work. Can you please explain the Observation timeout and Action timeout. I was getting them frequently even with PPO driving and training. How can I fill the delay between the game and model. Thank you for your help.
It fills the delay automatically. If you see a timeout it means your inference is slow (maybe an older pc?) You can try tweaking the values im the constructor, but I don't think it is going to help.
Sorry for the late reply, I don't know what's wrong with my laptop, but I brought is 1 month ago. It has a 4050, i5 13th, so maybe these all heavy for me. But thank you for your explanation.
Then this is not the issue... Try using cpu instead of cuda.
Hi, sorry for the late update, CPU is actually better I have trained DDPG algorithm for 1 map and it shows good results. Thank you for your guidance.
Thank you it worked and it works only on Tracks you have given in the repo. I have tried to give TMNF tracks but its showing some error: Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List`1.get_Item(Int32 index) at MapExtractor.Program.Main(String[] args) Can you some assurance that with some changes it may work in TMNF tracks?
I running with trackmania 2020 not TMNF hi can i ask i am same issue with this and didnt generate the txt file out
can i ask why ya ?
i have move the code to above that what chatgpt told me to do
Sorry I do not understand.
Dear author, I encountered this problem when I ran your code. This seems to indicate that the map file (txt file) was not read successfully?
(my-env) C:\Windows\System32>python "C:\Users\B1793.conda\envs\my-env\code_try\RL_Driver.py"
C:\Users\B1793.conda\envs\my-env\Lib\site-packages\stable_baselines3\common\save_util.py:166: UserWarning: Could not deserialize object clip_range. Consider using custom_objects
argument to replace this object.
Exception: code() argument 13 must be str, not int
warnings.warn(
C:\Users\B1793.conda\envs\my-env\Lib\site-packages\stable_baselines3\common\save_util.py:166: UserWarning: Could not deserialize object lr_schedule. Consider using custom_objects
argument to replace this object.
Exception: code() argument 13 must be str, not int
warnings.warn(
Wrapping the env with a Monitor
wrapper
Wrapping the env in a DummyVecEnv.
Traceback (most recent call last):
File "C:\Users\B1793.conda\envs\my-env\code_try\RLDriver.py", line 36, in
In addition, when I run your MapExtractor.py file to process the map file, the running result is only a picture, and no txt file is generated. What is the reason for this?
I've switched to image based AI + 3d maps witch require different approaches (and it's incomplete, I might pick it up in the future). Try the main
or old_main
branches. I have no idea what these logs mean, never used conda nor D: drive for this. I've been offline lately so appologies for low support.
Hi, this is not an issue but I need to ask you few things