heleidsn / UAV_Navigation_DRL_AirSim

This is a new repo used for training UAV navigation (local path planning) policy using DRL methods.
165 stars 27 forks source link

Training a model #32

Open 1234238 opened 3 months ago

1234238 commented 3 months ago

Hello, we have recently been training a drone obstacle avoidance model, and I am using the "simple avoid" scenario. However, the training results are not very good with the default settings. I wonder if you have any training tips? Additionally, it seems that the model_save and other models cannot be loaded. Are there any other models provided? Thank you.

heleidsn commented 3 months ago

Could you please share the training curve such as episode reward or success rate? The training resutlt is much related with the network type. NO_CNN net will be easier for training.

1234238 commented 3 months ago

Thank you for your suggestion. I use the NO_CNN network and it trains very well. It’s really magical.

1234238 commented 3 months ago

Could you please share the training curve such as episode reward or success rate? The training resutlt is much related with the network type. NO_CNN net will be easier for training.

Hello, after I successfully trained SAC using NO_CNN, I assigned the same parameters to the TD3 algorithm, but the strange thing is that when the number of decision steps reaches 2000 (after the pre-processing is completed), the drone will circle in place . I am not dont Understand why this happens

heleidsn commented 3 months ago

TD3 needs more time to converge. Maybe you can try to increase the random explore timesteps to 5000. Always circle means the agent trapped in the local minima.

1234238 commented 3 months ago

TD3 needs more time to converge. Maybe you can try to increase the random explore timesteps to 5000. Always circle means the agent trapped in the local minima.

Thank you very much for your reply. After hard work, my model has been trained. Another question is that I want to change the settings of some obstacles in the virtual environment. I don’t know how I should do it?

heleidsn commented 3 months ago

Do you mean a custom environment? The environment is created using UE4 with AirSim plugin to provide basic API such as UAV control. You can follow this link to create your own environment. Please note your AirSim version as the API maybe a little bit different between different AirSim releases. It will cost some time to study how to do this, or you can download the release version from AirSim repo.

Good luck!

1234238 commented 2 months ago

Do you mean a custom environment? The environment is created using UE4 with AirSim plugin to provide basic API such as UAV control. You can follow this link to create your own environment. Please note your AirSim version as the API maybe a little bit different between different AirSim releases. It will cost some time to study how to do this, or you can download the release version from AirSim repo.

Good luck!

Thank you very much for your answer. I have read the relevant reading, but I want to simply modify the environment, such as some obstacle distribution of Simple_avoid, but Simple_avoid does not seem to have an .unproject file in the file, so I cannot open it with UE4. These seem to It was not mentioned. I wonder if you know about it?

heleidsn commented 2 months ago

Simple_avoid is a custom environment created by myself. You can generate it from scratch in UE4 and add the AirSim plugin. As it is a long time, I cannot find the unproject file now. Maybe you still have to learn the AirSim plugin and UE4 and build your own environment.

1234238 commented 2 months ago

Simple_avoid is a custom environment created by myself. You can generate it from scratch in UE4 and add the AirSim plugin. As it is a long time, I cannot find the unproject file now. Maybe you still have to learn the AirSim plugin and UE4 and build your own environment.

Thank you very much for your answer. I have another question about the production of the UI interface. If I want the UI interface to display a map like zhangjiajie, do I only need to make a background image? In addition, can I ask how you make a background image like NH?

heleidsn commented 2 months ago

For a customed environment, we can use UE4 file to generate a good 2D background image. However, for other environment already built, such as zhangjiajie and NH, you can only get the image while manually move the camera to a particular height to get the top view. There will be some perspective problem but I didn't find a good solution for it. You can type M on the keyboard in the environment and move the camera as this link.

JerryBryant24 commented 1 month ago

Hello, I changed the strategy to No_CNN, but I got an error after running it twice. 2

1234238 commented 1 month ago

Hello, I changed the strategy to No_CNN, but I got an error after running it twice. 2

I think your parameters might need to be adjusted.

1234238 commented 1 month ago

For a customed environment, we can use UE4 file to generate a good 2D background image. However, for other environment already built, such as zhangjiajie and NH, you can only get the image while manually move the camera to a particular height to get the top view. There will be some perspective problem but I didn't find a good solution for it. You can type M on the keyboard in the environment and move the camera as this link.

Hello, I would like to ask if you have any reading recommendations for creating beautiful background images like NH_Center in UE4? I have found the unproject file for Zhangjiajie, or would you consider adding the Zhangjiajie environment to the environments you support? Looking forward to your reply.