ROS与navigation教程-示例-导航目标设置(C++)
ROS与navigation教程-示例-导航目标设置(C++)
说明:
- 介绍如何实现指定目标点导航
代码:
安装:
- 新建目录
$ mkdir -p ~/catkin_ws/src
- 下载并编译
$ cd ~/catkin_ws/src
$ git clone https://github.com/ros-planning/navigation_tutorials
$ cd ..
$ catkin_make
测试
- 新终端,执行roscore
$ roscore
- 修改源码simple_navigation_goals.cpp
rosed simple_navigation_goals_tutorial simple_navigation_goals.cpp
- 替换里面的坐标点
goal.target_pose.pose.position.x = 2.0;
goal.target_pose.pose.position.y = 0.2;
- 新终端,执行驱动
$ rosrun simple_navigation_goals_tutorial simple_navigation_goals
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号