autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
890 stars 577 forks source link

No detect output from yolox #7779

Open beginningfan opened 2 weeks ago

beginningfan commented 2 weeks ago

Checklist

Description

I try to start the tensorrt_yolox node. When I set preprocess_on_gpu here to true,the ouptput in /perception/object_recognition/detection/rois0 is empty. When I set it to false, it works well.

Expected behavior

When I launch tensorrt_yolox with preprocess_on_gpu is true,the rois in output is not empty

Actual behavior

2024-07-01_18-15

Steps to reproduce

use ros2 launch tensorrt_yolox yolox.launch.xml to launch this node

Versions

OS: Ubuntu ROS2: humble Autoware: latest

Possible causes

No response

Additional context

No response

liuXinGangChina commented 2 weeks ago

share the rosbag.

beginningfan commented 2 weeks ago

The bag was uploaded here https://drive.google.com/file/d/1Tp-cUaLl7m0XHDsvItfPMVkY-dWtGg7j/view?usp=drive_link

liuXinGangChina commented 2 weeks ago

Hi mits-san, will you help us by assign someone to take a look at this issue

badai-nguyen commented 2 weeks ago

@beginningfan Thank you for your raising this issue. However, I tested the latest autoware' tensorrt_yolox on two options of preprocess_on_gpu, both worked well on my side. Could you check around gpu and tensorrt seting and testing again?

preprocess_on_gpu=true: Screenshot from 2024-07-04 09-07-34

preprocess_on_gpu=false: Screenshot from 2024-07-04 09-05-15

My environment: OS: Ubuntu ROS2: humble Autoware: latest

autoware@npc2201009-ubuntu22:~/autoware$ dpkg -l | grep TensorRT
hi  libnvinfer-dev                                    8.4.2-1+cuda11.6                                  amd64        TensorRT development libraries and headers
hi  libnvinfer-plugin-dev                             8.4.2-1+cuda11.6                                  amd64        TensorRT plugin libraries
hi  libnvinfer-plugin8                                8.4.2-1+cuda11.6                                  amd64        TensorRT plugin libraries
hi  libnvinfer8                                       8.4.2-1+cuda11.6                                  amd64        TensorRT runtime libraries
hi  libnvonnxparsers-dev                              8.4.2-1+cuda11.6                                  amd64        TensorRT ONNX libraries
hi  libnvonnxparsers8                                 8.4.2-1+cuda11.6                                  amd64        TensorRT ONNX libraries
hi  libnvparsers-dev                                  8.4.2-1+cuda11.6                                  amd64        TensorRT parsers libraries
hi  libnvparsers8                                     8.4.2-1+cuda11.6                                  amd64        TensorRT parsers libraries
ii  ros-humble-tensorrt-cmake-module                  0.0.3-1jammy.20240516.164153                      amd64        Exports a CMake module to find TensorRT.
autoware@npc2201009-ubuntu22:~/autoware$ dpkg -l | grep nvinfer
hi  libnvinfer-dev                                    8.4.2-1+cuda11.6                                  amd64        TensorRT development libraries and headers
hi  libnvinfer-plugin-dev                             8.4.2-1+cuda11.6                                  amd64        TensorRT plugin libraries
hi  libnvinfer-plugin8                                8.4.2-1+cuda11.6                                  amd64        TensorRT plugin libraries
hi  libnvinfer8                                       8.4.2-1+cuda11.6                                  amd64        TensorRT runtime libraries
beginningfan commented 1 week ago

@badai-nguyen Thanks for your reply. I tested it with your environment and it worked well. But I used this docker image before, the TRT version is different from yours. It dosen't work.

root@Dell:/my_autoware# dpkg -l | grep TensorRT
hi  libnvinfer-dev                                    8.6.1.6-1+cuda12.0                      amd64        TensorRT development libraries
hi  libnvinfer-headers-dev                            8.6.1.6-1+cuda12.0                      amd64        TensorRT development headers
hi  libnvinfer-headers-plugin-dev                     8.6.1.6-1+cuda12.0                      amd64        TensorRT plugin headers
hi  libnvinfer-plugin-dev                             8.6.1.6-1+cuda12.0                      amd64        TensorRT plugin libraries
hi  libnvinfer-plugin8                                8.6.1.6-1+cuda12.0                      amd64        TensorRT plugin libraries
hi  libnvinfer8                                       8.6.1.6-1+cuda12.0                      amd64        TensorRT runtime libraries
hi  libnvonnxparsers-dev                              8.6.1.6-1+cuda12.0                      amd64        TensorRT ONNX libraries
hi  libnvonnxparsers8                                 8.6.1.6-1+cuda12.0                      amd64        TensorRT ONNX libraries
hi  libnvparsers-dev                                  8.6.1.6-1+cuda12.0                      amd64        TensorRT parsers libraries
hi  libnvparsers8                                     8.6.1.6-1+cuda12.0                      amd64        TensorRT parsers libraries
ii  ros-humble-tensorrt-cmake-module                  0.0.3-1jammy.20240516.164153            amd64        Exports a CMake module to find TensorRT.
badai-nguyen commented 1 week ago

@beginningfan Thank you for your confirmation. BTW, is there any error logging when you tested on 8.6.1.6-1+cuda12.0?

beginningfan commented 1 week ago

@badai-nguyen There is no useful information in the log. I save all output on screen to this tenerrt_yolox.log

miursh commented 1 week ago

I use the same version as @beginningfan. Dai's version is a bit outdated; you should update the NVIDIA-related libraries.

$  dpkg -l | grep TensorRT
hi  libnvinfer-dev                                              8.6.1.6-1+cuda12.0                            amd64        TensorRT development libraries
ii  libnvinfer-headers-dev                                      8.6.1.6-1+cuda12.0                            amd64        TensorRT development headers
ii  libnvinfer-headers-plugin-dev                               8.6.1.6-1+cuda12.0                            amd64        TensorRT plugin headers
hi  libnvinfer-plugin-dev                                       8.6.1.6-1+cuda12.0                            amd64        TensorRT plugin libraries
hi  libnvinfer-plugin8                                          8.6.1.6-1+cuda12.0                            amd64        TensorRT plugin libraries
hi  libnvinfer8                                                 8.6.1.6-1+cuda12.0                            amd64        TensorRT runtime libraries
hi  libnvonnxparsers-dev                                        8.6.1.6-1+cuda12.0                            amd64        TensorRT ONNX libraries
hi  libnvonnxparsers8                                           8.6.1.6-1+cuda12.0                            amd64        TensorRT ONNX libraries
hi  libnvparsers-dev                                            8.6.1.6-1+cuda12.0                            amd64        TensorRT parsers libraries
hi  libnvparsers8                                               8.6.1.6-1+cuda12.0                            amd64        TensorRT parsers libraries
ii  ros-humble-tensorrt-cmake-module                            0.0.3-1jammy.20230919.195325                  amd64        Exports a CMake module to find TensorRT.

As a result, the model (yolox-sPlus-opt-pseudoV2-T4-960x960-T4-seg16cls.onnx) worked without any issues, as shown in this image below. image

I'm not sure what is happening but could you try with this PR ?

beginningfan commented 6 days ago

@miursh Thanks for your replay. I used the cmakelists.txt in the PR you mentioned, it still doesn't work. I tried in two different devices and two different docker image(20240618-devel-cuda-amd64 and 20240708-devel-cuda-amd64), the results are the same. Where did you compile and run this node? Can you try it in one of these two dockers?

miursh commented 3 days ago

@beginningfan I'm sorry to hear that you're still encountering issues. I compiled and ran the node on my local machine (Ubuntu22.04), not within a Docker container. I wil try running it in the Docker images you mentioned.