OMPL官方教程学习Optimal Planning Tutorial

Optimal Planning Tutorial

Optimal Planning应该是最优规划吧,规划算法在某种程度上是最优,比如RRT*等等。

官方教程中说使用要进行Optimal Planning 与一般的规划方法使用流程基本一样,只不过多了一下两点:

  1. 需要为ompl::base::ProblemDefinition 对象设置目标函数optimization objective
  2. 需要使用最有规划器optimizing planner,而不是一般的规划器。

尴尬我都不知道一般的规划器使用流程。。。。。官方在第一篇教程中有简单介绍,这里写一下:

  1. 一般的规划的步骤:
    1. 使用SimpleSetup 对象则:
      1. 应该使用setPlanner() 完成
    2. 不使用SimpleSetup对象则:
      1. 创建SpaceInformation
      2. 创建ProblemDefinition 根据SpaceInformation
      3. ProblemDefinition 设置起点终点
      4. 创建planner,根据SpaceInformation 以及所使用的规划方法
      5. planner 设置ProblemDefinition
      6. planner->setup(),启动?
      7. planner->slove(),求解.
  2. 最优规划的步骤:
    1. 教程中只给了不使用SimpleSetup 的情况,下面列出不同之处:
      1. 创建SpaceInformation
      2. 创建ProblemDefinition 根据SpaceInformation
      3. 为ProblemDefinition 设置起点终点
      4. 创建OptimizationObjective
      5. 为ProblemDefinition 设置OptimizationObjective
      6. 创建planner,根据SpaceInformation 以及所使用的最优规划方法
      7. 为planner 设置ProblemDefinition
      8. planner->setup(),启动?
      9. planner->slove(),求解.

1.Finding the shortest path

官方提供的场景:从(0,0)到(1,1)的一个二维区域,障碍物在(0.5,0.5)半径为0.25

We’ll demonstrate OMPL’s optimal planning framework with an example. In this example, our robot is represented as a (x,y) coordinate on a square, where (0,0) is the square’s bottom-left corner and (1,1) is the square’s top-right corner. There is also an obstacle in this square that the robot cannot pass through; this obstacle is a circle of radius 0.25 centered at (0.5,0.5). To reflect this environment, we use a two-dimensional ompl::base::RealVectorStateSpace and define our state validity checker as follows:

官方自定义了一个state validity checker,我们StateValidityCheckerStateSpace 对象是必须实现的两个对象。实现StateValidityChecker 主要就是为了实现两个虚函数,不过这两个虚函数在基类也有实现,这里重新实现了:

  1. isValid:判断状态是否有效
  2. clearance:当前状态距离最近的无效状态之间的距离

    Report the distance to the nearest invalid state when starting from state. If the distance is negative, the value of clearance is the penetration depth.

// Our collision checker. For this demo, our robot's state space
// lies in [0,1]x[0,1], with a circular obstacle of radius 0.25
// centered at (0.5,0.5). Any states lying in this circular region are
// considered "in collision".
class ValidityChecker : public ob::StateValidityChecker
{
   
public:
    ValidityChecker(const ob::SpaceInformationPtr& si) :
        ob::StateValidityChecker(si) {
   }
 
    // Returns whether the given state's position overlaps the
    // circular obstacle
    bool isValid(const ob::State* state) const
    {
   
        return 
### 解决VMware Workstation 16 Player 启用侧通道缓解后无法启动虚拟机 当遇到VMware Workstation不可恢复错误(vcpu-3),这通常是因为启用了侧通道攻击缓解措施所引起的[^1]。为了使虚拟机能正常启动,有几种方法可以尝试: #### 方法一:关闭侧通道攻击缓解功能 如果安全环境允许,在不影响整体安全性的情况下可以选择关闭此选项来解决问题。 对于Windows操作系统而言,可以通过修改注册表实现这一目的: 1. 打开注册表编辑器; 2. 定位至`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management`; 3. 创建名为`DisableSideChannelMitigations`的新DWORD(32-bit)值并将其设为1; 这种方法能够有效规避由侧通道防护机制引发的兼容性问题,从而确保虚拟机顺利加载。 #### 方法二:更新BIOS/UEFI固件版本 有时硬件层面也存在针对此类漏洞的安全补丁未及时应用的情况,因此建议检查主板制造商官网是否有新的BIOS/UEFI版本发布,并按照指导完成升级工作。这样不仅有助于提高系统的稳定性,还能增强抵御潜在威胁的能力。 #### 方法三:调整虚拟CPU配置参数 另一种可行的办法是在虚拟机设置里适当减少分配给它的处理器核心数或是改变其拓扑结构(比如从多核改为单核)。因为某些老旧的操作系统可能并不完全支持现代CPU特性,通过简化架构可以在一定程度上绕过这些限制条件。 ```bash # 修改虚拟机.vmx文件中的相关内容如下所示: numvcpus = "1" cpuid.coresPerSocket = "1" ``` 以上三种方式均能在不同程度上帮助克服由于开启了侧通道攻击防范而导致的VMware Workstation 16 Player无法正常使用的问题。具体采取哪种策略取决于个人需求以及所在环境的具体情况而定。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值