第142篇 ROS2安全机制——SROS2和通信加密

面试翻车现场

面试一家做医疗机器人的公司,面试官问:"你们的机器人系统怎么保证通信安全?如果有人恶意注入虚假的传感器数据怎么办?"

我愣了一下,说我们是在内网跑的,没有考虑过安全问题。他摇了摇头:"医疗和自动驾驶这些领域,功能安全是强制要求。你知道SROS2吗?ROS2提供了哪些安全机制?"

这个问题让我意识到,做产品级机器人系统和做demo完全是两回事。安全不是可选项,是必须考虑的。

为什么需要安全机制

ROS2基于DDS通信,默认情况下是"信任一切"的。任何知道topic名称的节点都可以发布数据,也可以订阅数据。没有身份验证,没有加密,没有访问控制。

这在实验室环境没问题,但在产品中就很危险了。想象一下:你的自动驾驶车在行驶,有人在同一网络里发一个假的/cmd_vel话题,车辆就失控了。或者有人监听你的传感器数据,获取环境信息。

这不是危言耸听。2015年就有人演示过通过注入虚假GPS信号劫持无人车的攻击。2019年也有研究者展示了通过DDS网络注入恶意数据控制ROS2机器人的方法。随着机器人越来越多地部署在公共空间,安全风险只会越来越大。

另外,很多行业有合规要求。医疗设备要过FDA认证,汽车要过ISO 21434(道路车辆网络安全),工业控制系统要过IEC 62443。这些标准都要求通信有身份验证和加密机制。不做安全,产品连认证都过不了。

SROS2(Secure ROS2)就是为了解决这些问题而设计的。它基于DDS Security标准(OMG DDS Security 1.1),在DDS层面提供安全保障。

SROS2的三大安全能力

SROS2提供三个核心安全能力:身份验证

ROS 2 DDS-Security实战:从sros2密钥配置到工业级安全通信 DDS-Security是ROS 2实现通信加密、身份认证与访问控制的核心安全机制,其原理基于X.509证书体系与策略驱动的中间件层强制执行,区别于应用层TLS或自研加解密方案。该机制通过sros2工具链将PKI管理、enclave路径映射、governance策略生成等复杂流程标准化,显著降低工业机器人、AGV调度、医疗设备等对实时性与可信性有严苛要求场景的落地门槛。技术价值体现在进程隔离加密(私钥不驻留应用内存)、QoS兼容的安全降级防护,以及跨语言/跨平台的中间件抽象能力。本文聚焦真实产线环境中的可验 阅读详情

相关推荐

ROS2 Humble下实测:三种主流bag转换方案(rosbag2插件/rosbag_migration/rosbags-convert)到底怎么选?

本文基于ROS2 Humble环境,深度评测了三种主流的ROS1到ROS2 bag转换方案(rosbag2插件/rosbag_migration/rosbags-convert),从安装便捷性、转换成功率、自定义消息支持等维度进行实测分析,为开发者提供技术选型指南。针对不同消息类型、文件规模和环境限制,给出了具体的决策模型和优化建议,帮助实现高效、无损的数据迁移。

weixin_29072299的博客 321

第143篇 ROS2生产环境部署——从开发到产品的差距

流水线的基本流程是:代码提交 → 静态检查(ament_lint、cppcheck)→ 编译 → 单元测试(ament_cmake_pytest、gtest)→ 集成测试(在仿真环境中跑launch文件)→ 打包。用--device参数把宿主机设备映射到容器内,或者用--privileged模式(不推荐,安全性差)。如果你的机器人用的是ARM架构(比如Jetson、树莓派),在x86电脑上编译的代码不能直接运行。可以用Docker来模拟目标环境,在CI服务器上启动容器,安装所有依赖,运行测试用例。

郑伟强dev的专栏 78

第141篇 ROS2日志系统——rcl_logging配置和日志分析

本文从一次面试经历切入,分享了ROS2日志系统的工程实践要点。主要内容包括:1)日志系统架构,介绍rcl_logging的抽象接口设计和spdlog后端的性能优势;2)日志级别管理,说明动态调整和条件输出的方法;3)生产环境实践,强调日志轮转、结构化格式和关键状态记录的重要性;4)自动化分析方案,提出告警机制和趋势分析等运维思路。文章指出日志系统虽不起眼,但能反映工程素养,建议开发者重视日志管理在产品化中的价值。

郑伟强dev的专栏 216

【ROS2原理16】SROS 2 访问控制策略

SROS 2 引入了几个安全属性,包括加密、身份验证和授权。授权是通过将前两个属性与访问控制模型相结合来获得的。这种模型通常被称为访问控制策略。策略充当与属性相关联的特权的高级抽象,然后可以将其转换为个人身份的低级权限,例如安全 DDS 网络中的特定 ROS 节点。

gongdiwudu的专栏 7554

UE4 Instanced Mesh 半透明渲染顺序不对解决

以绿色方块为Instanced Mesh为例。 正确的半透应该是这样的: 这是一般蓝图Actor方块,其半透是正常的。 然而Instanced Mesh因为过多,UE4不给你缓存正确的渲染顺序。所以,在不改代码的情况下,想解决Instanced Mesh半透问题,是不可能的。不正确的半透如下: 注意到错误发生在Instanced Mesh的方块与方块之间。 但我就是要解决,...

qq_41524721的博客 5571

MLIR驱动的CUDA契约重构:2026底层计算范式跃迁

CUDA已从运行时库演进为编译器中心化契约体系,其核心不再是API调用优化,而是通过MLIR等高层中间表示精准声明计算意图与硬件约束。这一转变源于GPU架构复杂度激增与AI/科学计算对确定性SLA的刚性需求——需在跨千卡训练、亚毫秒推理、异构协同等场景中实现资源可声明、可验证、可协商。MLIR作为‘契约语言’,支持linalg语义建模、硬件能力(HCDL)描述、async跨设备调度及SASS级编译优化,使开发者角色从调优工程师升级为契约架构师。本文聚焦CUDA 12.8+时代下,以MLIR为枢纽的计算契约重

weixin_29048309的博客 137

Nginx配置Cookie安全属性:HttpOnly、Secure、SameSite实战指南

Cookie是Web应用中维持用户状态的核心机制,其安全配置直接关系到会话管理与身份认证的可靠性。从原理上讲,HttpOnly属性可防止XSS攻击窃取Cookie,Secure属性确保Cookie仅在HTTPS加密连接中传输,而SameSite属性则用于控制跨站请求时Cookie的发送行为,能有效防御CSRF攻击。这些安全属性的技术价值在于构建纵深防御体系,提升应用的整体安全性。在现代浏览器(如Chrome 80+)默认将未明确声明的Cookie视为SameSite=Lax的背景下,正确配置这些属性变得尤为

weixin_33783283的博客 330

FPGA 学习笔记:解决FPGA程序固化重新上电程序不运行的问题

FPGA 学习笔记:解决FPGA程序固化重新上电程序不运行的问题

坚韧与专注 1万+

QGis二次开发 —— 5、基于qgis开发多种在线地图预览,并加入经纬度坐标显示等(附:源码)

QGis二次开发 —— 5、基于qgis开发多种在线地图预览,并加入经纬度坐标显示等(附:源码

374

SAP-ABAP:在SAP系统中,COEP表(成本控制对象行项目表)详解

在SAP系统中,COEP表(成本控制对象行项目表)详解

baidu_35680696的博客 1843

树冠体积计算之体元累加法

因为是自己之前研究的一个方向,就复现了一下论文中的这个方法,在此正好记录一下。 文章目录一、简介二、代码实现(MATLAB)三、小结 一、简介 简而言之,其实就是一句话,即以固定大小的体元模拟不规则的树冠形状。按照论文中的思路主要就是将树冠沿树高方向以 k 为步长进行等距离分段,把每一段树冠的点投影到垂直于树高方向的平面上,再对该平面划分成大小为 k × k 的像元,根据投影到各个像元内点的数量,判断该像元的有效性,统计有效像元的数量 T,则树冠体积为 T 个 k × k × k 的体元之和。如下图所示:

dayuhaitang1的博客 2611

基于Abaqus的横向各向同性线弹性理想塑性材料模型的umat子程序实现——以Fortran为例,带您揭秘弹性塑性模型编程之道

通过以上步骤,我们已经在Abaqus中使用Fortran实现了横向各向同性线弹性理想塑性材料模型的umat子程序。在实际应用中,我们需要根据具体的材料特性和加载条件来调整模型参数和计算过程。尽管我在这篇文章中尽力提供了详细的教程,但由于我自身的知识限制和经验不足,可能会有误解或错误。我希望大家在学习过程中能多思考,多实践,多交流,以更好地理解和掌握这个主题。

qq_38334677的博客 1691

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

上一篇: 第141篇 ROS2日志系统——rcl_logging配置和日志分析
下一篇: 第143篇 ROS2生产环境部署——从开发到产品的差距
郑伟强dev
博客等级 码龄18年 200粉丝 3158原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郑伟强dev

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值
⌂ 换网址