-
Notifications
You must be signed in to change notification settings - Fork 120
Command Line Tool
The command line tool vio
runs the algorithm offline in batch mode.
Each dataset contains two folders: One for the image sequence (named as cam0
) and the other for the inertial measurements (named as imu0
).
The cam0
folder contains a data
subfolder and a data.csv
text file. The data
subfolder contains a sequence of images named after the time instant (in nanoseconds as an integer) when they are captured, and the text file contains two comma-separated columns of which the first column is the time-stamp in nanoseconds as an integer, and the second column is the filename of the corresponding image captured at that time instant.
The imu0
folder contains a single data.csv
text file which contains 7 comma-separated columns with each row of the text file recording a time-stamped inertial measurement: The first column denotes the time-stamp when the inertial measurement was taken (in nanoseconds as an integer), the second to the forth column represent the angular velocity (in rad/sec) measured by the IMU, and the last three columns record the linear acceleration (in m/sec2) measured by the IMU.
(This examples uses the dataset provided here.)
From the project root directory, run the estimator with configuration specified by the option -cfg cfg/vio.json
on the data9_workbench
sequence (option -seq data9_workbench
) which resides in directory $DATAROOT
(option -root $DATAROOT
) as the following:
bin/vio -cfg cfg/vio.json -root $DATAROOT -seq data9_workbench -out out_state -dataset xivo
where estimated states are saved to the output file out_state
.
For detailed usage of the application, see the flags defined at the beginning of the application source file src/app/vio.cpp
.
We use glog for system logging. If you want to log runtime information to a text file for inspection later, first create a directory to hold logs
mkdir /YOUR/LOG/DIRECTORY/HERE
and then run the estimator with a prefix to specify the log directory:
GLOG_log_dir=/YOUR/LOG/DIRECTORY/HERE bin/vio -cfg cfg/vio.json -root $DATAROOT -seq data9_workbench -out out_state -dataset xivo
Note, by default, log is suppressed for runtime speed by setting add_definitions(-DGOOGLE_STRIP_LOG=1)
in src/CMakeLists.txt
. To enable log, simply comment out that line and re-build.
For more details on glog, see the tutorial here.