Main Content

读取点云

Extract point cloud from ROS PointCloud2 message

  • 图书馆:
  • ROS工具箱/ ROS

  • 读取点云ROS 1

描述

读取点云从活性氧块提取点云PointCloud2信息。you can select the ROS message parameters of a topic active on a live ROS network or specify the message parameters separately. The ROS messages are specified as a nonvirtual bus. Use the订阅块从ROS网络接收消息,并将消息输入到读取点云堵塞。

笔记

从网络读取ROS点云消息时Data消息的属性可以超过Simulink中设置的最大数组长度万博1manbetx®。To increase the maximum array length for all message types in the model, from the准备部分Simulation选项卡,选择ROS工具箱>可变尺寸消息。Uncheck为此消息类型使用默认限制and then in theMaximum length列,根据点云中的点数增加长度。

港口

Input

展开全部

ROSPointCloud2消息,指定为非虚拟巴士。您可以使用订阅块从ROS网络中获取消息。

数据类型:公共汽车

输出

展开全部

X-,,,,Y-,,,,andz-coordinates of each point in the point cloud data, returned as either ann-by-3矩阵或H-by-w-by-3阵列。nis the number of points in the point cloud.Handw是图像的高度和宽度,以像素为单位。得到X-,,,,Y-,,,,andz-作为数组坐标,选择保存点云结构范围。

数据类型:单身的

点云数据的每个点的RGB值,输出作为一个n-by-3矩阵或H-by-w-by-3阵列。nis the number of points in the point cloud.Handw是像素中图像的高度和宽度。RGB值指定红色,绿色和蓝色强度在[0,1]。To return the RGB values as an array, select the保存点云结构范围。

数据类型:双倍的

点云数据的每个点的强度值,返回为数组或一个H-by-w矩阵。Handw是像素中图像的高度和宽度。To return the intensity values as a matrix, select the保存点云结构范围。

数据类型:单身的

Error code for image conversion, returned as a scalar. The error code values are:

  • 0- 成功转换了点云消息。

  • 1- 这dimensions of the incoming point cloud exceed the limits set in the最大点云大小范围。

  • 2- 传入消息中的可变长度阵列之一被截断。有关增加数组最大长度的更多信息,请参见在simulink中管理ROS消息的数组大小万博1manbetx

  • 3- 这X,,,,y, 或者z点云消息的字段丢失。

  • 4- 点云不包含任何RGB颜色数据。仅当您启用显示RGB输出端口范围。

  • 5- 这point cloud does not contain any intensity data. This error only occurs if you enable the显示强度输出端口范围。

对于某些错误代码,块将数据截断或填充值适当的值。

数据类型:UINT8

参数

展开全部

最大点云图像大小,指定为两元素[高度宽度]vector.

选择Configure using ROS要使用ROS网络上的活动主题自动设置此参数。您必须连接到ROS网络。

选择此参数时,该块保留了点云数据输出形状Xyz,,,,RGB,,,,and强度输出。每个输出对应于原始图像的分辨率。这XyzandRGBoutputs become multidimensional arrays, and the强度输出成为矩阵。

选择此参数以启用RGB港口。如果启用此参数,则该消息必须包含RGB数据或块返回错误代码。

选择此参数以启用强度港口。如果启用此参数,则该消息必须包含强度数据或块返回错误代码。

选择此参数以启用错误代码端口和监视错误。

切换是否输出可变大小信号。仅当您期望图像大小随时间变化时,才使用可变大小的信号。有关可变大小信号的更多信息,请参见可变大小的信号基础(万博1manbetxSimulink)

扩展功能

C/C ++代码生成
使用Simulink®Coder™生成C和C ++代码。万博1manbetx

版本历史记录

在R2019b中引入