ZJU-FAST-Lab / ego-planner-swarm

An efficient single/multi-agent trajectory planner for multicopters.
GNU General Public License v3.0
1.13k stars 222 forks source link

OA problem for GPU version #44

Closed 0wh closed 1 year ago

0wh commented 1 year ago

I am interested in the GPU version. I followed the instructions in Use GPU or Not and was able to build it with no error. However it seems the drones stopped avoiding any obstacle. They are only avoiding other drones, then fly straight forward despite of the obstacles in the map, see the attached picture. The CPU version works well, this problem only happens when I change ENABLE_CUDA to true. How should I solve it? Thanks!

Screenshot_20221026_234243
bigsuperZZZX commented 1 year ago

That's because you have set the wrong CUDA_NVCC_FLAGS as described in "Use GPU or Not" section. You can visualize a depth stream in rviz to see if the depth looks right.

hildebrandt-carl commented 1 year ago

I was also having this issue. However after setting the correct CUDA_NVCC_FLAGS it worked.

I couldn't find an official Nvidia page, however you can find the CUDA_NVCC_FLAGS using either this website or this website. For example, I have a RTX 3090, and you can see that I need to set my -gencode to 86. Therefor I would set -gencode arch=compute_86,code=sm_86;.

bigsuperZZZX commented 1 year ago

Thank you very much!