FlightGoggles : Python Parameters

Writing FlightGogglesClient's config file

Vehicle models and camera models can be added in the FlightGogglesClient.yaml file. The state block contains the configuration of rendering environments. The sceneFilename can be Abandoned_Factory_Morning, Stata_GroundFloor, or Stata_Basement. The camera parameters including width, height, the field of view, depth scale can be configured in this block.

state:
    sceneFilename: "Stata_GroundFloor"
    camWidth: 1024
    camHeight: 768
    camFOV: 70.0
    camDepthScale: 0.20

In order to render the camera image with multiple machines, users can add a new renderer in renderer block. The input port and the output port have to be matched with renderer binary’s ports.

renderer:
    0:
        inputPort: "10253"
        outputPort: "10254"
    1:
        inputPort: "10255"
        outputPort: "10256"

By modifying the objects block, the users can add obstacles or vehicle models into FlightGoggles environments. The object’s size can be changed by updating size_x, size_y, size_z. Also, users can select which renderer to render the objects by assigning renderer id on renderer. If there are no assigned renderer id, objects will be shown in all renderers.

These are the object model that can be registered: Gate, Blackeagle, Square_Gate, Circular_Gate.

objects:
    0:
         ID: uav1
         prefabID: Blackeagle
         size_x: 5
         size_y: 5
         size_z: 5
         renderer: 0
    1:
         ID: Gate1
         prefabID: gate
         size_x: 200
         size_y: 200
         size_z: 200

The camera model can be registered in the camera_model block. Users can configure the output type of each camera by changing outputShaderType.

camera_model:
    0:
        ID: cam1
        outputShaderType: -1
        initialPose: [0, 0, 0, 1, 0, 0, 0]
        renderer: 0
        freq: 30
    1:
        ID: cam2
        outputShaderType: -1
        initialPose: [0, 0, 0, 1, 0, 0, 0]
        renderer: 1
        freq: 30

The camera shader index can be configured as follows:

CameraShader
 - RGB = -1,
 - InstanceID = 0,
 - SemanticID = 1,
 - DepthCompressed = 2,
 - DepthMultiChannel = 3,
 - SurfaceNormals = 4
 - grayscale = 5
 - opticalFlow = 6

The vehicle model can be registered in the vehicle_model block. The vehicle’s type and the frequency of the inertial measurement unit can be configured in this block. The camera model can be attached to the vehicle to the cameraInfo block. Every camera model has to be registered in the camera_model block before attaching it to the vehicle. Also, the object model can be attached to the objectsInfo block. Same as the camera model, every object model has to be registered in the objects block before attaching it to the vehicle.

The parameters for each vehicle (e.g. mass or actuator noise) can be configured by modifying files multicopterDynamicsSim.yaml and carDynamicsSim.yaml. Also, the user can assign specific configuration files for each vehicle by adding config_file option to the vehicle_model block. The initial pose of vehicles and cameras can be configured with initialPose option which is composed of position and quaternion (in order of WXYZ).

vehicle_model:
    uav1:
        type: "drone"
        initialPose: [-6.5, -18.5, -2.0, 1.0, 0, 0, 0]
        imu_freq: 200
        config_file: "multicopterDynamicsSim.yaml"
        objectsInfo:
            uav1:
                relativePose: [0, 0, 0.3, 0.3, 0.707, 0, 0, -0.707]
        cameraInfo:
            cam1:
                relativePose: [0, 0, 0, 1, 0, 0, 0]
    car1:
        type: "car"
        initialPose: [-6.5, -18.5, -0.2, 0.707, 0, 0, -0.707]
        imu_freq: 50
        config_file: "carDynamicsSim.yaml"
        cameraInfo:
            cam2:
                relativePose: [0, 0, 0, 1, 0, 0, 0]