Compiling PL-VIO on Ubuntu 18.04
The PL-VIO system was successfully compiled and deployed on an Ubuntu 18.04 laptop. The compilation process completed without errors, likely due to prior installation of VINS-Fusion which shares dependencies.
Topic Configuration for RealSense D435i
PL-VIO expects specific topic names for IMU and image data. For Intel RealSense D435i compatibility, the following topic throttling commands are required:
rosrun topic_tools throttle messages /camera/imu 200.0 /imu0 rosrun topic_tools throttle messages /camera/color/image_raw 30 /cam0/image_raw
Launching PL-VIO
The system can be launched using the Euroc configuration with fixed extrinsic parameters:
roslaunch plvio_estimator euroc_fix_extrinsic.launch
D435i-Specific Configuration
For direct D435i integration, the following launch sequence is recommended:
roslaunch realsense2_camera rs_camera_vins.launch roslaunch plvio_estimator d435i.launch roslaunch plvio_estimator vins_rviz.launch
d435i.launch Configuration
The D435i-specific launch file configures three main nodes:
<launch>
<arg name="config_path" default = "$(find feature_tracker)/../config/realsense/realsense_color_config.yaml" />
<arg name="vins_path" default = "$(find feature_tracker)/../config/../" />
<node name="feature_tracker" pkg="feature_tracker" type="feature_tracker" output="screen">
<param name="config_file" type="string" value="$(arg config_path)" />
<param name="vins_folder" type="string" value="$(arg vins_path)" />
</node>
<node name="linefeature_tracker" pkg="feature_tracker" type="LineFeature_tracker" output="screen">
<param name="config_file" type="string" value="$(arg config_path)" />
<param name="vins_folder" type="string" value="$(arg vins_path)" />
</node>
<node name="plvio_estimator" pkg="plvio_estimator" type="plvio_estimator" output="screen">
<param name="config_file" type="string" value="$(arg config_path)" />
<param name="vins_folder" type="string" value="$(arg vins_path)" />
</node>
</launch>
Camera Configuration File
The RealSense D435i requires specific calibration parameters in the configuration file:
%YAML:1.0
#common parameters
imu_topic: "/camera/imu"
image_topic: "/camera/color/image_raw"
output_path: "/home/user/output/"
#camera calibration
model_type: PINHOLE
camera_name: camera
image_width: 640
image_height: 480
distortion_parameters:
k1: 0
k2: 0
p1: 0
p2: 0
projection_parameters:
fx: 6.1040124511718750e+02
fy: 6.1039495849609380e+02
cx: 3.2079638671875000e+02
cy: 2.2985256958007812e+02
# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 0
extrinsicRotation: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 0.99964621, 0.01105994, 0.02418954,
-0.01088975, 0.9999151, -0.00715601,
-0.02426663, 0.00689006, 0.99968178]
extrinsicTranslation: !!opencv-matrix
rows: 3
cols: 1
dt: d
data: [0.07494282, -0.01077138, -0.00641822]
#feature tracker parameters
max_cnt: 150 # max feature number in feature tracking
min_dist: 25 # min distance between two features
freq: 10 # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image
F_threshold: 1.0 # ransac threshold (pixel)
show_track: 1 # publish tracking image as topic
equalize: 0 # if image is too dark or light, trun on equalize to find enough features
fisheye: 0 # if using fisheye, trun on it. A circle mask will be loaded to remove edge noisy points
#optimization parameters
max_solver_time: 0.04 # max solver itration time (ms), to guarantee real time
max_num_iterations: 8 # max solver itrations, to guarantee real time
keyframe_parallax: 10.0 # keyframe selection threshold (pixel)
#imu parameters The more accurate parameters you provide, the better performance
acc_n: 0.1 # accelerometer measurement noise standard deviation. #0.2
gyr_n: 0.01 # gyroscope measurement noise standard deviation. #0.05
acc_w: 0.0002 # accelerometer bias random work noise standard deviation. #0.02
gyr_w: 2.0e-5 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.805 # gravity magnitude
#loop closure parameters
loop_closure: 0 # start loop closure
fast_relocalization: 0 # useful in real-time and large project
load_previous_pose_graph: 0 # load and reuse previous pose graph; load from 'pose_graph_save_path'
pose_graph_save_path: "/home/user/output/pose_graph/" # save and load path
#unsynchronization parameters
estimate_td: 0 # online estimate time offset between camera and imu
td: 0.000 # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)
#rolling shutter parameters
rolling_shutter: 0 # 0: global shutter camera, 1: rolling shutter camera
rolling_shutter_tr: 0.033 # unit: s. rolling shutter read out time per frame (from data sheet).
#visualization parameters
save_image: 1 # save image in pose graph for visualization prupose; you can close this function by setting 0
visualize_imu_forward: 0 # output imu forward propogation to achieve low latency and high frequence results
visualize_camera_size: 0.4 # size of camera marker in RVIZ
System Performance
When deployed with a D435i camera, PL-VIO demonstrates stable performance during motion. The system publishes pose estimates on the /plvio_estimator/odometry topic, which can be monitored using ROS topic tools.
Published Topics
PL-VIO generates several ROS topics for visualization and data processing:
- /plvio_estimator/odometry - Main pose estimation output
- /plvio_estimator/path - Path history
- /plvio_estimator/point_cloud - Point cloud visualization
- /plvio_estimator/camera_pose - Camera pose data
- /plvio_estimator/lines_cloud - Line feature point cloud
Comparison with PL-VINS
PL-VIO offers improved stability during sharp turns compared to PL-VINS, which may experience node failures in similar scenarios. However, PL-VINS demonstrates better real-time performance and more advanced line feature detection capabilities.
Important Notes
Unlike some documentation suggestions, there is no need to move folders from VINS-mono to PL-VIO for proper operation. The initialization phase is critical for optimal performance, and the system benefits from environments with prominent linear features.