Skip to content

RflyVision Block Documentation

Toolbox: RflySim Vision

RflyVision Block Appearance

Overview

Summary: This block sends a vision-sensor request to RflySim3D/UE and outputs RGB image data with the configured resolution in Simulink.

RflyVision is an S-Function block for Simulink vision simulation. At simulation start, it constructs a vision-sensor request from the Mask parameters, including sensor sequence ID, type ID, target vehicle, mount type, image resolution, field of view, mounting position, mounting attitude, target IP address, and window ID, and sends the request to RflySim3D/UE. During simulation, the block continuously updates and outputs the image data array.

This block is suitable for virtual camera perception, visual localization, object recognition, object tracking, visual servoing control, and multi-vehicle vision task validation.

Ports

Inputs

This block has no input ports.

Outputs

Port Data type Dimension Description
data_total uint8 DataHeight x DataWidth x 3 RGB image array, with three channels corresponding to red, green, and blue color channels

Parameters

The following parameters can be configured in the Mask dialog opened by double-clicking the block:

Parameter Default value Description
SeqID 0 Vision sensor request sequence ID
TypeID 1 Vision sensor type ID
TargetCopter 1 Target vehicle ID
TargetMountType 0 Target mount type
DataWidth 640 Image width in pixels
DataHeight 480 Image height in pixels
DataCheckFreq 60 Image data check frequency
SendProtocol [0,127,0,0,1,9999,0,0] Send protocol configuration array, including protocol type, address, and port fields
CameraFOV 90 Camera field of view
SensorPosXYZ [0.3,-0.15,0] Sensor mounting position relative to the target vehicle
EularOrQuat 1 Attitude input mode selection, use the value definition in the block Mask
SensorAngEular [0,0,0] Sensor mounting Euler angles
SensorAngQuat [1,0,0,0] Sensor mounting quaternion
otherParams [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] Additional vision sensor extension parameters
UEipAdress 127.0.0.1 IP address of the RflySim3D/UE host
windID 0 RflySim3D/UE window or scene instance ID

The spellings Eular and Adress are kept consistent with the Simulink Mask. Use the original parameter names as shown in the block dialog.

Block Characteristics

Item Value
Block type Level-2 C/C++ S-Function
S-Function name RflyVision
Number of input ports 0
Number of output ports 1
Output data type uint8
Sample time Inherited
Code generation support No

Usage

  1. Start RflySim3D/UE and ensure the target window or scene instance is running.
  2. In the RflyVision Mask, set the target vehicle ID, mount type, resolution, target IP address, and window ID.
  3. Set SensorPosXYZ and either Euler-angle or quaternion attitude parameters according to the camera mounting relationship.
  4. Connect the data_total output to image processing, vision algorithm, or display modules.

Notes and Common Issues

  • Resolution and performance: Larger DataWidth and DataHeight values increase the output array size and simulation and image processing overhead.
  • Network configuration: UEipAdress should point to the host running RflySim3D/UE; local simulation typically uses 127.0.0.1.
  • Coordinate frame consistency: The sensor mounting position and attitude must be consistent with the target vehicle coordinate frame; otherwise, the image viewpoint will not match expectations.
  • Startup order: It is recommended to start RflySim3D/UE before starting the Simulink simulation to ensure the vision-sensor request is processed correctly.

Changelog

  • v4.10 (2026-05-07): Added the RflyVision block help documentation and connected it to the Simulink Help button index.