[英]Can I implement potential field/depth first method for obstacle avoidance using boost graph?
I implemented an obstacle avoidance algorithm in Matlab which assigns every node in a graph a potential and tries to descend this potential (the goal of the pathplanning is in the global minimum). 我在Matlab中实现了一个避障算法,它为图中的每个节点分配一个潜力,并试图降低这个潜力(路径规划的目标是全局最小值)。 Now there might appear local minima, so the (global) planning needs a way to get out of these. 现在可能会出现局部最小值,因此(全局)规划需要一种方法来摆脱这些局面。 I used the strategy to have a list of open nodes which are reachable from the already visited nodes. 我使用该策略获得了一个可以从已访问过的节点访问的开放节点列表。 I visit the open node which has the smallest potential next. 我访问下一个具有最小潜力的开放节点。
I want to implement this in C++ and I am wondering if Boost Graph has such algorithms already. 我想用C ++实现它,我想知道Boost Graph是否已经有了这样的算法。 If not - is there any benefit from using this library if I have to write the algorithm myself and I will also have to create my own graph class because the graph is too big to be stored as adjacency list/edge list in memory. 如果不是 - 如果我必须自己编写算法,那么使用这个库是否有任何好处,我还必须创建自己的图类,因为图形太大而无法作为邻接列表/边缘列表存储在内存中。
Any advice appreciated! 任何建议赞赏!
boost::graph
provides a list of Shortest Paths / Cost Minimization Algorithms. boost::graph
提供最短路径/成本最小化算法列表 。 You might be interested in the followings: Dijkstra Shortest path , A* . 您可能对以下内容感兴趣: Dijkstra Shortest path , A * 。
The algorithms can be easily customized. 算法可以轻松定制。 If that doesn't exactly fit your needs, take a look at the visitor concepts . 如果这不完全符合您的需求,请查看访问者概念 。 It allows you to customize your algorithm at some predefined event point. 它允许您在某个预定义的事件点自定义算法。
Finally Distributed BGL handles huge graph (potentially millions of nodes). 最后, 分布式BGL处理巨大的图形(可能有数百万个节点)。 It will work for you if your graph does not fit in memory. 如果您的图形不适合内存,它将适用于您。
You can find good overview of the Boost Graph Library here . 您可以在此处找到Boost Graph Library的概述。 And of course, do not hesitate to ask more specific question about BGL on stackoverflow. 当然,请不要犹豫,在stackoverflow上询问有关BGL的更具体问题。
To my mind, boost::graph
is really awesome for implementing new algorithms, because it provides various data holders, adaptors and commonly used stuff (which can obviously be used as parts of the newly constructed algorithms). 在我看来, boost::graph
对于实现新算法来说真的很棒,因为它提供了各种数据持有者,适配器和常用的东西(显然可以用作新构造算法的一部分)。
Last ones are also customizable due to usage of visitors and other smart patterns. 由于访问者和其他智能模式的使用,最后的也可以自定义。
Actually, boost::graph
may take some time to get used to, but in my opinion it's really worth it. 实际上, boost::graph
可能需要一些时间才能习惯,但在我看来,它确实值得。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.