Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The screenshot below shows the connection elements of the GUI dashboard.

...

Licensing

FusionHub has two options for license protection:

...

  • GPS receiver is integrated with the LPMS-IG1P sensor. Connect the antenna cable and place the GPS antenna on top of the vehicle

  • Standalone multi-channel RTK GPS receiver module. This requires setting up an RTK-GPS basestation. Details are provided in this chapter.

Notes on antenna placement: We recommend placing the GPS antenna on top, in the center of the car.

CAN Bus Connection

FusionHub can be connected to the vehicle CAN bus by using one of the following CAN bus interfaces:

Both LPVR-POS

...

Filter Inputs

Both the LD and the HD filter need the following sources as input. One option is to operate the filter with our LPMS-IG1P sensor that contains IMU and a GPS receiver. This allows for standard GPS absolute position accuracy. Relative accuracy and update rate are higher, based on odometry and IMU data. The other option is to use a separate RTK-GPS unit to get high accuracy RTK-GPS readings. We will look at how to set up an RTK-GPS system for LPVR-POS in a following chapter.

Option 1 - LPMS-IG1P data source for IMU and GPS data

LPMS-IG1P Source

...

filters require reading out wheel velocities from the vehicle’s CAN bus. This means we need to connect the CAN interface that’s being used with FusionHub to the vehicle’s CAN. This can happen for example through the car’s OBD2 connector, or by directly tapping into the car’s wire harness. Once access to the CAN bus is available the CAN messages from the car need to be decoded to calculate the correct wheel velocity values. This decoding will in the future be configurable. At the moment we offer decoder configuration presets for a few vehicle types. Please contact us for details.

LPVR-POS Sensor Fusion Filter

Filter Inputs

Both the LD and the HD filter need the following sources as input. One option is to operate the filter with our LPMS-IG1P sensor that contains IMU and a GPS receiver. This allows for standard GPS absolute position accuracy. Relative accuracy and update rate are higher, based on odometry and IMU data. The other option is to use a separate RTK-GPS unit to get high accuracy RTK-GPS readings. We will look at how to set up an RTK-GPS system for LPVR-POS in a following chapter.

Option 1 - LPMS-IG1P data source for IMU and GPS data

LPMS-IG1P Source

Code Block
"imuP": {
    "type": "DualRtk",
    "settings": {
        "sensor1": {
            // If specification needed, insert first IG1 sensor name here
            //"name": "ig1p232800650050",
            "autodetectType": "ig1p"
        },
        "rtcm": truefalse,
        "imuEndpoint": "tcp://*:8802"
    }
}

Parameter name

Description

Default

type

Type of GPS receiver. Currently only DualRtk is allowed.

DualRTK

name

The name of the LPMS-IG1P sensor used in this setup. This parameter is optional. If FusionHub is operated at the same time with LPVR-DUO, we recommend specifying the sensor name. Look up the sensor name in LpmsControl 2.

n/a

autodetectType

Type of sensor to be autodetcted

ig1p

rtcm

Set to true if RTCM input is to be received eg. from an NTRIP source.

false

imuEndpoint

Output endpoint of IMU data. This parameter is optional.

tcp://*:8802

...

Info

We currently don’t have an elegant way to copy & paste the name of the IG1 sensor to be used by FusionHub to the configuration script from LPMS-Control. Please see the image below where to (manually) copy the name from.

...

Option 2 - Separate LPMS-IG1 IMU and RTK GPS sources (with NTRIP caster for RTK correction)

...

Code Block
languagejson
{
    ...,
    "sources": {
        "endpoints": ["tcp://localhost:9921"]
    }
}

Graphical User Interface

...

...

Dashboard Elements

...

Sensor Fusion Configuration and Calibration Status

...

General Settings

...

Map View

...

Communication with External Applications

There are multiple ways that LPVR-POS can communicate with external applications:

  • Connect via WebSocket API to FusionHub WebSocket server to configure FusionHub node parameters and to stream data to a client application. This method is being used by the FusionHub frontend application.

  • Stream data to a client application via JSON / Protobuf-encoded ZeroMQ. This method is used internally by FusionHub to connect its various nodes. Each output node can be configured to stream data not only internally but also externally.

  • Forward pose data to a client application such as the Unreal Engine via VRPN. This is in many cases the easiest way of streaming data to a client, but it is not as flexible as using the Websocket API or ZeroMQ.

WebSocket APIs

Apart from manual editing the config.json configuration script or modifying it through the GUI, FusionHub also offers a WebSocket API for external applications to change its configuration. The GUI uses this interface to access FusionHub’s settings.

Note that the websocket communication is currently not encrypted, it is not secure. Please take your own precautions to make sure network traffic for the configuration isn’t intercepted in some way. We might add an option for secure communication in future releases.

The WebSocket server can be accessed via 19358 port on the machine hosting the FusionHub service. To accelerate development download the Simple WebSocket Client Chrome plugin. This allows you to manually enter API commands and check the replies from the server.

...

Endpoint

...

Sample Requests

...

Sample Response / Description

...

getConfig

...

Code Block
languagejson
{
  "command": "getConfig"
}

...

Get in memory configurations.

...

getSavedConfig

...

Code Block
languagejson
{
  "command": "getSavedConfig"
}

...

Get on disk configurations.

...

saveConfig

...

Code Block
languagejson
{
  "command": "saveConfig"
}

...

Save the in-memory configurations to the disk.

...

setConfig

...

languagejson

...

As described in a previous chapter, the input field for the address of the FusionHub main application is in the top section of the dashboard GUI. Standard connection port is 19358. In case FusionHub is running on the same machine leave the address at localhost.

...

There are multiple subsections to the graphical user interface. For LPVR-POS the Fusion Configuration, Settings and Map sections are most important.

...

Sensor Fusion Configuration

This section shows the FusionHub configuration as well as several key values reported by the FusionHub main application. After editing the configuration script make sure to press “Set” and “Save” to load the new configuration into FusionHub.

...

General Settings

This section works as additional connection dialog. It shows the status of the connection between the GUI client and the FusionHub executable.

...

Map View

The map view is specific to LPVR-POS. It shows the current position and yaw orientation output of FusionHub. This section works well to check if the data currently calculated by LPVR-POS makes sense.

...

Communication with External Applications

There are multiple ways that LPVR-POS can communicate with external applications:

  • Connect via WebSocket API to FusionHub WebSocket server to configure FusionHub node parameters and to stream data to a client application. This method is being used by the FusionHub frontend application.

  • Stream data to a client application via JSON / Protobuf-encoded ZeroMQ. This method is used internally by FusionHub to connect its various nodes. Each output node can be configured to stream data not only internally but also externally.

  • Forward pose data to a client application such as the Unreal Engine via VRPN. This is in many cases the easiest way of streaming data to a client, but it is not as flexible as using the Websocket API or ZeroMQ.

WebSocket APIs

Apart from manual editing the config.json configuration script or modifying it through the GUI, FusionHub also offers a WebSocket API for external applications to change its configuration. The GUI uses this interface to access FusionHub’s settings.

Note that the websocket communication is currently not encrypted, it is not secure. Please take your own precautions to make sure network traffic for the configuration isn’t intercepted in some way. We might add an option for secure communication in future releases.

The WebSocket server can be accessed via 19358 port on the machine hosting the FusionHub service. To accelerate development download the Simple WebSocket Client Chrome plugin. This allows you to manually enter API commands and check the replies from the server.

Endpoint

Sample Requests

Sample Response / Description

getConfig

Code Block
languagejson
{
  "command": "getConfig"
}

Get in memory configurations.

getSavedConfig

Code Block
languagejson
{
  "command": "getSavedConfig"
}

Get on disk configurations.

saveConfig

Code Block
languagejson
{
  "command": "saveConfig"
}

Save the in-memory configurations to the disk.

setConfig

Code Block
languagejson
{
  "command": "setConfig",
  "data": {
    "sources": {
      "optical": {
        "settings": {
          "port": 5005
        }
      }
    }
  }
}

Update in-memory configurations. This api create new key-value pairs, or update the existing values.

It does not save configurations to the disk.

Note that in "data" you just need to specify the path to the json key to update: the exmaple on the right would change the port to 5005 while everything else is left unchanged.

overwriteConfig

Code Block
languagejson
{
  "command": "overwriteConfig",
  "data": {
    "settings": { ... },
    "sources": { ... },
    "sinks": { ... }
  }
}

Overwrite the in-memory configurations. This is suitable when user want to remove a key from the configuration.

getIntercalibrationStatus

Code Block
languagejson
{
  "command": "getIntercalibrationStatus"
}

Get the current intercalibration status. Useful for refetching current status when the frontnend accidentally disconnects.

applyIntercalibrationResults

Code Block
languagejson
{
  "command": "applyIntercalibrationResults"
}

Apply the current intercalibration quaternion to the in-memory copy of config. This does NOT save to disk.

restartBackend

Code Block
{
  "command": "restartBackend"
}

Restart the backend. Internally the while loop reset the DataBlock, causing all sources and sinks to be freed from memory, and instantiate them again.

startRecording

Code Block
{
    "command": "startRecording",
    "data": {
        "endpoints": ["inproc://imu_data_source_1"],
        "format": "json",
        "filename": "subaruDrive"
    }
}

Listen to data published to endpoints, and write to a file of YYYYMMDD-HHMMSS-{comment}.{format}

stopRecording

Code Block
{
    "command": "stopRecording",
}

Stop the current recording.

listRecording

Code Block
{
    "command": "listRecording",
}

List the recorded filenames since the FusionHub booted up.

getVersion

Code Block
languagejson
{
  "command": "getVersion"
}
Code Block
languagejson
{
  "command": "getVersion",
  "status": "ok",
  "data": {
    "version": "1.0.0"
  }
}

...

Ublox ZED-F9P module documentation

Appendix

Example Configuration Scripts

LPVR-POS with LD filter and RTK-GPS node

Code Block
{
  "settings": {
    "websocketDataOutputRate": 20
  },
  "sources": {
    "RTCM": {
        "type": "NTRIP",    
        "settings": {
            "host": "164.90.243.252",
            "port": "2101",
            "mountpoint": "MP8525",
            "password": "226xxj",
            "user": "u53557",
            "userAgent": "LPVR",
            "initialLatitude": 0.9100316539615088,
            "initialLongitude": 48.60687352726686, 
            "forwardGnss":  true
        }    
    },    
    "imu": {
        "type": "OpenZen",
        "settings": {
            "name": "ig1p2327002f0023"
        }
    },    
    "gnss": {
        "type": "NMEA",
        "settings": {
            "port": "COM3",
            "baudrate": 115200,
            "rtcm": true
        }
    },
    "vehicle": {
      "type": "Automotive",
      "vehicleStateEndpoint": "tcp://*:8999",
      "settings": {
        "canInterface": "PeakCAN",
		"vehicleType": "R56"
      }
    }
  },
  "sinks": {
    "vehicularFusion": {
      "echoFusedPose": false,
      "endpoint": "tcp://*:8801",
      "fuser": {
        "fitModel": "SimpleCarModel",
        "driveModel": "Differential",
        "velError": 0.277777778,
        "omegaError": 0.5,
        "measurementError": 0.1,
        "smoothFit": true,
        "useImuTurnRate": true,
		"imuTurnRateAxis": {
            "x": 0,
            "y": 0,
            "z": 1
        }   
      }
    },
    "echo": {},
    "record": {
      "filename": "log.a",
      "format": "json"
    }
  }
}

LPVR-POS with HD filter and LPMS-IG1P GPS node

Code Block
{
  "settings": {
    "websocketDataOutputRate": 20
  },
  "sources": {
    "imuP": {
      "type": "DualRtk",
      "settings": {
        "sensor1": {
          "name": "ig1p2327002f0023"
          "autodetectType": "ig1p"
        },
        "rtcm": false,
        "imuEndpoint": "tcp://*:8802"
      }
    },
    "vehicle": {
      "type": "Automotive",
      "vehicleStateEndpoint": "tcp://*:8999",
      "settings": {
        "canInterface": "PeakCAN",
		"vehicleType": "R56"
      }
    }
  },
  "sinks": {
    "gnssImuFusion": {
      "echoFusedPose": false,
      "endpoint": "tcp://*:8803",
      "fuser": {
        "fitModel": "ModelGnssImu",
        "accelError": 0.01,
        "omegaError": 0.02,
        "measurementError": 0.05,
        "imuToCarRotation": {
            "w": 1,
            "x": 0,
            "y": 0,
            "z": 0
        }
      }
    },
    "echo": {},
    "record": {
      "filename": "log.a",
      "format": "json"
    }
  }
}

LPMS-IG1 Setup
Anchor
LPMS-IG1-Setup
LPMS-IG1-Setup

...