该文章首次编写于2020年1月24日,在该时间点后可能会有新的改变导致安装失败,如果有问题请查看官方文档的更新或给我评论。
我假设你已经安装了ROS核心组件
首先,安装依赖
sudo apt install flex bison freeglut3-dev libbdd-dev python-catkin-tools ros-$ROS_DISTRO-navigation ros-$ROS_DISTRO-tf2-bullet sudo apt-get install python-pymongo mongodb scons
然后创建一个存放ROSPlan包的工作空间,我假设你使用~/ros_playground .
打开这个工作空间的src目录,克隆所需要的文件
cd ~/ros_playground/src git clone https://github.com/KCL-Planning/ROSPlan.git git clone https://github.com/KCL-Planning/rosplan_demos.git git clone https://github.com/clearpathrobotics/occupancy_grid_utils.git git clone -b kinetic-devel https://github.com/strands-project/mongodb_store.git
然后,返回上一级目录,编译
cd ../ catkin_make
使用下面的命令为数据库创建一个文件夹,否则你后面会遇到类似下面的错误
Can’t find database at supplied path ~/ros_playground/src/ROSPlan/rosplan_knowledge_base/common/mongoDB/. If this is a new DB, create it as an empty directory
mkdir -p ~/ros_playground/src/ROSPlan/rosplan_knowledge_base/common/mongoDB/
现在,你可以返回官网继续教程了,在启动tutorial_01.launc 之前别忘了运行roscore
This article is written on 24 Jan 2020. Some materials may be expired after that time, please check the latest related documents.
Install the following dependencies.
sudo apt install flex bison freeglut3-dev libbdd-dev python-catkin-tools ros-$ROS_DISTRO-navigation ros-$ROS_DISTRO-tf2-bullet sudo apt-get install python-pymongo mongodb scons
Select or create a workspace for the ROSPlan package. I assume you are using ~/ros_playground .
Go to the source folder of your workspace and clone all the necessary packages by using Git.
cd ~/ros_playground/src git clone https://github.com/KCL-Planning/ROSPlan.git git clone https://github.com/KCL-Planning/rosplan_demos.git git clone https://github.com/clearpathrobotics/occupancy_grid_utils.git git clone -b kinetic-devel https://github.com/strands-project/mongodb_store.git
Go to the parent directory and compile these packages
cd ../ catkin_make
Create an empty directory for the new database or you will get an error such like Can’t find database at supplied path ~/ros_playground/src/ROSPlan/rosplan_knowledge_base/common/mongoDB/. If this is a new DB, create it as an empty directory
mkdir -p ~/ros_playground/src/ROSPlan/rosplan_knowledge_base/common/mongoDB/
Now, you can try to back to the official tutorial. Please remind before you execute the tutorial_01.launch you need to run a ROS master node at first. For example, try to execute
roscore