Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect PX4 (type:PX4Multirotor) to custom drone (type:SimpleFlight) in UE4 #4986

Open
MinIN-git opened this issue Sep 26, 2024 · 0 comments

Comments

@MinIN-git
Copy link

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:

  1. Go into .cpp and change the camera settings there
  2. 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
        }
    ]
}

}

@MinIN-git MinIN-git changed the title PX4 How to connect PX4 (type:PX4Multirotor) in custom drone (type:SimpleFlight) in UE4 Sep 26, 2024
@MinIN-git MinIN-git changed the title How to connect PX4 (type:PX4Multirotor) in custom drone (type:SimpleFlight) in UE4 connect PX4 (type:PX4Multirotor) to custom drone (type:SimpleFlight) in UE4 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant