On Ubuntu systems, pre-installed OpenCV 3.2.0 is compatible with PL-VINS, even though some documentation references newer versions like 3.3.1. A critical setup step for PL-VINS is modifying the feature_tracker/CMakeLists.txt file, which contains three hardcoded absolute paths—failing to update these will cause compilation errors.
Since my Ubuntu system natively includes OpenCV 3.2.0, I commented out the explicit OpenCV path in the CMakeLists.txt (as the build system auto-detects the system-wide installation) and updated the remaining two paths to match my home directory and workspace structure. The modified feature_tracker/CMakeLists.txt below compiles successfully on Ubuntu with OpenCV 3.2.0:
cmake_minimum_required(VERSION 3.0.2)
project(feature_tracker)
# Configure build settings
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -Wextra -g")
# Dependencies from ROS catkin
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
sensor_msgs
cv_bridge
camera_model
message_filters
)
# Use system-wide OpenCV 3.2 instead of hardcoded path
find_package(OpenCV 3.2 REQUIRED QUIET)
catkin_package()
# Include core directories
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
# Eigen3 dependency
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
# Line descriptor include path (update to your workspace)
set(LINE_DESC_INCLUDE "/home/your_username/plvins_ws/src/PL-VINS/feature_tracker/src/line_descriptor/include")
include_directories(${LINE_DESC_INCLUDE})
# Build feature tracker node
add_executable(feature_tracker
src/feature_tracker_node.cpp
src/parameters.cpp
src/feature_tracker.cpp
)
target_link_libraries(feature_tracker
${catkin_LIBRARIES}
${OpenCV_LIBS}
)
# Build line feature tracker node
add_executable(line_feature_tracker
src/linefeature_tracker_node.cpp
src/parameters.cpp
src/linefeature_tracker.cpp
src/tic_toc.h
src/line_descriptor/src/binary_descriptor_custom.cpp
src/line_descriptor/src/binary_descriptor_matcher.cpp
src/line_descriptor/src/bitarray_custom.hpp
src/line_descriptor/src/bitops_custom.hpp
src/line_descriptor/src/draw_custom.cpp
src/line_descriptor/src/LSDDetector_custom.cpp
src/line_descriptor/src/precomp_custom.hpp
src/line_descriptor/src/types_custom.hpp
)
# Link line descriptor library (update to your workspace)
set(LINE_DESC_LIB "/home/your_username/plvins_ws/src/PL-VINS/feature_tracker/src/line_descriptor/lib/liblinedesc.so")
target_link_libraries(line_feature_tracker
${catkin_LIBRARIES}
${OpenCV_LIBS}
${LINE_DESC_LIB}
)
After adjusting the CMakeLists.txt, the feature_tracker module compiled on the first attempt.
To run PL-VINS with the EuRoC dataset, execute the following commands:
roslaunch plvins_estimator euroc_fix_extrinsic.launch
rosbag play /path/to/your/dataset/MH_05_difficult.bag
Existing VINS-Fusion environments streamline PL-VINS deployment, as most core dependencies are already installed.
When testing with an Intel RealSense D435i camera, direct use of VINS-Fusion configuration files is not possible—PL-VINS is designed for monocular-IMU setups, so switching to a VINS-Mono-compatible YAML file (e.g., a pre-configured file from the UESTC VINS-Mono implementation) resolves this issue. Note that the camera must be moved slightly to initialize pose estimation before RVIZ will display any output.
Initial tests with the D435i showed accurate positioning, though early attempts resulted in crashes during sharp turns. This issue was mitigated by reducing turn speed, and successful full-path runs were achieved. Loop closure testing initially encountered errors, which require further configuration adjustments. The system outputs pose data at a frequency of 10Hz.
To run PL-VINS with the D435i, use the following commands:
roslaunch realsense2_camera rs_camera_vins.launch
roslaunch plvins_estimator euroc_fix_extrinsic_maxi_d435i.launch
Potential causes for crashes in low-texture environments (such as corridors) during sharp turns are discussed in technical resources focused on VIO optimization for weak-texture scenarios.