guardstrikelab / carla_apollo_bridge

This project aims to provide a data and control bridge for the communication between the latest version of Apollo and Carla.
Apache License 2.0
336 stars 98 forks source link

Failed to start module Localization and Perception, and awful performance on driving #157

Open Halo5082 opened 1 year ago

Halo5082 commented 1 year ago

I'm using 4090 GPU, which leads to error about TensorRT, compute capablity or some related,which is too awkward and complex to solve. So I compile and run the Apollo only on CPU. This helps a lot, but still leads to some problems:

1.(solved) No camera view on Dreamview. I found that some related modules are not enabled. official document

启动视觉障碍物检测模块 mainboard -d modules/perception/production/dag/dag_streaming_perception_camera.dag 这个命令会同时开启视觉障碍物检测和车道线检测,在启动时终端可能出现一些红色的警告提示,只要进程不退出都是正常现象,模型可以正常启动。

  1. awful driving performance. I failed to open Localization and Perception module, but can still Send Routing Request, the car also responds. But the car can hardly driving in lane. It always drives to the sidewalk or the opposite lane, stuck and can never move until I restart the main.py image

I guess it's related to the module start failure, so tried to fix it, but failed. Some of the failure log are shown below: image image

Halo5082 commented 1 year ago

BTW, I managed to use CPU to run apollo by modify:

USE_GPU_TARGET:`vim scripts/apollo.bashrc`

USE_GPU_HOST:`vim docker/scripts/docker_base.sh`

USE_GPU:这样build即可:`./apollo.sh build_cpu`

I also tried to modify the synchronous_mode, which looks like the cause of awful driving performance. but nothing changed

Kitty9701 commented 1 year ago

BTW, I managed to use CPU to run apollo by modify:

USE_GPU_TARGET:`vim scripts/apollo.bashrc`

USE_GPU_HOST:`vim docker/scripts/docker_base.sh`

USE_GPU:这样build即可:`./apollo.sh build_cpu`

I also tried to modify the synchronous_mode, which looks like the cause of awful driving performance. but nothing changed

Hi, could you tell me how to use cpu in detail? I understand using './apollo.sh build_cpu', but I don't understand the first two line. After we run the command vim scripts/apollo.bashrc, what should be modified in this file? Modify 'export USE_GPU_TARGET="${use_gpu}"'? Modify it to what?

Halo5082 commented 1 year ago

BTW, I managed to use CPU to run apollo by modify:

USE_GPU_TARGET:`vim scripts/apollo.bashrc`

USE_GPU_HOST:`vim docker/scripts/docker_base.sh`

USE_GPU:这样build即可:`./apollo.sh build_cpu`

I also tried to modify the synchronous_mode, which looks like the cause of awful driving performance. but nothing changed

Hi, could you tell me how to use cpu in detail? I understand using './apollo.sh build_cpu', but I don't understand the first two line. After we run the command vim scripts/apollo.bashrc, what should be modified in this file? Modify 'export USE_GPU_TARGET="${use_gpu}"'? Modify it to what?

It should not be a proper way, but it works. I modified the function where the compiler get the parameter. In detail, i modified: carla-apollo/apollo/scripts/apollo.bashrc:102

  else ## x86_64 mode
    # Check the existence of nvidia-smi
    if [[ ! -x "$(command -v nvidia-smi)" ]]; then
      warning "nvidia-smi not found. CPU will be used."
    elif [[ -z "$(nvidia-smi)" ]]; then
      warning "No GPU device found. CPU will be used."
    else
      warning "force use cpu"       # modified here
      use_gpu=0
    fi
  fi
  export USE_GPU_TARGET="${use_gpu}"
}

similar for carla-apollo/apollo/docker/scripts/docker_base.sh . You may modify your code according to your environment. Hope it helps!

hlyyy commented 3 months ago

Hi, I also found the awful driving performance of the ego car. I want to develop on the bridge. But when I run my code on the bridge, I find that the ego car is easy to make mistakes, like unable to turn normally or driving onto the sidewalk as you say. But when I only use bridge and don't run my code, the car will move normally. Do you solve this problem?