question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Car goes way off track during training [question]

See original GitHub issue

When I start training via: python train.py --algo sac -vae vae-level-0-dim-32.pkl -n 5000 and connect the donkey sim, I notice that sometimes the episode will end as soon as the car moves outside of the lane, whereas other times the car ends up in the middle of the desert for quite a while:

Screen Shot 2019-04-28 at 3 38 41 PM

and in the output console I see:

----------------------------------------
| current_lr              | 0.0003     |
| ent_coef                | 0.5942134  |
| ent_coef_loss           | 0.03155499 |
| entropy                 | 0.7693799  |
| ep_rewmean              | -10.8      |
| episodes                | 154        |
| eplenmean               | 1.17       |
| fps                     | 0          |
| mean 100 episode reward | -10.8      |
| n_updates               | 91200      |
| policy_loss             | -129.445   |
| qf1_loss                | 26.577808  |
| qf2_loss                | 18.912739  |
| time_elapsed            | 518.64     |
| total timesteps         | 498        |
| value_loss              | 46.93487   |
----------------------------------------
Episode finished. Reward: -10.61 1 Steps
SAC training duration: 2.29s
[snip..]
Episode finished. Reward: -11.25 1 Steps
SAC training duration: 2.31s
[snip..]
Episode finished. Reward: -10.03 1 Steps
SAC training duration: 2.22s
etc..

Is that the expected behavior during training or something wrong w/ my setup?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tleydencommented, May 19, 2019

The problem may come from the simulator, if it does not send the proper error, then it won’t reset.

Updating to the donkey branch of the simulator fixed this issue.

0reactions
araffincommented, Apr 29, 2019

Ok, I think you need to monitor the cross track error and its threshold. When the cross track error is above a threshold, it should reset. The problem may come from the simulator, if it does not send the proper error, then it won’t reset. Also, did you try the teleoperation mode? Did the reset work in that mode (r key)?

I also see you are working on MacOS, I hope this does not change anything. See here: https://github.com/araffin/learning-to-drive-in-5-minutes/blob/c46338cfbfd7b316b1992247c302783a8cb6d36a/donkey_gym/envs/donkey_sim.py#L217 for the relevant line

EDIT: it also seems you do not use the compiled version, but the one in unity. I never tried to do it like that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.2 Basic Control of Your Vehicle - TruckingTruth
Get out and walk around the vehicle. Check your clearance to the sides and overhead in and near the path your vehicle will...
Read more >
The Keys to Defensive Driving (for Teens) - Nemours KidsHealth
In all driving situations, the best way to avoid potential dangers is to position your vehicle where you have the best chance of...
Read more >
Train and Evaluate AWS DeepRacer Models Using the AWS ...
Watch out for the vehicle's making sudden turns and go off-track. If the vehicle follows the path correctly most of the way, but...
Read more >
Root Cause Analysis: Definition, Examples & Methods - Tableau
In this article, we'll define root cause analysis, outline common techniques, walk through a template methodology, and provide a few examples.
Read more >
Should a self-driving car kill the baby or the grandma ...
The classic trolley problem goes like this: You see a runaway trolley speeding down the tracks, about to hit and kill five people....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found