Skip to content

Commit d419040

Browse files
committed
Fix typos
1 parent be4110d commit d419040

File tree

9 files changed

+34
-17
lines changed

9 files changed

+34
-17
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set (CMAKE_CXX_FLAGS "-DPCL_ONLY_CORE_POINT_TYPES=ON -DNO_EXPLICIT_INSTANTIATION
2424
# Eigen
2525
include_directories( "/usr/include/eigen3" )
2626
# OpenCV
27-
find_package( OpenCV 4.0 REQUIRED )
27+
find_package( OpenCV 3.4 REQUIRED )
2828
include_directories( ${OpenCV_INCLUDE_DIRS} )
2929
# Sophus
3030
find_package( Sophus REQUIRED )
@@ -44,7 +44,8 @@ add_definitions( ${PCL_DEFINITIONS} )
4444
set( THIRD_PARTY_LIBS
4545
${OpenCV_LIBS}
4646
${PCL_LIBRARIES}
47-
libSophus.so
47+
${Sophus_LIBRARIES} # If "make install" is good, use this line
48+
libSophus.so # If "make install" failed, copy files manully to usr/lib and usr/include, and use this line
4849
g2o_core g2o_stuff g2o_types_sba g2o_csparse_extension
4950
${CSPARSE_LIBRARY}
5051
)

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,18 @@ It's based on Eigen, and contains datatypes for Lie Group and Lie Algebra (SE3/S
168168

169169
Download this lib here: https://github.com/strasdat/Sophus. Do cmake and make. Since I failed to make install it, I manually moved “/Sophus/sophus” to “/usr/include/sophus”, and moved “libSophus.so” to “usr/lib”. Then, in my CMakeLists.txt, I add this: `set (THIRD_PARTY_LIBS libSophus.so )`.
170170

171+
If there is an error of "unit_complex_.real() = 1.;"
172+
replace it and its following line with "unit_complex_ = std::complex<double>(1,0);"
173+
174+
171175
**(4) g2o**
172-
Download here: https://github.com/RainerKuemmerle/g2o. Checkout to the last version in year 2017. Do cmake, make, make install.
173176

174-
If the csparse library is not found during cmake, please install the following package:
177+
First install either of the following two packages:
175178
> $ sudo apt-get install libsuitesparse
179+
> $ sudo apt-get install libsuitesparse-dev
180+
181+
Download here: https://github.com/RainerKuemmerle/g2o.
182+
Checkout to the last version in year 2017. Do cmake, make, make install.
176183

177184
# 4. How to Run
178185
> $ mkdir build && mkdir lib && mkdir bin

config/config.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,40 @@
33
# ===== Settings for displaying
44
MAX_NUM_IMAGES: 300
55
PCL_WAIT_FOR_KEY_PRESS: "false" # If true, PCL Viewer will stop and wait for any of your keypress before continueing.
6+
7+
# ===== Save/Load trajectory
68
DRAW_GROUND_TRUTH_TRAJ: "true" # Ground truth traj's color is set as green. Estimated is set as white.
7-
GROUND_TRUTH_TRAJ_FILENAME: /home/feiyu/Desktop/slam/my_vo/my2/data/test_data/cam_traj_truth.txt
8-
FILENAME_FOR_RESULT_TRAJECTORY: /home/feiyu/Desktop/slam/my_vo/my2/data/test_data/cam_traj.txt
9+
10+
GROUND_TRUTH_TRAJ_FILENAME: /home/feiyu/Documents/Projects/EECS432_CV_VO/data/test_data/cam_traj_truth.txt
11+
# Format of ground-truth data:
12+
# In each row, there are 12 numbers representing the transformation matrix T=[R|t].
13+
# Order of the 12 numbers: tx, ty, tz, R[:,0], R[:,1], R[:,2]
14+
# Or say: T[0,3], T[1,3], T[2,3], T[0,0],T[1,0],T[2,0],T[0,1],T[1,1],T[2,1],T[0,2],T[1,2],T[2,2]
15+
# See this "readPoseFromFile" in "io.cpp" for more details.
16+
17+
FILENAME_FOR_RESULT_TRAJECTORY: /home/feiyu/Documents/Projects/EECS432_CV_VO/data/test_data/cam_traj.txt
918

1019
# ===== Dataset and camera intrinsics
1120

1221
# -- fr1_desk dataset
1322
# https://vision.in.tum.de/data/datasets/rgbd-dataset/file_formats
14-
# dataset_dir: /home/feiyu/Desktop/slam/my_vo/my2/data/dataset_images_fr1_desk
23+
# dataset_dir: /home/feiyu/Documents/Projects/EECS432_CV_VO/data/dataset_images_fr1_desk
1524
# num_images: 100
1625
# camera_info.fx: 517.3
1726
# camera_info.fy: 516.5
1827
# camera_info.cx: 325.1
1928
# camera_info.cy: 249.7
2029

2130
# -- fr1_xyz dataset
22-
# dataset_dir: /home/feiyu/Desktop/slam/my_vo/my2/data/dataset_images_fr1_xyz
31+
# dataset_dir: /home/feiyu/Documents/Projects/EECS432_CV_VO/data/dataset_images_fr1_xyz
2332
# num_images: 100
2433
# camera_info.fx: 517.3
2534
# camera_info.fy: 516.5
2635
# camera_info.cx: 325.1
2736
# camera_info.cy: 249.7
2837

2938
# -- New Tsukuba Stereo dataset used in matlab tutorial
30-
dataset_dir: /home/feiyu/Desktop/slam/my_vo/my2/data/dataset_images_matlab
39+
dataset_dir: /home/feiyu/Documents/Projects/EECS432_CV_VO/data/dataset_images_matlab
3140
num_images: 150
3241
camera_info.fx: 615
3342
camera_info.fy: 615

include/my_basics/io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cv::Mat readCameraIntrinsics(const string &path_of_config_file, bool print_res=f
1818

1919
// -- Read/Write camera pose to file
2020
void writePoseToFile(const string filename, vector<cv::Mat> list_T); // Format: x, y, z, 1st row of R, 2nd row of R, 3rd row of R
21-
vector<cv::Mat> readPoseToFile(const string filename); // Read pose from file
21+
vector<cv::Mat> readPoseFromFile(const string filename); // Read pose from file
2222

2323
} // namespace my_basics
2424

include/my_slam/frame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Frame
5656
my_geometry::Camera::Ptr camera_;
5757

5858
// -- Current pose
59-
Mat T_w_c_; // transform from camera to world
59+
Mat T_w_c_; // transform from world to camera
6060

6161
public:
6262
Frame() {}

python_tools/calibrate_camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import glob # for getting files' names in the disk
77
# import pickle # for saving variables to disk
88

9-
IMAGE_FOLDER='/home/feiyu/Desktop/slam/my_vo/my2/data/fr1_rgb_calibration/'
9+
IMAGE_FOLDER='/home/feiyu/Documents/Projects/EECS432_CV_VO/data/fr1_rgb_calibration/'
1010

1111

1212
# termination criteria

python_tools/undistort_all_images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import glob, os
66

77
if 1: # fr1 dataset
8-
INPUT_FOLDER = '/home/feiyu/Desktop/slam/my_vo/my2/data/dataset_images_fr1_xyz/'
9-
OUTPUT_FOLDER = '/home/feiyu/Desktop/slam/my_vo/my2/data/undist/'
8+
INPUT_FOLDER = '/home/feiyu/Documents/Projects/EECS432_CV_VO/data/dataset_images_fr1_xyz/'
9+
OUTPUT_FOLDER = '/home/feiyu/Documents/Projects/EECS432_CV_VO/data/undist/'
1010

1111
camera_intrinsics = np.array([
1212
[517.3, 0, 325.1],

src/io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void writePoseToFile(const string filename, vector<cv::Mat> list_T)
8888
}
8989

9090
// Read pose from file
91-
vector<cv::Mat> readPoseToFile(const string filename)
91+
vector<cv::Mat> readPoseFromFile(const string filename)
9292
{
9393
// Output
9494
vector<cv::Mat> list_T;

src_main/run_vo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(int argc, char **argv)
5555
vector<string> image_paths;
5656
if (DEBUG_MODE)
5757
{
58-
string folder = "/home/feiyu/Desktop/slam/my_vo/my2/data/test_data/";
58+
string folder = "/home/feiyu/Documents/Projects/EECS432_CV_VO/data/test_data/";
5959
vector<string> tmp{
6060
"image0001.jpg", "image0013.jpg", "image0015.jpg"};
6161
for (string &filename : tmp)
@@ -219,7 +219,7 @@ bool drawResultByPcl(const my_slam::VisualOdometry::Ptr vo, my_slam::Frame::Ptr
219219
if (DRAW_GROUND_TRUTH_TRAJ)
220220
{
221221
static string GROUND_TRUTH_TRAJ_FILENAME = my_basics::Config::get<string>("GROUND_TRUTH_TRAJ_FILENAME");
222-
static vector<cv::Mat> truth_poses = readPoseToFile(GROUND_TRUTH_TRAJ_FILENAME);
222+
static vector<cv::Mat> truth_poses = readPoseFromFile(GROUND_TRUTH_TRAJ_FILENAME);
223223
cv::Mat truth_T = truth_poses[frame->id_], truth_R_vec, truth_t;
224224
getRtFromT(truth_T, truth_R_vec, truth_t);
225225

0 commit comments

Comments
 (0)