2 熟悉Linux
11.11 15.39
2.1 安装软件
apt安装ubuntu库中有的软件包
sudo apt-get install packagename
安装位置
安装从特定网站下载的单个软件
- 安装/卸载 .deb 文件
安装:sudo dpkg -i package_file.deb
卸载:sudo dpkg -r package_name
- 将.rpm文件转化为.deb文件
- 安装tarballs文件
以 .tar.gz 或 .tar.bz2 作为后缀名的文件是在 Linux 和 Unix 中被广泛使用的 tarballs 的打包文件
tar -zxvf FileName.tar.gz
cd FileName
./configure
make
sudo make install
其它软件库
2.2
定义
环境变量就是操作系统中用来指定操作系统运行环境的一些参数
如何定义新的环境变量
- 使用export命令(临时有效)
使用export命令设置环境变量只是针对当前终端有效,退出终端以后变量就不生效了。
$ export NAME=Value
- 修改用户环境变量~/.bashrc(对本用户永久有效)
- 修改系统环境变量/etc/profile文件(对所有用户永久有效)
2.3
2.4
chmod +x filename
2.5
sudo chown xiang:xiang a.sh
3 阅读文献
移动机器人自主导航主要分为三个主要问题:定位、建图和路径规划
Localization consists in determining in an exact manner the current pose of the robot in an environment.
Mapping integrates the partial observations of the surroundings into a single consistent model
path planning determines the best route in the map to navigate through the environment.
- 定位与建图是相互依赖的。要想在环境中精确定位,一个正确的地图是必须的;当要素被添加进地图是,为了构建一个良好的地图,合适的定位也是必要的。
4
5
下载ORB_SLAM2代码
查看代码结构
(a)库文件:1个 名字:ORB_SLAM2
可执行文件:4个 分别为:rgbd_tum、stereo_kitti、stereo_euroc、mono_tum、mono_kitti、mono_euroc
(b) include:头文件
src:源文件
Examples:实验例子
(c)都链接到了ORB_SLAM2中,ORB_SLAM2又被
6
- 编译问题
/home/n609/project/ORB_SLAM2/src/Tracking.cc:1512:13: error: ‘usleep’ was not declared in this scope usleep(3000);
在报错的源文件中添加以下头文件
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
2. 得在ORB_SLAM2工程的CMakeLists.txt基础上添加测试可执行文件
3.
问题:解决 fatal error: Eigen/Core: No such file or directory
解决:编译时找不到eigen/core头文件
因为 eigen 库默认安装在了 /usr/include/eigen3/Eigen 路径下,需使用下面命令映射到 /usr/include 路径下。
sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eige
运行截图
疑惑:只有把文件放在工程根目录才能运行成功,其它地方会一直加载字典