- Project Setup
- Command-Line Application
- Visualizer Application
- Cross-Compilation
- Installation
- Batch Execution Script
This project depends on the installation of the following essential packages:
apt install build-essential cmake tar wget
With the above packages installed, set up the project as follows:
cd scripts
./setup.bash
With the project set up, build the command-line application as follows:
cd build/amd64/depth_clustering/release
make
To run the command-line application, do as follows:
cd install/amd64/depth_clustering/release/bin
./depth_clustering dataset_segment_path global_config_file lidar_return_directory
Note:
- Any resulting output files would be stored under the provided
dataset_segment_path
directory. Two example datasets are provided under thedata
folder. - The
global_config_file
is an optional parameter that specifies the path to a global configuration file. The global configuration file enables the same set of configurations to be applied across various datasets. Regardless of the presence of theglobal_config_file
, the applications would first attempt to load the configuration file under thedataset_segment_path
folder first. When specified, the global configuration file would be loaded, and the loaded global configurations would then override the existing configurations. - The
lidar_return_directory
is an optional parameter that specifies the directory name of the lidar frames of a particular lidar return, such asfirst_return
,second_return
, etc., inside thedataset_segment_path
directory. The command-line application uses first return lidar frames by default iflidar_return_directory
is unspecified.
The visualizer application depends on the installation of the following graphical packages:
apt install freeglut3-dev libqglviewer-dev-qt5 qtbase5-dev
The visualizer application is built independently. With the above packages installed, build the visualizer application as follows:
cd build/amd64/depth_clustering/release
make visualizer
To run the visualizer application, do as follows:
cd install/amd64/depth_clustering/release/bin
./visualizer
To launch the visualizer application with a dataset path, do as follows:
cd install/amd64/depth_clustering/release/bin
./visualizer dataset_segment_path global_config_file layout_config_file
Note:
- Any resulting output files would be stored under the provided
dataset_segment_path
folder. - The
global_config_file
is as explained above. - The
layout_config_file
is an optional parameter that specifies the path to a layout configuration file. The visualizer application takes the layout configuration file and applies the corresponding layout configurations. If any entries inlayout_config_file
conflicts with those inglobal_config_file
, entries inlayout_config_file
supersede.
The cross-compilation of this project depends on the installation of the following package:
apt install crossbuild-essential-arm64
Currently, the project supports two archtectures, amd64 and arm64. The instructions above already demonstrate steps for amd64.
For arm64, set up the project as follows:
cd scripts
./setup.bash --arch=arm64
Then, build the command-line application as follows:
cd build/arm64/depth_clustering/release
make
The cross-compiled binaries and libraries for arm64 would be located in install/arm64/depth_clustering/release
Note: the visualizer application is currently not supported for the arm64 architecture.
This project can be installed to the system as follows:
cd build/amd64/depth_clustering/release
make install
The installed binaries and scripts, libraries, and headers would be located under /usr/local/bin
, /usr/local/lib
, and /usr/local/include/depth_clustering
, respectively.
Then, refresh the dynamic linker cache to register the newly installed shared libraries as follows:
ldconfig
Note: the visualizer application would not be installed.
We have included a batch execution script in scripts
for the command-line application.
The batch execution script exploits the parallelism in multi-core processors and expediate the executions of the command-line application over a large set of dataset segments by concurrently executing multiple instances of the command-line application in parallel. The maximum number of concurrent instances is currently limited to the number of logical CPU cores in the system.
To run the command-line application for a set of dataset segments, do the following:
cd scripts
./depth_clustering.bash dataset_path arguments
Note:
- The
dataset_path
is the path to the folder containing a set of dataset segments. - The
arguments
are passed directly to the command-line application. For multiple arguments, enclose all of them with quotes""
. - The batch execution script expects all dataset segments to be directly under
dataset_path
.