diff --git a/README.md b/README.md index e2dffbd..ad32365 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,149 @@ -# navi_multi_goals_pub_rviz_plugin +# SLAM 多点导航功能包 -此插件是配合ROS-RViz-Navigation来使用的。 +## navi_multi_goals_pub_rviz_plugin -主要目的是解决Navigation中只能设置一个目标点,而不是多个。 -操作步骤 ----- -下载 +### 描述: + +该功能包为SLAM 建图导航提供可发布多个目标点任务的导航方式。 + +### 要求: + +必须基于 Autolabor SLAM导航使用 + +![](images/intro.png) + + +### 一、安装与配置 + + +#### 1. 下载程序包 + +进入 /home/autolabor/catkin_ws/src 目录,执行 + ``` -git clone https://github.com/RYOOSS/navi_multi_goals_pub_rviz_plugin.git +git clone https://github.com/autolaborcenter/navi_multi_goals_pub_rviz_plugin.git ``` -编译后更改*.rviz文件 - ``` - Tools: - - Class: rviz/SetGoal - Topic: /move_base_simple/goal_temp -``` -启动rviz后,在Rviz的Display中add一个Marker -RViz的左上角依次点击Panels->Add New Panel-> navi_multi_goals_pub_rviz_plugin->MultiNaviGoalsPanel +或访问 https://github.com/autolaborcenter/navi_multi_goals_pub_rviz_plugin.git 下载源代码,放入 /home/autolabor/catkin_ws/src 目录中 -填写目标最大数量后,确定。 +![](images/download-file.png) -点击ToolBar上的2D Nav Goal后,依次在Map中设置导航目标点,目标点个数不能超过填写的目标最大数量。 +#### 2. 编译 -点击开始导航,导航开始。 +工作空间首次编译,请进入到 /home/autolabor/catkin_ws/script/common/,执行 `./rebuild` 编译脚本。 -若勾选循环,导航至最后一个目标点后,将重新导航至第一个目标点。 +如已执行过 rebuild 脚本,进入到/home/autolabor/catkin_ws/,根目录下执行 `catkin build` 即可。 -若点击取消,将取消当前目标点导航。 -若点击重置,将清空当前所有目标点。 +#### 3. 编译完成后,启动【开始导航】 -![ryoo rviz](https://github.com/RYOOSS/navi_multi_goals_pub_rviz_plugin/blob/master/image/rviz_screenshot_2020_09_21-12_17_49.png) +**注:要求提前建好地图。** +![](images/intro1.png) + +#### 4. 加载插件 + +RViz 的左上角依次点击 Panels -> Add New Panel -> navi_multi_goals_pub_rviz_plugin -> TeleopPanel + + + +
+ +*** + +**加载完毕:** + +![](images/intro4.png) + + +#### 5. 修改配置 + +##### 1) 新增 marker (目标点标记) + +RViz 左侧 Display -> add -> Marker + + + +
+ +*** + +##### 2) 修改 2D Nav Goal 按钮话题 + +RViz 的左上角 Panels->Add New Panel-> Tool Property + +将 2D Nav Goal -> Topic 修改为 /move_base_simple/goal_temp + + + +
+ +*** + +**做完以上4、5步操作后 Ctrl + S 保存 RViz 配置,如忘记保存,则下次进来要重复操作。** + + + +### 二、使用 + +### 操作区说明 + +![](images/intro10.png) + +① 可设置目标点的最大数量:要求所设置目标点个数不能大于该参数(可以小于) + +② 是否循环:若勾选,导航至最后一个目标点后,将重新导航至第一个目标点。例:1->2->3->1->2->3->···,该选项必须在开始导航前勾选 + +③ 任务目标点列表: x/y/yaw,地图上给定目标点的位姿(xy坐标与航向角yaw)。 + +* 设置完目标最大数量,保存后,该列表会生成对应数量的条目 +* 每给出一个目标点,此处会读取到目标点的坐标与朝向 + +④ 重置:将清空当前所有目标点 + +⑤ 取消:取消当前目标点导航任务,机器人停止运动。再次点击开始导航后,会从下一个任务点开始。 + +例:1->2->3,在1->2的过程中点击取消,机器人停止运动,点击开始导航后,机器人将从当前坐标点去往3。 + +⑥ 开始导航:开始任务 + +### 操作步骤说明 + +#### 1. 初始化机器人位置 + +点击开始导航,打开 rviz,使用键盘控制机器人运动,当环境特征与地图匹配完成后,机器人会定位到地图中对应的位置。 + +#### 2. 设置任务 + +##### 1) 设置任务目标点个数,点击确认保存 + +![](images/intro16.png) + + +##### 2) 设置目标点 + +点击ToolBar上的2D Nav Goal,在地图上给定目标点。(每次设置都需要先点击2D Nav Goal) + +目标点有朝向区分,箭头顶端为车头方向。 + +![](images/intro11.png) + +##### 3) 点击开始导航,导航开始 + +![](images/intro12.png) + + +已完成任务会变为红色(如下图) + +![](images/intro13.png) + + +![](images/intro14.png) + + +未勾选循环,单次任务完成后停止。 + +勾选循环,单次任务完成后,会从最后一个目标点到第一个目标点,显示颜色为蓝色。 + +![](images/intro15.png) \ No newline at end of file diff --git a/image/rviz_screenshot_2020_09_21-12_17_49.png b/image/rviz_screenshot_2020_09_21-12_17_49.png deleted file mode 100644 index af0d0a6..0000000 Binary files a/image/rviz_screenshot_2020_09_21-12_17_49.png and /dev/null differ diff --git a/images/download-file.png b/images/download-file.png new file mode 100644 index 0000000..188e893 Binary files /dev/null and b/images/download-file.png differ diff --git a/images/intro.png b/images/intro.png new file mode 100644 index 0000000..421641c Binary files /dev/null and b/images/intro.png differ diff --git a/images/intro1.png b/images/intro1.png new file mode 100644 index 0000000..123fb77 Binary files /dev/null and b/images/intro1.png differ diff --git a/images/intro10.png b/images/intro10.png new file mode 100644 index 0000000..1b1e6de Binary files /dev/null and b/images/intro10.png differ diff --git a/images/intro11.png b/images/intro11.png new file mode 100644 index 0000000..ed408a3 Binary files /dev/null and b/images/intro11.png differ diff --git a/images/intro12.png b/images/intro12.png new file mode 100644 index 0000000..df3cc77 Binary files /dev/null and b/images/intro12.png differ diff --git a/images/intro13.png b/images/intro13.png new file mode 100644 index 0000000..f927521 Binary files /dev/null and b/images/intro13.png differ diff --git a/images/intro14.png b/images/intro14.png new file mode 100644 index 0000000..1fff463 Binary files /dev/null and b/images/intro14.png differ diff --git a/images/intro15.png b/images/intro15.png new file mode 100644 index 0000000..3c14c6e Binary files /dev/null and b/images/intro15.png differ diff --git a/images/intro16.png b/images/intro16.png new file mode 100644 index 0000000..46658ad Binary files /dev/null and b/images/intro16.png differ diff --git a/images/intro2.png b/images/intro2.png new file mode 100644 index 0000000..8873868 Binary files /dev/null and b/images/intro2.png differ diff --git a/images/intro3.png b/images/intro3.png new file mode 100644 index 0000000..9ecd980 Binary files /dev/null and b/images/intro3.png differ diff --git a/images/intro4.png b/images/intro4.png new file mode 100644 index 0000000..5281e22 Binary files /dev/null and b/images/intro4.png differ diff --git a/images/intro5.png b/images/intro5.png new file mode 100644 index 0000000..97ab6b3 Binary files /dev/null and b/images/intro5.png differ diff --git a/images/intro6.png b/images/intro6.png new file mode 100644 index 0000000..99c767f Binary files /dev/null and b/images/intro6.png differ diff --git a/images/intro7.png b/images/intro7.png new file mode 100644 index 0000000..b2bb4a8 Binary files /dev/null and b/images/intro7.png differ diff --git a/images/intro8.png b/images/intro8.png new file mode 100644 index 0000000..940c63e Binary files /dev/null and b/images/intro8.png differ diff --git a/images/intro9.png b/images/intro9.png new file mode 100644 index 0000000..7c513df Binary files /dev/null and b/images/intro9.png differ