【论文阅读】ICRA2021: VDB-EDT An Efficient Euclidean Distance Transform Algorithm Based on VDB Data Struct

article/2025/10/12 12:43:15

参考与前言

Summary: 浩哥推荐的一篇 无人机下的建图 and planning实验
Type: ICRA
Year: 2021

论文链接:https://arxiv.org/abs/2105.04419

youtube presentation video:https://youtu.be/Bojh6ylYUOo

代码链接:https://github.com/zhudelong/VDB-EDT

1. Motivation

Eucliden distance transform EDT 对于机器人运动规划是很重要的,但是生成EDT 是比较费时的一件事,同时需要时刻更新并维护这样一个地图,本篇文章主要 通过优化数据结构和distance transform的过程来提升EDT算法的速度

在本文中,我们采用了树结构进行 hashing-based EDTs,主要是在做规划时发现 最优轨迹其实值需要考虑一定范围的障碍物, full distance information其实对于规划来说是冗余的,所以实际free部分都是一个值。These regions can then be efficiently encoded by a few number of tree nodes. Such a property is called spatial coherency, which can help further reduce memory consumption.

Benefiting from the fast index and caching systems, VDB achieves a much faster random access speed than Octree and also exhibits a competitive performance with the voxel hashing.

Contribution

  • the first time introduce the VDB data structure for distance field representation, which significantly reduces the memory consumption of EDT.
  • we propose a novel algorithm to facilitate distance transform procedure and significantly improve the running speed of conventional EDT algorithms.

2. Method

首先是问题定义,一个典型的distance transform问题 可以表达为如下公式:

d ( x i ) = min ⁡ x j f ( x i , x j ) , s.t.  x i ∈ M f , x j ∈ M o \begin{array}{ll}d\left(x_i\right)=\min _{x_j} f\left(x_i, x_j\right), \\\text { s.t. } \quad x_i \in \mathcal{M}_f, x_j \in \mathcal{M}_o\end{array} d(xi)=minxjf(xi,xj), s.t. xiMf,xjMo

其中,Mf是指free space,Mo是被占据空间,x为在grid map M中的坐标,目标函数f表示xi到xj之间的距离,目标是搜索对于每个xi都找其最近的xj作为距离

随后问题有了d(x) 后 我们就走到了 要找到一条安全的路径,则问题可表述为如下:

min ⁡ x 0 : N ∑ i = 0 N α ∥ x i + 1 − x i ∥ + ( 1 − α ) max ⁡ ( 0 , d max ⁡ − d ( x i ) ) s.t.  x i , x i + 1 ∈ M f x 0 = x s , x N = x f g ( x i , x i − 1 , x i + 1 ) < θ \begin{array}{ll}\min _{x_{0: N}} & \sum_{i=0}^N \alpha\left\|x_{i+1}-x_i\right\|+(1-\alpha) \max \left(0, d_{\max }-d\left(x_i\right)\right) \\\text { s.t. } & x_i, x_{i+1} \in \mathcal{M}_f \\& x_0=x_s, x_N=x_f \\& g\left(x_i, x_{i-1}, x_{i+1}\right)<\theta\end{array} minx0:N s.t. i=0Nαxi+1xi+(1α)max(0,dmaxd(xi))xi,xi+1Mfx0=xs,xN=xfg(xi,xi1,xi+1)<θ

其中,dmax是最大的transform distance,xs起点,xf终点,alpha为balance coefficient,g<theta主要是限制两个连续点之间产生较大的角度,平滑轨迹用的。目标函数中 前者为路径长度的cost,后者为避障的cost

2.1 数据结构

主要是介绍了VDB结构,由Museth[25] 提出的。It sufficiently exploits the sparsity of volumetric data, and employs a variant of B+ tree [32] to represent the data hierarchically.

下图是1D结构下的VDB,其和B+的几个特性是一致的,root node为索引,由hashmap建立,下面为internal node 和 leaf node保存了数据。也有本质上的不同:

it encodes values in internal nodes, called tile value. The tile value and child pointer exclusively use the same memory unit, and a flag is additionally leveraged to identify the different cases. A tile value only takes up tens of bits memory but can represent a large area in the distance field, which is the key feature leveraged to improve memory efficiency.

B+是一种平衡tree,在数据库中常用,主要原因是对于树结构的查询,程序加载子节点都需要进行一次磁盘IO,磁盘IO 比 读内存IO要慢 所以多叉的B+ tree可以减少I/O的次数
参考:b站视频 “索引”的原理 4min 建议感兴趣的可以再查询进阶数据结构书籍了解 实际上代码是直接openvdb库直接构建的

  • VDB: the branching factors are very large and variable, making the tree shallow and wide
  • Octree-based: deep and narrow, thus not fast enough for distance transform.

2.2 VDB-EDT

感觉这个看文中会比较好 主要是针对伪代码的解释

The distance field represented by VDB is essentially a sparse volumetric grid, and each field point is represented by a grid cell s indexed by a 3-D coordinate.

更新部分code:

void VDBMap::update_occmap(FloatGrid::Ptr grid_map, const tf::Vector3 &origin, XYZCloud::Ptr xyz)
{auto grid_acc = grid_map->getAccessor();auto tfm = grid_map->transform();openvdb::Vec3d origin3d(origin.x(), origin.y(), origin.z());openvdb::Vec3d origin_ijk = grid_map->worldToIndex(origin3d);for (auto point = xyz->begin(); point != xyz->end(); ++point) {openvdb::Vec3d p_xyz(point->x, point->y, point->z);openvdb::Vec3d p_ijk = grid_map->worldToIndex(p_xyz);openvdb::Vec3d dir(p_ijk - origin_ijk);double range = dir.length();dir.normalize();// Note: real sensor range should stractly larger than sensor_rangebool truncated = false;openvdb::math::Ray<double> ray(origin_ijk, dir);// openvdb::math::DDA<openvdb::math::Ray<double>, 0> dda(ray, 0., std::min(SENSOR_RANGE, range));//        if (START_RANGE >= std::min(SENSOR_RANGE, range)){
//            continue;
//        }openvdb::math::DDA<openvdb::math::Ray<double>, 0> dda(ray, 0, std::min(SENSOR_RANGE, range));// decrease occupancydo {openvdb::Coord ijk(dda.voxel());float ll_old;bool isKnown = grid_acc.probeValue(ijk, ll_old);float ll_new = std::max(L_MIN, ll_old+L_FREE);if(!isKnown){grid_distance_->dist_acc_->setValueOn(ijk);} // unknown -> free -> EDT initializeelse if(ll_old >= 0 && ll_new < 0){grid_distance_->removeObstacle(ijk);} // occupied -> free -> EDT RemoveObstaclegrid_acc.setValueOn(ijk, ll_new);dda.step();} while (dda.time() < dda.maxTime());// increase occupancyif ((!truncated) && (range <= SENSOR_RANGE)){for (int i=0; i < HIT_THICKNESS; ++i) {openvdb::Coord ijk(dda.voxel());float ll_old;bool isKnown = grid_acc.probeValue(ijk, ll_old);float ll_new = std::min(L_MAX, ll_old+L_OCCU);if(!isKnown){grid_distance_->dist_acc_->setValueOn(ijk);} // unknown -> occupied -> EDT SetObstacleelse if(ll_old < 0 && ll_new >= 0){grid_distance_->setObstacle(ijk);} // free -> occupied -> EDT SetObstaclegrid_acc.setValueOn(ijk, ll_new);dda.step();}} // process obstacle} // end inserting/* commit changes to the open queue*/
}

3. 实验及结果

各个阈值对时间的影响,其中对比了几个baseline方法如下:

  • A commonly-used general EDT [18] (denoted without -Ex suffix)
  • the proposed algorithm (denoted with -Ex suffix).
  • Two implementations based on the array and VDB data structures to compare their memory efficiency (denoted with Arr- and VDB- prefix, respectively)

可以看到 在时间上-Ex 的耗时都比无Ex的快,虽然VDB的速度上比arr的还是慢了一点 10%-25%,但是从memeory cost上确实节约了30-60%的 Herein, the increment of time cost is inevitable, as VDB is based on tree structures and has a slower random access speed than the array-based implementation

同样表格是在数据集上的表现,在global 和 incremental transform会慢一点,但是在memory上省了不少

还有一个就是无人机在仿真环境中建图并有planning效果:

4. Conclusion

提出了一种VDB-EDT算法去解决 distance transform problem. The algorithm is implemented based on a memory-efficient data structure and a novel distance transform procedure, which significantly improves the memory and runtime efficiency of EDTs.

这项工作突破了通常的EDT的限制,也可以为后面基于VDB-based mapping, distance transform and safe motion planning的研究进行使用


赠人点赞 手有余香 😆;正向回馈 才能更好开放记录 hhh


http://chatgpt.dhexx.cn/article/Gy1jCm2G.shtml

相关文章

scipy.ndimage.distance_transform_edt 和 cv2.distanceTransform用法

scipy.ndimage.distance_transform_edt 和 cv2.distanceTransform 的作用都是计算一张图上每个前景像素点到背景的最近距离。 import cv2 import numpy as np from scipy.ndimage import distance_transform_edta np.array(([0, 1, 1, 1, 1],[0, 0, 1, 1, 1],[0, 1, 1, 1, 1]…

java edt,java并发之EDT测试

测试代码如下&#xff1a; 1、耗时计算没有单独起线程处理&#xff0c;耗时计算在EDT线程执行&#xff0c;导致界面没有响应&#xff0c;处于卡死状态 package thread; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.concurrent…

linux服务端修改EDT为东八区,EDT开发环境配置

1 安装条件 512MB内存或更高 Win XP/Win Vista/Win 7/RedHat Linux 32位或者64位操作系统(推荐32位) 安装IE7/8/9、FireFoxLatest Version、Chrome等浏览器中的一种 OracleJRE 1.6或更高版本 2 安装步骤 EDT 0.8.0已经发布发布。用户现在可以在http://www.eclipse.org/edt/#d…

修改linux系统的时间EDT为CST

问题&#xff1a; Centos 系统时间下午时间显示为12小时制 分析&#xff1a; 开始以为是要设置为24小时制 后来执行date命令发现是EDT&#xff0c;EDT 是北美东部夏令时间&#xff0c;比UTC落后4个小时 解决&#xff1a; # mv /etc/localtime /etc/localtime.bak # ln -s …

EDT技术 ug - 第四章节Creation of the EDT Logic (持续更新)

文章目录 Compression Analysisanalyze_compression Preparetion For EDT Logic CreationParameter Specification for the EDT LogicDual Compresson ConfigurationDefine Dual Compression ConfigurationsASYmmetric Input and Output ChannelsBypass Scan ChainsLatch-Based…

java edt,Java Swing 学问篇 - EDT

Java Swing 常识篇之EDT 从毕业到现在用SWING已经一年多&#xff0c;在这里想总结一下过去学到的东西和经验&#xff0c;和各位兄弟姐妹们一起分享。在以后的文章中也会和大家一起来分享一些好的框架。说起JAVA SWING&#xff0c;普遍给人的感觉是“丑、慢、难”&#xff0c;丑…

edt嵌入式确定性测试_CallSerially EDT和InvokeAndBlock(第1部分)

edt嵌入式确定性测试 我们上一次在2008年解释了EDT背后的一些概念&#xff0c;因此&#xff0c;我们很高兴再次撰写有关EDT的文章&#xff0c;在开发人员指南以及有关Udemy的课程中都有关于EDT的部分&#xff0c;但是由于这是最重要的了解在Codename One中&#xff0c;它几乎没…

EDT部署功能介绍

EDT部署功能介绍 当你在开发EDT Web前段程序的时候&#xff0c;你需要接触到EDT部署操作&#xff0c;从而将生成好的RUIHandler和Service的目标代码部署复制到目标Web程序中。和大家所熟知的部署到应用程序服务器上不同&#xff0c;EDT的部署操作是将生成好的Java/JavaScript/…

EDT技术 ug - 第一章节 Getting Start

文章目录 引言TestKompress Compression LogicEDT FlowEDT IP generationEDT synEDT IP pattern gennerationATPG 熟悉工具batch mode执行系统命令 本系列介绍的是Tessent的EDT&#xff08; Embedded Deterministic Testing&#xff09;技术。 参考为EDT tessent的 TestCompre…

DIY01_NE555叮咚门铃

文章目录 项目简介电路原理一、555定时器电路结构及工作原理二、叮咚门铃电路工作原理 原理图与PCB图一、原理图二、PCB图1. 初版2. 改进版 实物图立创打板流程经验总结 项目简介 第一次尝试自己DIY一个小电路设计&#xff0c;笔者选择了相对简单的NE555叮咚门铃。在本篇博客中…

NE555波形发生器手把手教程之NE555内部结构(一)

通过ne555搭建的波形发生器 可实现方波、三角波、正弦波输出 工程链接&#xff1a;https://pan.baidu.com/s/1T-9bdnO1IrWUsjmRTl12zQ 提取码&#xff1a;py66 一、芯片介绍 参数 供应电压&#xff1a;4.5-18V 供应电流&#xff1a;10-15mA 输出电流&#xff1a;225mA (m…

NE555基本原理及相关公式的推导

NE555基本原理及相关公式的推导 基本原理公式推导 基本原理 NE555主要由分压电路&#xff0c;电压比较器&#xff0c;RS触发器三部分组成&#xff1b; 分压电路电压比较器RS触发器提供电压比较器比较电压根据触发信号输出高低电平用于输出矩形波 当 V A > 2 3 V c c V_A&g…

模电学习12. NE555 方波信号发生器

模电学习12. NE555 方波信号发生器 一、NE555 基本功能1. 基本作用2. 基本组成 二、NE555方波生成电路1. 基本原理2. 原理图3. 仿真&#xff08;1&#xff09;RP1 设置为10%&#xff08;2&#xff09;RP1设置为90% 4. 实际电路 一、NE555 基本功能 1. 基本作用 NE555是一款广…

mysql profile 工具Neor Profile

一、下载Download - Neor Profile SQL http://www.profilesql.com/files/download/sqlprofiler-4.1.1.exe Neor Profile 这款免费的mysql 分析工具&#xff0c;这个工具类似于一个代理 本地启动一个mysql 代理服务&#xff0c;类似于MyCat 二、安装完成配置 三、代码连接代…

蓝桥杯NE555定时器与频率测量

使用的是蓝桥杯单片机CT107D实训平台&#xff1a; 555定时器内部&#xff0c;有3个5K的电阻分压。 NE555是一个纯硬件的设计&#xff0c;一旦电路确定了&#xff0c;其功能也就定了。 在蓝桥杯的板子上&#xff0c;555定时器是一个信号发生电路&#xff0c;通过定位器Rb3可改…

NE555的使用与理解

NE555 一款模拟与数字信号的集成芯片&#xff0c;通过一个电容充放电来输出方波&#xff0c;电容充放电的快慢决定了NE555输出的方波的频率&#xff0c;再通过控制两个电阻的比值来改变其输出方波的占空比。 外观图 内部图 因为NE555中有三个电阻R且都为5K所以称为555&#x…

蓝桥杯单片机设计与开发⑬ ---NE555模块

一、555定时器&频率测量 1. 电路原理 NE555是一种时钟芯片&#xff0c;输出一定频率的脉冲信号。就其模块特性&#xff0c;简单点来说&#xff0c;该模块会根据Rb3电位器的阻值&#xff0c;在SIG脚输出相应的频率的脉冲信号。 第十届竞赛中对该模块设置了考点&#xff0c;…

NE555 Motor LED Chaser

文章目录 1.前言2.资料下载 1.前言 这个是从YouTube上搬运来的&#xff0c;如图所示 2.资料下载 所需材料 #1# 10k resistor 1 #2# 10k variable resistor 1 #3# 10uf capacitor 1 #4# 3mm blue led 4 #5# 3mm yellow led 4 #6# 3mm red led 4 #7# 3mm green led 4 #8# 3mm…

单片机蓝桥杯——NE555频率测量

原理: 对蓝桥杯单片机板子上NE555电路进行频率测量时&#xff0c;不需要任何的配置&#xff0c;整个单片机测量频率的过程中&#xff0c;跟NE555芯片没什么关系&#xff0c;归根结底考察的还是定时/计数器。但需要注意&#xff1a; &#xff08;1&#xff09;当用到NE555时&am…

蓝桥杯单片机-NE555模块

一、简介 1、NE555在开发板中用于输出频率可变&#xff0c;占空比不变的方波。 2、NE555是纯硬件的设计&#xff0c;通过电位器RB3可改变其信号输出频率。不需要编程实现其功能。 考点&#xff1a;使用定时器的计数模式测量NE555输出的频率 3、开发板上电路 NET SIG即接P34&…