我可以使用增强图实现势场/深度优先方法来避障吗?

发布于 2024-10-01 18:20:52 字数 285 浏览 5 评论 0原文

我在 Matlab 中实现了一种避障算法,该算法为图中的每个节点分配一个势能,并尝试降低该势能(路径规划的目标是全局最小值)。现在可能会出现局部最小值,因此(全局)规划需要一种方法来摆脱这些。我使用该策略来获得可从已访问的节点访问的开放节点列表。接下来我访问具有最小潜力的开放节点。

我想用 C++ 实现这个,我想知道 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). 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. 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悲凉≈ 2024-10-08 18:20:52

boost::graph 提供了 最短路径/成本最小化算法列表。您可能对以下内容感兴趣:Dijkstra 最短路径、A*
算法可以轻松定制。如果这不完全符合您的需求,请查看 访客概念。它允许您在某些预定义的事件点自定义算法。

最后 分布式 BGL 处理巨大的图(可能有数百万个节点)。如果你的图表不适合内存,它会为你工作。

您可以在此处找到有关 Boost Graph Library 的详细概述。
当然,请随时在 stackoverflow 上询问有关 BGL 的更具体问题。

boost::graph provides a list of Shortest Paths / Cost Minimization Algorithms. You might be interested in the followings: 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). It will work for you if your graph does not fit in memory.

You can find good overview of the Boost Graph Library here.
And of course, do not hesitate to ask more specific question about BGL on stackoverflow.

荒人说梦 2024-10-08 18:20:52

在我看来,boost::graph 对于实现新算法来说确实很棒,因为它提供了各种数据持有者、适配器和常用的东西(显然可以用作新构建的算法的一部分)。

由于访问者和其他智能模式的使用,最后一个也可以自定义。

实际上,boost::graph可能需要一些时间来适应,但在我看来,它确实值得的。

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).

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文