在Simulink中​使用ROS发送sen​sor_msgs/I​mage时,自定义函​数块的端口配置中总线​时无法同时适应不同维​度的图像

我想在Simulink中使用相机传感器通过ROS传输不同维度的图像数据,然后我希望通过ROS将两种维度的图像同时发送出去,但总线类型端口配置完成后只能适应一种图像的维度,如何得到同时适应两种图像的总线端口?
如果我保存总线类型,当我为每个函数设定好对应的总线接口后便会出现此类问题:
The bus object 'SL_Bus_untitled_sensor_msgs_Image' propagated to the input port of block 'untitled/MATLAB Function1' does not match the bus object 'SL_Bus_RGB_sensor_msgs_Image' specified via the block dialog or propagated to other input ports of the block.
这个问题是因为两个Blank Message发送的总线类型是一致的,与我接口中自定义的类型不匹配,不知道怎么处理这种问题

Antworten (0)

Produkte

Version

R2021b

Gefragt:

亮
am 10 Aug. 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!