Table of Contents
Video3D Initialize
Initializes a 3D imaging device, such as an RGBD camera or simulates such a device from a file.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Multimedia')Description
The Video3D Initialize block initializes a 3D imaging device, such as an RGBD camera like the Intel RealSense R200. This block is required to use the other Video3D blocks, such as the Video3D Capture block.
The Video3D Initialize block configures the name of the video device, the source of sensor data (device or file) and which device to use.
The name of the video device is arbitrary and is used by the other Video3D blocks to identify which device is being used. The default name is "Video3D-1". Each Video3D block must have a unique video device name assigned. The name must be unique across the entire model.
The source of the video data is either Device or File. When this option is set to Device then it refers to an actual 3D imaging device, like an RGBD camera. The camera used is determined by the Device identifier parameter, which can either be a serial number or a zero-based index. For example, on the QDrone, the RealSense camera is device identifier zero.
If the source is set to File then a ROS bag file containing the simulated device information must be provided in the Device recording file parameter. Currently, simulated devices are only supported in Windows for Intel RealSense cameras.
If the Active during normal simulation option is checked then the device will be used even in normal simulation. Otherwise the block does nothing.
The Video3D Initialize block does not support all 3D imaging devices available. The support currently provided on each platform are listed in the table below:
QUARC Target | Cameras Supported |
---|---|
Windows |
Intel RealSense cameras compatible with the RealSense2 SDK. |
Linux Pi 4 |
Intel RealSense cameras compatible with the RealSense2 SDK. |
Linux QBot Platform |
Intel RealSense cameras compatible with the RealSense2 SDK. |
Linux QCar 2 |
Intel RealSense cameras compatible with the RealSense2 SDK. |
Linux QDrone 2 |
Intel RealSense cameras compatible with the RealSense2 SDK. |
Linux x64 (Intel Aero Compute) |
Intel RealSense cameras compatible with the RealSense SDK, notably the R200 camera. |
Linux DuoVero |
Kinect for XBox 360 cameras. |
Linux DuoVero 2016 |
Kinect for XBox 360 cameras. |
Linux Pi 3 |
Kinect for XBox 360 cameras. |
Installation Requirements
Peripherals
For this block to be used in Windows (either on the host or a target), the Quanser Peripherals feature in the QUARC installer must be checked and installed. Support for Intel RealSense cameras in general is installed as part of that QUARC feature. The driver specific to a particular camera will still need to be installed as well.
Device drivers
For a particular 3D imaging device to be used, such as an Intel RealSense D415 camera, a driver must be installed on the operating system. Quanser includes the necessary drivers for cameras we supply as part of our experiments, but any additional cameras will need their drivers installed.
Input Ports
This block has no input ports.
Output Ports
state
The state of the 3D imaging device.
Parameters and Dialog Box
Go to Video3D blocks using this device
Opens a dialog that lists all the Video3D blocks in the model which are currently using the same device selected in the Video device name parameter. The dialog may be used to go to another Video3D block in the model just by double-clicking on the name of the block in the dialog box.
Video device name
The unique name assigned to this 3D imaging device. This name must be unique among all Video3D Initialize blocks in the entire diagram. It is used by other Video3D blocks to refer to the selected device.
Source of data
This option determines whether a physical device is being used or a simulated device. Set this option to Device to use a physical device. Set it to File to use a simulated device, read from the associated file.
Device identifier
This parameter is only visible when the Source of data parameter is set to Device. It should be zero-based index of the device or the device serial number. Serial numbers must begin with a letter to distinguish them from a device index. For example, Intel RealSense serial numbers are prefixed with the letter 'R' to make it clear a serial number is being used.
Use the query (<<) button beside the device identifier field when the target is powered up to connect to the target and get a list of cameras from which to select the camera desired.
Device recording file
This parameter is only visible when the Source of data parameter is set to File. Select a ROS bag file containing the information for the simulated device. Device simulation is currently only supported on Windows for Intel RealSense cameras.
Sample time
The sampling period (in seconds) of the Video3D Initialize block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time. Since this is a source block, only inherent the sample time when it is placed in a conditionally executed subsystem, like a Triggered or Enabled Subsystem, or in a referenced model.
The default sample time is set to qc_get_step_size * ceil(0.033 / qc_get_step_size). The qc_get_step_size function is a QUARC function that returns the fundamental sampling time of the model. Hence, the default sample time is a discrete sample time which is a multiple of the fixed step size of the model and close to 1/30 of a second.
Active during normal simulation (tunable offline)
Check this option to use the device during normal simulation. If this option is not checked then the block will do nothing.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
No |
No |
Not supported. |
|
No |
No |
Not supported. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
Fully supported. |
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Fully supported. |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.