lis-epfl / apg_trajectory_tracking

Training efficient drone controllers with Analytic Policy Gradient
122 stars 15 forks source link

Unable to see animation #3

Closed abdul-mannan-khan closed 1 year ago

abdul-mannan-khan commented 1 year ago

Hello Valentin and Nina, Thank you so much for this wonderful work. It is really inspiring and thank you for sharing code for enthusiasts. I run your code it works fine. However, there is a just a little problem in animation. When I run

python scripts/evaluate_drone.py --animate

I just see Average divergence 0.037628898871207475 and a white background figure file. There is no animation. Could you please look into this problem? Thank you so much for your time.

ChevalierDeSangreal commented 1 year ago

I met exactly the same problem. I solved this problem by replacing the code from https://github.com/lis-epfl/apg_trajectory_tracking/blob/1db5286be4ed9c3cbfffc842640ee2e87e57ec17/neural_control/environments/rendering.py#L400 to this: ax = fig.add_subplot(111, projection='3d') Hope this would help you

abdul-mannan-khan commented 1 year ago

Hello @ChevalierDeSangreal

Thank you so much for your response. It solves the problem with python scripts/evaluate_drone.py --animate. Thank you for that. I tested other animation too for example

python scripts/evaluate_fixed_wing.py --animate

I got the same response (there was no display). So, I followed your solution and changed the line 515 to ax = axes3d.Axes3D(fig)

to this

ax = fig.add_subplot(111, projection='3d')

and it worked.

Thank you for your help.