StephLin / SE-SSD-ROS

SE-SSD 3D LiDAR detection with ROS wrapper (designed for LIO-SEGMOT)
Apache License 2.0
12 stars 2 forks source link

SE-SSD-ROS: Self-Ensembling Single-Stage Object Detection From Point Cloud with ROS Wrapper

A ROS wrapper for SE-SSD, an accurate and fast single-stage 3D object detection framework on the KITTI 3D object detection dataset.

Original README: here

Installation (Native)

Prerequisites

  1. Python 3.6+ (We recommend using virtualenv)
  2. PyTorch 1.6
  3. ROS Melodic (You don't need to re-compile ROS with Python 3)
  4. jsk_recognition sudo apt install ros-melodic-jsk-recognition-msgs ros-melodic-jsk-rviz-plugins
  5. Boost sudo apt install libboost-all-dev
  6. cmake 3.13.2+
  7. (Runtime) LIO-SEGMOT

0. CMake 3.13.2+

Since the default cmake version w.r.t. apt is 3.10.2, you have to prepare a newer version of cmake for your own machine.

In this way, we suggest to build cmake from source, and to set the binary directory as part of $PATH. Taking ~/Documents/third-party as the storage path, run the following commands:

cd ~/Documents/third-party
wget https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2.tar.gz
tar xzvf cmake-3.21.2.tar.gz
cd cmake-3.21.2
./bootstrap
make
CMAKE_BIN_PATH=$PWD/bin

Note that you don't need to run make install since it is probably to pollute your host environment. Instead, you have to manually add the binary directory, i.e., $CMAKE_BIN_PATH, to your $PATH variable, once the cmake is needed.

1. Install by Script

Run the following commands:

python3 -m virtualenv venv && source venv/bin/activate
python3 -m pip install -r requirements.txt
python3 -m pip install torch==1.6.0 torchvision==0.7.0  # CUDA 10.2
python3 install.py --cmake_executable=$CMAKE_BIN_PATH/cmake

Once the installation script complete without error, you are ready to start the detection.

Installation (Docker)

Prerequisites

  1. ROS Melodic (You don't need to re-compile ROS with Python 3)
  2. Docker with nvidia-docker
  3. (Runtime) LIO-SEGMOT

1. Build with docker-compose

Run the following command to build the SE-SSD image:

docker compose build

2. Configure docker-compose.yml

You should replace the following path with your local machine's one. For example, if your catkin_ws's location is /home/alice/catkin_ws, then you should modify the line as follows:

-     - /path/to/catkin_ws/devel/lib/python2.7/dist-packages/lio_segmot:/opt/ros/melodic/lib/python2.7/dist-packages/lio_segmot
+     - /home/alice/catkin_ws/devel/lib/python2.7/dist-packages/lio_segmot:/opt/ros/melodic/lib/python2.7/dist-packages/lio_segmot

Usage

We provide a single script to launch a ROS node or a ROS service:

You can check available arguments via

python3 ros_main.py --help

If you deploy SE-SSD-ROS with docker, you can run the following the command to launch it:

docker compose up