ros_motion_planning中的路径规划算法如何集成到自己的机器人上
·
ros_motion_planning中的路径规划算法如何集成到自己的机器人上
关于路径规划算法的宝藏资源ai-winter/ros_motion_planning在自己的机器人上使用。
- 安装依赖
- OSQP
git clone -b release-0.6.3 --recursive https://github.com/oxfordcontrol/osqp
cd osqp && mkdir build && cd buildcmake .. -DBUILD_SHARED_LIBS=ONmake -j6sudo make installsudo cp /usr/local/include/osqp/* /usr/local/include
- OSQP-Eigen
git clone https://github.com/robotology/osqp-eigen.git
cd osqp-eigen && mkdir build && cd buildcmake ..makesudo make install
- Other dependence.
sudo apt install python-is-python3 \ros-noetic-amcl \ros-noetic-base-local-planner \ros-noetic-map-server \ros-noetic-move-base \ros-noetic-navfn
- 克隆代码
git clone https://github.com/ai-winter/ros_motion_planning.git
- 编译代码
cd ros_motion_planning/
catkin_make
查看已注册的插件
rospack plugins --attrib=plugin nav_core

以theta*全局路径规划算法为例,展示如何加入到自己的机器人中去。
在ros_motion_planning-master\src\core\global_planner\graph_planner路径下可以看见,注册的插件是graph_planner

不理解的伙伴可以看看navigation/教程/在ROS中编写全局路径规划器作为插件 - ROS Wiki
在graph_planner.cpp可以看到,参数planner_name用于选择全局路径规划算法。

那么只要你的插件已经注册好啦,只需要在move_base_params.yaml文件中将全局路径规划器的配置改成
base_global_planner:"graph_planner/GraphPlanner"
planner_name:"theta_star"

OK大功告成啦!可以在rviz里修改全局路径规划器的话题即可以看到新全局路径规划算法规划的路径啦!
不过感觉路径比较曲折,并不平滑。
好在里面也有不少路径平滑算法,如下图所示,但是如何应用进去,笔者尚在探索。

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐

所有评论(0)