Giter Club home page Giter Club logo

bevfusion-ros-tensorrt's Introduction

BEVFusion-ROS-TensorRT-CPP

This repository contains source code and models for BEVFusion online real-time inference using CUDA, TensorRT & ROS.

Supports ROS2. please switch to the galactic-devel branch

1 依赖安装

  • ubuntu-20.04,noetic,cuda-11.3, cudnn-8.6.0, TensorRT-8.5
  1. 默认已安装noetic, cuda, cudnn, 已下载TensorRT源码

  2. ros依赖

# 1. 建立ros工作空间
mkdir -p bevfusion_ws/src

# 2. 进入bevfusion_ws/src目录,拉取源码
cd bevfusion_ws/src
git clone https://github.com/linClubs/BEVFusion-ROS-TensorRT.git

# 3. 进入bevfusion_ws工作空间一键安装功能包需要ros依赖
cd .. 
rosdep install -r -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
  1. 模型下载参考

  2. 模型导出参考

  • 修改./tool/environment.shcuda tensorrt cudnn的路径, 运行./tool/build_trt_engine.sh生成tensorrt推理模型
./tool/build_trt_engine.sh
  1. ros包准备
  • bevfusion官方提供了已训练好的nuscenes模型参数

  • rosbag数据转换参考nuscenes2rosbag功能包

  • nuscenes传感器之间的参数已给出,无需标定

如果需接真实的传感器进行场景测试,需提前完成训练标定工作

传感器标定参考

2 编译运行

  1. 编译前需要修改CMakeLists.txtTensorRTCUDA路径,修改如下
...
# cuda
set(CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda-11.3) # CUDA修改这一行
set(CUDA_INSTALL_TARGET_DIR targets/x86_64-linux)
set(CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_ROOT_DIR}/${CUDA_INSTALL_TARGET_DIR}/include)
set(CUDA_LIBS ${CUDA_TOOLKIT_ROOT_DIR}/${CUDA_INSTALL_TARGET_DIR}/lib)

# TENSORRT
set(TensorRT_ROOT /home/lin/software/TensorRT-8.5.3.1)  # TensorRT修改这一行
# set(TensorRT_ROOT ~/share/TensorRT-8.5.3.1)           
set(TensorRT_INCLUDE_DIRS ${TensorRT_ROOT}/include)
set(TensorRT_LIBS ${TensorRT_ROOT}/lib/)
...
  1. 编译运行
  • bevfusion_node.launch修改model_nameprecision参数值

model_name: resnet50/resnet50int8/swint precision: fp16/int8 swint + int8模式不能工作

# 1. 编译
catkin_make

# 2. source工作空间
source devel/setup.bash

# 3. 运行bevfusion_node
roslaunch bevfusion bevfusion_node.launch

# 4. 播放数据集
 rosbag play 103.bag 
  1. 运行报错tool/simhei.ttf找不到, 全局搜索tool/simhei.ttf或者UseFont关键字

/src/common/visualize.cu中修改UseFont的值即可,改成simhei.ttf正确的路径即可


References

  • bevfusion

  • Lidar_AI_Solution

  • bev感知交流群-472648720, 欢迎各位小伙伴进群一起学习讨论bev相关知识!!!^_^

bevfusion-ros-tensorrt's People

Contributors

linclubs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.