Collect images #4995
Unanswered
Arkadi23
asked this question in
Support Q&A
Collect images
#4995
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to collect image data of 20 drones and I am using json, c++ and python to do it. On an empty Unreal Engine map I see 0.05-0.07s for 20 drones, is it possible to speed it up?
{
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"ClockType": "SteppableClock",
"SubWindows": [
{
"WindowID": 0,
"CameraName": "Drone2_back_center",
"ImageType": 0,
"VehicleName": "Drone2",
"Visible": true,
"External": false
},
{
"WindowID": 1,
"CameraName": "Drone3_back_center",
"ImageType": 0,
"VehicleName": "Drone3",
"Visible": true,
"External": false
},
{
"WindowID": 2,
"CameraName": "Drone4_back_center",
"ImageType": 0,
"VehicleName": "Drone4",
"Visible": true,
"External": false
}
],
"Recording": {
"RecordOnMove": true,
"RecordInterval": 0.03333333,
"Folder": "",
"Enabled": false,
"Cameras": [
{
"CameraName": "Drone1_back_center",
"ImageType": 0,
"PixelsAsFloat": false,
"VehicleName": "Drone1",
"Compress": true,
"RecordInterval": 0.0333333,
"RecordOnMove": true
},
{
"CameraName": "Drone1_seg",
"ImageType": 5,
"PixelsAsFloat": false,
"VehicleName": "Drone1",
"Compress": true,
"RecordInterval": 0.0333333,
"RecordOnMove": true
}
]
},
"Vehicles": {
"Drone1": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":1,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone1_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone1_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone2": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":2,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone2_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone2_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone3": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":3,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone3_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone3_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone4": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":4,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone4_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone4_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone5": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":5,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone5_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone5_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone6": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":6,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone6_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone6_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone7": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":7,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone7_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone7_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone8": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":8,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone8_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone8_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone9": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":9,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone9_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone9_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone10": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":10,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone10_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone10_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone11": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":11,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone11_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone11_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone12": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":12,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone12_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone12_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone13": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":13,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone13_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone13_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone14": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":14,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone14_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone14_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone15": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":15,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone15_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone15_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone16": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":16,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone16_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone16_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone17": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":17,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone17_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone17_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone18": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":18,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone18_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone18_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone19": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":19,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone19_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone19_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone20": {
"VehicleType": "SimpleFlight",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlIp": "remote",
"ControlPortRemote": 14580,
"X": -4 ,
"Y":20,
"Z": 1,
"LocalHostIp": "172.23.208.1",
"Sensors": {
"Barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
},
"Distance": {
"SensorType": 5,
"Enabled": true,
"Yaw": 0,
"Pitch": -30,
"Roll": 0
}
},
"Cameras": {
"Drone20_back_center": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"Drone20_seg": {
"CaptureSettings": [
{
"ImageType": 5,
"Width": 80,
"Height": 80,
"FOV_Degrees": 110,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
],
"Gimbal": {
"Stabilization": 0,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
},
"PostProcessingMaterial": "SceneDepth",
"PostProcessingMaterialEffect": "DepthEffect",
"X": 0,
"Y": 0,
"Z": 1,
"Pitch": -30,
"Roll": 0,
"Yaw": 0
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
}
},
"ApiServerPort": 29001
}
c++ file
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "vehicles/multirotor/api/MultirotorRpcLibClient.hpp"
#include "common/VectorMath.hpp"
#include "api/VehicleSimApiBase.hpp"
#include "common/Common.hpp"
#include "common/ImageCaptureBase.hpp"
#include
#include
#include
#include <unordered_map>
using namespace msr::airlib;
namespace py = pybind11;
ImageCaptureBase::ImageRequest build_img_request(const std::string& vehicle_name) {
return ImageCaptureBase::ImageRequest(vehicle_name + "_seg", ImageCaptureBase::ImageType::Segmentation, false, false);
}
std::pair<double, std::unordered_map<std::string, ImageCaptureBase::ImageResponse>> collect_images(MultirotorRpcLibClient& client, const std::vectorstd::string& drone_names) {
auto t1 = std::chrono::high_resolution_clock::now(); // Start C++ timer
}
PYBIND11_MODULE(airsim_wrapper, m) {
py::class_ImageCaptureBase::ImageResponse(m, "ImageResponse")
.def_readwrite("image_data_uint8", &ImageCaptureBase::ImageResponse::image_data_uint8)
.def_readwrite("camera_name", &ImageCaptureBase::ImageResponse::camera_name)
.def_readwrite("image_type", &ImageCaptureBase::ImageResponse::image_type)
.def_readwrite("pixels_as_float", &ImageCaptureBase::ImageResponse::pixels_as_float)
.def_readwrite("compress", &ImageCaptureBase::ImageResponse::compress)
.def_readwrite("width", &ImageCaptureBase::ImageResponse::width)
.def_readwrite("height", &ImageCaptureBase::ImageResponse::height);
}
python file
import airsim_wrapper
import time
Initialize the AirSim client with the specified IP and port
client = airsim_wrapper.MultirotorRpcLibClient("127.0.0.1", 29001)
client.confirmConnection()
List of drone names to collect images from
drone_names = [f"Drone{i}" for i in range(2, 21)]
Infinite loop to collect images every 3 seconds
while True:
start_time = time.time()
Beta Was this translation helpful? Give feedback.
All reactions