在Moveit中如何创建新的规划器(How to create a new motion planner in moveit)

本文详细介绍了如何在ROS的Moveit框架中创建一个新的运动规划器。首先从源代码编译Moveit和OMPL,接着删除预装的OMPL库,下载并修改OMPL源代码以添加新的规划器。同时需要修改Moveit的源代码,在planning_context_manager.cpp中包含新规划器的头文件并进行注册。最后,更新ompl_planning.yaml配置文件,并确保正确编译和安装。
摘要由CSDN通过智能技术生成

在Moveit中如何创建新的规划器(How to create a new motion planner in moveit)

在ROS中源码下载moveit和OMPL的步骤:

As of today (July 2018), the solution to implementing a new sampler (or a planner for that matter) in MoveIt works as follow:

1.Build MoveIt from source. Just follow the instructions on MoveIt website. I tested with ROS Kinetic. (As long as you later use an OMPL version that is compatible with your ROS distro, everything should work fine)
2.Delete the OMPL binaries that should have been installed by the procedure in the previous link. To do that I used sudo apt-get remove and sudo apt-get purge on the libompl-dev package.记得把sudo apt-get install 的OMPL包删掉。
3.Download/Checkout OMPL source code. You can use their BitBucket repository, in the “Download” section, in the “Branches” tab, you can find archives containing source code compatible with your ROS distro. Put the source code in the same catkin workspace as your MoveIt source.
4.Modify OMPL source code as you need. You can find tutorials about adding planners/samplers on their website.在你的MyPlanner.h里面最好是继承base::Planner,例如 class MyPlanner : public base::Planner
5. Modify MoveIt source code. If you added a planner, you need to do that. It shouldn’t be needed if you just added a new sampling strategy. Modify planning_context_manager.h and planning_context_manager.cpp to add your planner just like the original ones. This comes from this webarchive.写完代码后要在planning_context_manager.cpp 添加#include <ompl/geometric/planners/rrt/MyPlanner.h>,还有一定要在planning_context_manager.cpp 里面注册新的planner,例如我的就是 registerPlannerAllocator(“geometric::MyPlanner”, boost::bind(&allocatePlannerog::MyP

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值