selectSensorInfo Method
- Sensor.selectSensorInfo(*args)
Retrieves sensor data of specified types, with the quantity and order matching the input parameters.
- Parameters:
args (Sensor.OutputType) – Any number of
Sensor.OutputTypeenums specifying the data types to retrieve. Supported enum values and corresponding data are as follows:
Supported Data Types and Descriptions Enum Value
Data Type
Description
Sensor.OutputType.RectifyOptional[np.ndarray]
Rectified image, shape=(700, 400, 3), BGR format
Sensor.OutputType.DifferenceOptional[np.ndarray]
Difference image, shape=(700, 400, 3), BGR format
Sensor.OutputType.DepthOptional[np.ndarray]
Depth image, shape=(700, 400), unit in millimeters (mm)
Sensor.OutputType.ForceOptional[np.ndarray]
3D force distribution, shape=(35, 20, 3)
Sensor.OutputType.ForceNormOptional[np.ndarray]
Normal force component, shape=(35, 20, 3)
Sensor.OutputType.ForceResultantOptional[np.ndarray]
6-dimensional resultant force, shape=(6,)
Sensor.OutputType.Marker2DOptional[np.ndarray]
Tangential displacement, shape=(26,14,2)
Sensor.OutputType.Mesh3DOptional[np.ndarray]
Current frame 3D mesh, shape=(35, 20, 3)
Sensor.OutputType.Mesh3DInitOptional[np.ndarray]
Initial 3D mesh, shape=(35, 20, 3)
Sensor.OutputType.Mesh3DFlowOptional[np.ndarray]
Mesh deformation vector, shape=(35, 20, 3)
Sensor.OutputType.TimeStampOptional[np.ndarray]
Sensor timestamp, shape=(26,14,2)
- Returns:
Requested sensor data with quantity and order matching input parameters.
- Return type:
Corresponding
np.ndarrayorNone(when data is unavailable)
Note
If you need to retrieve multiple types of data simultaneously, use a single function call as shown in the example. This ensures all data comes from the same frame and optimizes calculation speed.
Example Code
from xensesdk import Sensor
# Create sensor instance
sensor = Sensor.create('OP000064')
# Retrieve specified types of sensor data
rectify, depth, force = sensor.selectSensorInfo(
Sensor.OutputType.Rectify,
Sensor.OutputType.Depth,
Sensor.OutputType.Force
)
# Output data shapes (example)
print("Rectified image shape:", rectify.shape) # (700, 400, 3)
print("Depth image shape:", depth.shape) # (700, 400)
print("3D force distribution shape:", force.shape) # (35, 20, 3)
# Release resources
sensor.release()