waynecoffee9 / Capstone-Project

Programming a Real Self-Driving Car (Carla, Udacity SDC) to drive on a test track
MIT License
0 stars 2 forks source link

[Simulator Performance] Simulator Latency #4

Open waynecoffee9 opened 4 years ago

waynecoffee9 commented 4 years ago

Latency issue when VM is used, and "camera" button is activated in the simulator while the car is following waypoints. From online searches, it is likely VM has poor communication with the simulator. Online recommended solution is to have native Ubuntu setup. If later our code has heavy latency with classifier implemented, we will probably need to do something about it.

DanfengX commented 4 years ago

Recently I am struggling with the latency issue with running the simulator. When I turn on the camera, the car cannot follow the waypoint. There are some ideas may help to reduce the latency. 1. reduce the image process frequency. 2. inactivate light_classification function until the traffic is near

roopakingole commented 4 years ago

We reduced the waypoint updated frequency to 10Hz and saw better performance. Did you try that?

On Mon, Dec 9, 2019 at 1:53 PM DanfengX notifications@github.com wrote:

Recently I am struggling with the latency issue with running the simulator. When I turn on the camera, the car cannot follow the waypoint. There are some ideas may help to reduce the latency. 1. reduce the image process frequency. 2. inactivate light_classification function until the traffic is near

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ACFASWLWXTPMSOAPANYRX4DQX2H3DA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKHVQQ#issuecomment-563378882, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFASWKQ26Q4ZEYTGWR6X7TQX2H3DANCNFSM4JVDJURQ .

--

Thanks & Regards
Roopak Ingole
waynecoffee9 commented 4 years ago

On github repo I reduced waypoint updater to 5hz. My system is i7-6700k running at 4ghz. I assigned 2 cores to VM.

Here are a few things you can try... Start simulator with the lowest quality and lowest resolution.

It's mostly the simulators problem. It is sending too much data to ROS to process. Styx node can not handle it so everything slows down. If you assign only one CPU to VM (ROS), simulator will run fine but there is no additional processing power to run classifier. When you assign more CPU to VM, they will all be used to process the data from simulator and your simulator slows down.

On Mon., Dec. 9, 2019, 12:09 p.m. roopakingole, notifications@github.com wrote:

We reduced the waypoint updated frequency to 10Hz and saw better performance. Did you try that?

On Mon, Dec 9, 2019 at 1:53 PM DanfengX notifications@github.com wrote:

Recently I am struggling with the latency issue with running the simulator. When I turn on the camera, the car cannot follow the waypoint. There are some ideas may help to reduce the latency. 1. reduce the image process frequency. 2. inactivate light_classification function until the traffic is near

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ACFASWLWXTPMSOAPANYRX4DQX2H3DA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKHVQQ#issuecomment-563378882 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACFASWKQ26Q4ZEYTGWR6X7TQX2H3DANCNFSM4JVDJURQ

.

--

Thanks & Regards
Roopak Ingole

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ALZDETUPNKDEYN6W7JO4TRLQX2JWFA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJLOA#issuecomment-563385784, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZDETSTTCOBR2XKVON3NQDQX2JWFANCNFSM4JVDJURQ .

waynecoffee9 commented 4 years ago

By the way this is Carla's hardware...8 CPUs (32 cores @ 4GHz)...plenty of computing power to spare.

Udacity Self-Driving Car Harware Specs

On Mon, Dec 9, 2019 at 12:26 PM Wayne Chen waynechen1210@gmail.com wrote:

On github repo I reduced waypoint updater to 5hz. My system is i7-6700k running at 4ghz. I assigned 2 cores to VM.

Here are a few things you can try... Start simulator with the lowest quality and lowest resolution.

It's mostly the simulators problem. It is sending too much data to ROS to process. Styx node can not handle it so everything slows down. If you assign only one CPU to VM (ROS), simulator will run fine but there is no additional processing power to run classifier. When you assign more CPU to VM, they will all be used to process the data from simulator and your simulator slows down.

On Mon., Dec. 9, 2019, 12:09 p.m. roopakingole, notifications@github.com wrote:

We reduced the waypoint updated frequency to 10Hz and saw better performance. Did you try that?

On Mon, Dec 9, 2019 at 1:53 PM DanfengX notifications@github.com wrote:

Recently I am struggling with the latency issue with running the simulator. When I turn on the camera, the car cannot follow the waypoint. There are some ideas may help to reduce the latency. 1. reduce the image process frequency. 2. inactivate light_classification function until the traffic is near

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ACFASWLWXTPMSOAPANYRX4DQX2H3DA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKHVQQ#issuecomment-563378882 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACFASWKQ26Q4ZEYTGWR6X7TQX2H3DANCNFSM4JVDJURQ

.

--

Thanks & Regards
Roopak Ingole

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ALZDETUPNKDEYN6W7JO4TRLQX2JWFA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJLOA#issuecomment-563385784, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZDETSTTCOBR2XKVON3NQDQX2JWFANCNFSM4JVDJURQ .

DanfengX commented 4 years ago

Really appreciate your support. I reduced the waypoint_updater frequency to 5Hz, but when I turn on the camera, the car still drives away the waypoints. I have to reduce the frequency to process the image, but I didn't see any improvement. BTW I allocated 2 CPU to VM. I suspect that this is all my poor laptop's hardware's fault.

Thanks, Danfeng Xu

On Mon, Dec 9, 2019 at 3:57 PM Wayne Chen notifications@github.com wrote:

By the way this is Carla's hardware...8 CPUs (32 cores @ 4GHz)...plenty of computing power to spare.

Udacity Self-Driving Car Harware Specs

  • 31.4 GiB Memory
  • Intel Core i7-6700K CPU @ 4 GHz x 8
  • TITAN X Graphics
  • 64-bit OS

On Mon, Dec 9, 2019 at 12:26 PM Wayne Chen waynechen1210@gmail.com wrote:

On github repo I reduced waypoint updater to 5hz. My system is i7-6700k running at 4ghz. I assigned 2 cores to VM.

Here are a few things you can try... Start simulator with the lowest quality and lowest resolution.

It's mostly the simulators problem. It is sending too much data to ROS to process. Styx node can not handle it so everything slows down. If you assign only one CPU to VM (ROS), simulator will run fine but there is no additional processing power to run classifier. When you assign more CPU to VM, they will all be used to process the data from simulator and your simulator slows down.

On Mon., Dec. 9, 2019, 12:09 p.m. roopakingole, < notifications@github.com> wrote:

We reduced the waypoint updated frequency to 10Hz and saw better performance. Did you try that?

On Mon, Dec 9, 2019 at 1:53 PM DanfengX notifications@github.com wrote:

Recently I am struggling with the latency issue with running the simulator. When I turn on the camera, the car cannot follow the waypoint. There are some ideas may help to reduce the latency. 1. reduce the image process frequency. 2. inactivate light_classification function until the traffic is near

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ACFASWLWXTPMSOAPANYRX4DQX2H3DA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKHVQQ#issuecomment-563378882

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACFASWKQ26Q4ZEYTGWR6X7TQX2H3DANCNFSM4JVDJURQ

.

--

Thanks & Regards
Roopak Ingole

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ALZDETUPNKDEYN6W7JO4TRLQX2JWFA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJLOA#issuecomment-563385784 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ALZDETSTTCOBR2XKVON3NQDQX2JWFANCNFSM4JVDJURQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=AN6HWVYHNHGSRHTL55I7LBLQX2WKNA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKVM3Q#issuecomment-563435118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6HWVZ47MEZMCAGWSAMGHDQX2WKNANCNFSM4JVDJURQ .

waynecoffee9 commented 4 years ago

Yeah you need a more powerful PC.

On Mon., Dec. 9, 2019, 3:49 p.m. DanfengX, notifications@github.com wrote:

Really appreciate your support. I reduced the waypoint_updater frequency to 5Hz, but when I turn on the camera, the car still drives away the waypoints. I have to reduce the frequency to process the image, but I didn't see any improvement. BTW I allocated 2 CPU to VM. I suspect that this is all my poor laptop's hardware's fault.

Thanks, Danfeng Xu

On Mon, Dec 9, 2019 at 3:57 PM Wayne Chen notifications@github.com wrote:

By the way this is Carla's hardware...8 CPUs (32 cores @ 4GHz)...plenty of computing power to spare.

Udacity Self-Driving Car Harware Specs

  • 31.4 GiB Memory
  • Intel Core i7-6700K CPU @ 4 GHz x 8
  • TITAN X Graphics
  • 64-bit OS

On Mon, Dec 9, 2019 at 12:26 PM Wayne Chen waynechen1210@gmail.com wrote:

On github repo I reduced waypoint updater to 5hz. My system is i7-6700k running at 4ghz. I assigned 2 cores to VM.

Here are a few things you can try... Start simulator with the lowest quality and lowest resolution.

It's mostly the simulators problem. It is sending too much data to ROS to process. Styx node can not handle it so everything slows down. If you assign only one CPU to VM (ROS), simulator will run fine but there is no additional processing power to run classifier. When you assign more CPU to VM, they will all be used to process the data from simulator and your simulator slows down.

On Mon., Dec. 9, 2019, 12:09 p.m. roopakingole, < notifications@github.com> wrote:

We reduced the waypoint updated frequency to 10Hz and saw better performance. Did you try that?

On Mon, Dec 9, 2019 at 1:53 PM DanfengX notifications@github.com wrote:

Recently I am struggling with the latency issue with running the simulator. When I turn on the camera, the car cannot follow the waypoint. There are some ideas may help to reduce the latency. 1. reduce the image process frequency. 2. inactivate light_classification function until the traffic is near

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ACFASWLWXTPMSOAPANYRX4DQX2H3DA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKHVQQ#issuecomment-563378882

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACFASWKQ26Q4ZEYTGWR6X7TQX2H3DANCNFSM4JVDJURQ

.

--

Thanks & Regards
Roopak Ingole

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ALZDETUPNKDEYN6W7JO4TRLQX2JWFA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJLOA#issuecomment-563385784

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ALZDETSTTCOBR2XKVON3NQDQX2JWFANCNFSM4JVDJURQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=AN6HWVYHNHGSRHTL55I7LBLQX2WKNA5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKVM3Q#issuecomment-563435118 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AN6HWVZ47MEZMCAGWSAMGHDQX2WKNANCNFSM4JVDJURQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/waynecoffee9/Capstone-Project/issues/4?email_source=notifications&email_token=ALZDETWFZ74QUEXFF6IVFD3QX3DN5A5CNFSM4JVDJUR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGK7LZI#issuecomment-563475941, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZDETRURR4CG3VID4KSAJDQX3DN5ANCNFSM4JVDJURQ .