Open
Description
openedon Sep 26, 2024
Question
What's your question?
How to connect PX4 (type:PX4Multirotor) in custom drone (type:SimpleFlight) in UE4. And
Include context on what you are trying to achieve
I want to change default camera position, setting at the initial stage Multirotor. And I had two ideas:
- Go into .cpp and change the camera settings there
- Create a new copter (in setting json) and connect px4 to it
Context details
I need a more general solution (ie via setting.json), but I don't understand how to combine type:PX4Multirotor and type:SimpleFlight.
Include details of what you already did to find answers
My setting.json looks likes:
{
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"ViewMode":"NoDisplay",
"ClockType": "SteppableClock",
"Vehicles": {
"PX4": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"LockStep": true,
"UseTcp": true,
"TcpPort": 4560,
"ControlPortLocal": 14540,
"ControlPortRemote": 14580,
"Sensors":{
"Barometer":{
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
}
},
"Parameters": {
"NAV_RCL_ACT": 0,
"NAV_DLL_ACT": 0,
"COM_OBL_ACT": 1,
"LPE_LAT": 47.641468,
"LPE_LON": -122.140165
}
},
"Drone1" : {
"VehicleType" : "SimpleFlight",
"AutoCreate" : true,
"Cameras" : {
"high_res": {
"CaptureSettings" : [
{
"ImageType" : 0,
"Width" : 4320,
"Height" : 2160
}
],
"X": 0.50, "Y": 0.00, "Z": 0.10,
"Pitch": 0.0, "Roll": 0.0, "Yaw": 0.0
},
"low_res": {
"CaptureSettings" : [
{
"ImageType" : 0,
"Width" : 256,
"Height" : 144
}
],
"X": 0.50, "Y": 0.00, "Z": 0.10,
"Pitch": -90.0, "Roll": 0.0, "Yaw": 0.0
}
}
}
},
"CameraDefaults": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 1920,
"Height": 1080,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0,
"X": 0.50, "Y": 0.00, "Z": 0.10,
"Pitch": -90.0, "Roll": 0.0, "Yaw": 0.0
},
{
"ImageType": 2,
"Width": 1920,
"Height": 1080,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
},
{
"ImageType": 1,
"Width": 1920,
"Height": 1080,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
},
{
"ImageType": 3,
"Width": 1920,
"Height": 1080,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
},
{
"ImageType": 4,
"Width": 1920,
"Height": 1080,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
},
{
"ImageType": 5,
"Width": 1920,
"Height": 1080,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels