ROS Navigation Stack安装

ROS Navigation Stack安装

Navigation导航包是做导航几乎都要用的,大家可以先去ROS Wiki上学习下

我们先Git下对应版本的软件包,我是Kinetic的,所以是Kinetic-devel

在这里插入图片描述

下载后发现目录下并没有CMakeLists.txt,所以直接在ROS工作目录下catkin_make并不会产生可执行文件

在这里插入图片描述

所以编写了build.sh脚本文件,如下:

echo "Building Navigation Pack"
cd ~/catkin_ws

echo -e "\nBuild amcl..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="amcl"

echo -e "\nBuild base_local_planner..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="base_local_planner"

echo -e "\nBuild carrot_planner..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="carrot_planner"

echo -e "\nBuild clear_costmap_recovery..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="clear_costmap_recovery"

echo -e "\nBuild costmap_2d..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="costmap_2d"

echo -e "\nBuild dwa_local_planner..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="dwa_local_planner"

echo -e "\nBuild fake_localization..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="fake_localization"

echo -e "\nBuild global_planner..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="global_planner"

echo -e "\nBuild map_server..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="map_server"

echo -e "\nBuild move_base..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="move_base"

echo -e "\nBuild move_slow_and_clear..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="move_slow_and_clear"

echo -e "\nBuild nav_core..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="nav_core"

echo -e "\nBuild navfn..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="navfn"

echo -e "\nBuild navigation..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="navigation"

echo -e "\nBuild robot_pose_ekf..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="robot_pose_ekf"

echo -e "\nBuild rotate_recovery..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="rotate_recovery"

echo -e "\nBuild voxel_grid..."
catkin_make -DCATKIN_WHITELIST_PACKAGES="voxel_grid"

在navigation-kinetic-devel目录下打开终端

chmod +x build.sh
./build.sh

即可完成编译

编译过程中可能会报错:

/home/redwall/catkin_ws/src/navigation-kinetic-devel/costmap_2d/cfg/Costmap2D.cfg 拒绝访问

之类的问题,其实就是该文件缺少可执行权限

打开任意终端,输入:

chmod +x /home/redwall/catkin_ws/src/navigation-kinetic-devel/costmap_2d/cfg/Costmap2D.cfg

但是像这种/cfg整个文件夹的,直接

chmod -R +x /home/redwall/catkin_ws/src/navigation-kinetic-devel/costmap_2d/cfg

还有就是编译costmap_2d提示缺少eigen3的依赖,实际上在/usr/local/include和/usr/include中都有,只是没在它指定的路径,打开终端

mkdir include

sudo cp -r /usr/local/include/eigen3 ~/include

问题基本上就是上面几点,最后在navigation-kinetic-devel目录下运行build.sh

多运行几次,最后没有报错,就编译安装成功了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Prejudices

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值