openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

The controls lagging problem in Carla Simulation

Open ferryman0723 opened this issue 2 years ago • 3 comments

Describe the bug

I'm running the latest Openpilot docker on Carla simulation. After input

# Terminal 1
./start_carla.sh
# Terminal 2 - Run openpilot and bridge in one Docker:
./start_openpilot_docker.sh

and input ./bridge.py --high_quality --dual_camera in the openpilot docker,the car cannot accelerate and keep driving in the lane after I input '1'. 图片 After that I modify the code in selfdrive/controls/controlsd.py like this 0e6c2074d573e30361d36bd23bb561d2b02924f2 2e44f46511846d8ab4f2ac4381fe7634873fc0b5

Although the car can accelerate now, it performs badly and slowly,unable to maintain lane driving and show the Controls Lagging problem,It seems that this problem existed before I modified the code.Has anyone met this problem and successfully solved it?Thanks a lot!

1675846884147 图片 1675846884131 1675848236396

OS Version

Ubuntu 20.04(docker)

openpilot version or commit

No response

Additional info

No response

ferryman0723 avatar Feb 08 '23 09:02 ferryman0723

it can work on v0.9.0, not OP docker, after I tested

fatsheep2020 avatar Feb 08 '23 12:02 fatsheep2020

it can work on v0.9.0, not OP docker, after I tested

how can I run the v0.9.0 in the docker as my PC is ubuntu18.04,have you met the same problem?thanks for reply!

ferryman0723 avatar Feb 10 '23 10:02 ferryman0723

some screenshots 图片 图片

ferryman0723 avatar Feb 14 '23 07:02 ferryman0723

What are your system specs? It's probably a performance issue if your GPU is weak.

Try running without --high_quality and report back. Thanks.

jon-chuang avatar Feb 18 '23 16:02 jon-chuang

What are your system specs? It's probably a performance issue if your GPU is weak.

Try running without --high_quality and report back. Thanks.

It seems to have the same problem after running without --high_quality,still lagging problem.I use Intel(R) Xeon(R) Silver 4214 CPU + 2080TI,is this configuration enough to run op?thanks

ferryman0723 avatar Feb 19 '23 16:02 ferryman0723

hello i meet the problem "openpilot unavailable waiting for controls to start" this problem is familiar with your problem do you know how to fix it ? thx

zeroyang0809 avatar Feb 20 '23 04:02 zeroyang0809

If you are building on master, it is due to https://github.com/commaai/openpilot/pull/27354

You need to add: Params().put_bool("ObdMultiplexingDisabled", True)

jon-chuang avatar Feb 20 '23 04:02 jon-chuang

thanks for your reply where to add Params().put_bool("ObdMultiplexingDisabled", True) thank you so much

zeroyang0809 avatar Feb 20 '23 12:02 zeroyang0809

Put it in the peripheral_state_function loop in bridge.py

jon-chuang avatar Feb 20 '23 14:02 jon-chuang

thanks for you reply. is that like this?

1

zeroyang0809 avatar Feb 20 '23 14:02 zeroyang0809

Yes. Lmk if it works.

jon-chuang avatar Feb 20 '23 16:02 jon-chuang

thanks for your reply. i can successfully launch the carla simulation on openpilot. however when the car run for a few seconds, it has this problem "take control immediately Vechicle Parameter Identification Failed". Do you know how to fix it? Thanks image

zeroyang0809 avatar Feb 21 '23 05:02 zeroyang0809

Not too sure. You could try to put the suggested line after pm.send(..) instead.

jon-chuang avatar Feb 21 '23 07:02 jon-chuang

What are your system specs? It's probably a performance issue if your GPU is weak.

Try running without --high_quality and report back. Thanks.

After the above steps, the latest op image in my PC has the following problems,I think it‘s still controls lagging problem.Does it means the GPU is not strong to run the op and carla?I use the 2080T 图片 图片

ferryman0723 avatar Feb 23 '23 07:02 ferryman0723

it can work on v0.9.0, not OP docker, after I tested

hello,have you met the same problem?can you give me some measure ,thanks a lot!

ferryman0723 avatar Mar 19 '23 14:03 ferryman0723

it can work on v0.9.0, not OP docker, after I tested

how can you run the v0.9.0 op docker,I can't find it ,can u give me some idea?thanks! @fatsheep2020

ferryman0723 avatar Mar 22 '23 06:03 ferryman0723

What are your system specs? It's probably a performance issue if your GPU is weak.

Try running without --high_quality and report back. Thanks.

@jon-chuang I have the question that when I run the official docker,does it use the GPU?I havn't seen the op is using gpu

ferryman0723 avatar Mar 23 '23 06:03 ferryman0723

I resolved this problem after I changed my pc,I think it‘s Gpu server configuration issues and I recommend using op on personal computer.Anyway, thanks all those who replyed.You can use the docker from:(https://hub.docker.com/r/ferryman0723/openpilot) now it can work.

ferryman0723 avatar Apr 01 '23 10:04 ferryman0723

thanks for you reply. is that like this?

1

Hello, could you please send me a copy of your bridge.py? I am currently using openpilot 0.8.9 and encountering the same issue as you. Additionally, my bridge.py differs from the latest official version. Thank you! Email: [email protected]

CrazyMustard-404 avatar Jan 09 '24 06:01 CrazyMustard-404

@ferryman0723 Hi, considering that the latest version no longer supports Carla, I am using your Docker image. But I encountered some problems: (1) The UI interface of openpilot in the image is problematic, and I cannot see the surrounding environment. (2) I hope to set a destination and have the openpilot drive towards that point. Do you have any methods? Looking forward to and thank you very much for your answer!

tk-menot avatar Mar 25 '24 07:03 tk-menot