Problem background:
The data set was made under Windows, and the time stamp of the picture file was saved in .txt format as the picture file name. However, when running ORB-SLAM3 in the Linux environment, an error occurred when loading the picture file name according to the time stamp. After debugging and analysis, It is found that the newline character in the two systems is different, which causes the file name to be read incorrectly. Here is a record of the problem and the solution.
The difference under different systems
- Linux operating system: LF, corresponding to\n
- Windows operating system: CR LF, corresponding to \r \n
- Mac OS: CR, corresponding to \r
conversion method
The conversion of line breaks can use Notepad++ or VSCode.
Notepad++
Use Notepad++ to open the file, find in the lower right corner:
double-click directly, the following options will appear, and convert according to your own needs.
VSCode
Open the file in VSCode,
click the option in the red box in the lower right corner, and the following picture will appear on the top of the software interface:
convert as needed. (It seems that VSCode does not support the conversion of Mac system CR line breaks...)