代码链接:https://github.com/CoderWangcai/DRL_Path_Planning
环境配置
Ubuntu 16.04
ROS Kinetic
Python 2.7
Tensorflow 1.12.0
安装
\quad
首先创建一个名为catkin_ws的工作空间,将DRL_Path_Planning/src/下的文件拷贝到catkin_ws/src/里。
$ mkdir -p catkin_ws/src #创建catkin工作空间
安装依赖
$ cd ~/catkin_ws
$ rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y --os=ubuntu:xenial
\quad
可能会遇到关于pointgrey_camera_driver的问题:
\quad
解决方法如下:
cd src/
git clone https://github.com/ros-drivers/pointgrey_camera_driver
cd ..
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y --os=ubuntu:xenial
编译
\quad
接着回到catkin_ws下编译
$ cd ~/catkin_ws
$ catkin_make
\quad
编译到上面这里的时候卡住了,没关系,ctrl+c,然后把刚刚Download的pointgrey_camera_driver文件夹删除,因为现在已经生成相关的消息了,它不起作用了。再次编译:
catkin_make
仿真
\quad
在anaconda中构建虚拟环境,在虚拟环境中安装tensorflow和ROS依赖包
$ conda create -n py27 python=2.7
$ source activate py27
$ pip install -U rosinstall msgpack empy defusedxml netifaces
$ pip install tensorflow==1.12.0 -i https://pypi.doubanio.com/simple/
$ source /opt/ros/kinetic/setup.bash
$ source /home/PATH_TO_YOUR_WORKSPACE/devel/setup.bash
\quad 编译完成后输入
$ roslaunch multi_jackal_tutorials ten_jackal_laser_add_apriltag.launch
\quad
如果没有报错,第一次加载需要等待一下:
\quad
加载完全会看到这个画面: