LPVR-POS Manual
- 1 Introduction
- 2 General
- 2.1 Starting FusionHub
- 2.2 Licensing
- 2.2.1 Hardware dongle
- 2.2.2 Online license
- 3 LPVR-POS Filter Configuration
- 4 LPVR-POS Sensor Fusion Filter
- 4.1 Filter Inputs
- 4.1.1 IMU & GPS Option 1 - LPMS-IG1P Data Source for IMU and GPS Data
- 4.1.1.1 LPMS-IG1P Source
- 4.1.2 IMU & GPS Option 2 - Separate LPMS-IG1 IMU and RTK GPS Sources (with NTRIP Caster for RTK Correction)
- 4.1.2.1 LPMS-IG1 Source
- 4.1.2.2 RTCM Source
- 4.1.2.3 GNSS Source
- 4.1.3 GNSS Output Format
- 4.1.3.1 JSON
- 4.1.3.2 Protobuf
- 4.1.3.3 Important Output Data
- 4.1.4 Odometry
- 4.1.5 Minimal Vehicle Parsing
- 4.1.5.1 Configuration example
- 4.1.6 Vehicle Parsing with Separate Wheel Velocities
- 4.1.6.1 Configuration example
- 4.1.7 Additional Parameters
- 4.1.7.1 Gear Stick Position for Velocity Sign
- 4.1.7.1.1 Configuration template
- 4.1.7.2 Steering information for Ackermann model
- 4.1.7.2.1 Configuration template
- 4.1.7.3 Predefined Vehicle Parsing
- 4.1.7.1 Gear Stick Position for Velocity Sign
- 4.1.8 Vehicle Source Output Data Types
- 4.1.1 IMU & GPS Option 1 - LPMS-IG1P Data Source for IMU and GPS Data
- 4.2 Fusion Filter Option 1 - Low-dynamics Filter
- 4.2.1 General
- 4.2.1.1 Notes on Data Output
- 4.2.1.2 Notes on IMU Arrangement
- 4.2.2 Configuration Block
- 4.2.3 Output Format
- 4.2.1 General
- 4.3 Fusion Filter Option 2 - High-Dynamics Filter
- 4.3.1 General
- 4.3.1.1 Notes on Filter Output
- 4.3.1.2 Notes on IMU Arrangement
- 4.3.2 Configuration Block
- 4.3.3 Output Data Format
- 4.3.3.1 FusedVehiclePose
- 4.3.3.2 FusedPose
- 4.3.3.3 GlobalFusedPose
- 4.3.1 General
- 4.1 Filter Inputs
- 5 Recording and Replaying Data
- 5.1 Data Recording
- 5.2 Data Replay
- 5.2.1 Replay executable
- 5.2.2 Output replay
- 5.3 Graphical User Interface
- 5.3.1 Dashboard Elements
- 5.3.2 Sensor Fusion Configuration
- 5.3.3 General Settings
- 5.3.4 Map View
- 6 Communication with External Applications
- 7 RTK-GPS Setup
- 8 Appendix
Introduction
FusionHub is a software application that has the purpose of combining a number of sensor data inputs to create a higher level information output. LPVR-POS is based on FusionHub and combines odometry, GPS and IMU data from a vehicle to calculate high-accuracy and low-latency global localization information. There is a range of typical applications such as automotive and robot localization.
The diagram below shows the general structure of FusionHub. Sources and sinks are connected by a filter unit. The sensor fusion functionality is contained in this filter unit. The filter parameters as well as the parameters of input and output blocks can be configured via a configuration script or a graphical user interface. Note that this image is a general block diagram of FusionHub showing more items than the functionality needed for LPVR-POS.
The graphical user interface is detached from the main FusionHub application and both applications can therefore run on separate computers. This provides flexibility for running FusionHub on devices with limited monitoring capabilities like a head mounted display.
General
Starting FusionHub
FusionHub consists of two components:
The main application
A graphical user interface application
The main FusionHub application is started by running FusionHub.exe
. No specific installation is needed, the application can be run directly out of its deployment directory. It is a command line application that uses the file config.json
for its configuration. We will explain the contents and options of the configuration file further below.
Please install the graphical user interface by running lp-fusionhub-dashboard_0.1.0_x64_en-US.msi
. It installs lp-fusionhub-dashboard
in your start menu, launch the application from there. Press the Connect
button after starting FusionHub.exe
to connect client and server. In case you are running FusionHub on a separate machine make sure to enter the correct IP address.
The screenshot below shows the connection elements of the GUI dashboard.
Licensing
FusionHub has two options for license protection. The application will only run correctly if one of the two license options is satisfied.
Hardware dongle
License authentication using a hardware dongle; This is especially interesting for air-gapped installations that are not connected to the internet. As long as the dongle is inserted into a USB slot of the host system, FusionHub will run. Please note that for the Android (eg. on Quest 2 HMD) version of FusionHub, the GUI running on the streaming host is dongle protected, see more detailed information in the specific manual chapter.
Online license
License authentication using a software, online license; This makes sense for systems that are connected to the internet at least during the initial installation of FusionHub. The software checks its license status with our license server with following sequence:
Enter license key in configuration file. You receive your personal license key from us.
FusionHub application sends license key and machine code to server.
Server checks if license is valid and returns response code, if it is valid.
Copy the response code from the log and enter it in the config file to the
ResponseKey
parameter. Save the config file.This allows FusionHub to run on this specific machine without reconnecting to the internet. One license unit will be subtracted from your license account. Please ask us for assitance if you’d like to move your license.
If your default configuration file config.json
doesn't contain it already, add the LicenseInfo
block as shown below. Enter your personal key you received from us as LicenseKey.
{
...
"LicenseInfo": {
"LicenseKey": "EKKCO-GZYLT-NJKET-SASDC",
"ResponseKey": ""
}
...
}
LPVR-POS Filter Configuration
LPVR-POS combines odometry, GPS and IMU data from a vehicle to calculate high-accuracy and low-latency global localization information. While GPS or RTK-GPS measurements alone provide similar positioning accuracy, the output frequency of these systems is relatively low, making them unsuitable for applications where localization information at higher framerates is required, such as positioning objects in an augmented reality environment.
By additionally using odometry (wheel speeds, steering angle etc.) information, the localization data from the GPS measurements is interpolated to achieve framerates limited only by IMU and odometry sampling speeds.
The LPVR-POS filter has two operation modes with different configuration blocks in config.json
and different output formats. The two modes are:
Low-dynamics filter (LD)
High-dynamics filter (HD)
The diagram below shows a general overview of the LPVR-POS filter setup.
Installation of Hardware Components
Inertial Measurement Unit (IMU)
LPMS-IG1P needs to be installed in the vehicle in a known orientation ideally with the coordinate axes of the IMU arranged in parallel to the vehicle coordinate system. As vehicle reference frame we are using the VW coordinate system shown in the image below.
Connect the USB connector of LPMS-IG1P to the host computer. If needed an active or passive USB extension can be used. Make sure to check data integrity with the LpmsControl 2 data acquisition tool, we have noticed communication issues with some passive USB extensions.
See the appendix for further information how to set up LPMS-IG1.
VW frame
x: back
y: right
z: up
Global Positioning System (GPS)
We provide two options for using a global position reference:
The GPS receiver 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 base station. Details are provided in this chapter.
Note on the 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 types 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 lines. This can happen for example through the car’s OBD2 connector, or by directly tapping into its 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 this chapter.
IMU & GPS Option 1 - LPMS-IG1P Data Source for IMU and GPS Data
LPMS-IG1P Source
LPMS-IG1P combines IMU sensor and GPS data source.
"imuP": {
"type": "DualRtk",
"settings": {
"sensor1": {
// If specification needed, insert first IG1 sensor name here
//"name": "ig1p232800650050",
"autodetectType": "ig1p"
},
"rtcm": false,
"imuEndpoint": "tcp://*:8802"
}
}
Parameter name | Description | Default |
---|---|---|
type | Type of GPS receiver. Currently only | 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 |
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.
IMU & GPS Option 2 - Separate LPMS-IG1 IMU and RTK GPS Sources (with NTRIP Caster for RTK Correction)
LPMS-IG1 Source
This node connects to an IMU sensor. For LPVR-POS use LPMS-IG1P. Note that this node doesn’t read out GPS data from LPMS-IG1P.
"imu": {
"type": "OpenZen",
"settings": {
"autodetectType": "ig1"
}
}
Parameter name | Description | Default |
---|---|---|
type | Type of IMU. At the moment only OpenZen IMUs are supported. | OpenZen |
name | The name of the LPMS-IG1 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 | ig1 |
imuEndpoint | Output endpoint of IMU data. This parameter is optional. | tcp://*:8802 |
RTCM Source
Node to connect to an NTRIP caster and read in RTCM information from there.
"RTCM": {
"type": "NTRIP",
"settings": {
"host": "some-host-name",
"port": "2101",
"mountpoint": "some-mount-point",
"user": "some-user",
"password": "some-password",
"userAgent": "LPVR",
"initialLatitude": 35.65736,
"initialLongitude": 139.73239,
"forwardGnss": true
}
}
Parameter name | Description | Default |
---|---|---|
type | Type of RTCM correction data source. Currently only | NTRIP |
host | NTrip caster host. | 192.168.1.1 |
port | NTrip caster port. | 2101 |
mountpoint | NTrip mountpoint or stream to receive rtcm correction data. |
|
user | NTrip caster username. |
|
password | NTrip caster password. |
|
userAgent | Name of user agent when connecting to NTrip caster. | LPVR-POS |
initialLatitude | Latitude to forward to Ntrip caster on first connect. | 0.0 |
initialLongitude | Longitude to forward to Ntrip caster on first connect. | 0.0 |
forwardGnss | Set true if gnss data from gnss source is to be forwarded to NTRIP caster. This is useful if Ntrip caster offers dynamic switching of RTCM correction data based on forwarded location. | false |
GNSS Source
This is the connection to the actual GNSS module such as the ZED-F9P module. The nodes receives data in NMEA format and sends RTK correction information to the node using RTCM.
"gnss": {
"type": "NMEA",
"settings": {
"port": "/dev/ttyUSB0",
"baudrate": 115200,
"rtcm": true
}
}
Parameter name | Description | Default |
---|---|---|
type | Data output format for gnss data source. Currently only | NMEA |
port | Serial port number for gnss source.
|
|
baudrate | Serial port baudrate to connect to GNSS source. |
|
rtcm | Set true to enable RTCM correction data forwarding from RTCM source to gnss module. | false |
For details about the overall configuration of the RTK-GPS system refer to this section.
GNSS Output Format
JSON
"gnssData": {
"altitude": 0.0,
"hdop": 0.0,
"heading": 0,
"latitude": 0.0,
"longitude": 0.0,
"height": 0.0,
"nSat": 0,
"orientation": {
"w": 1.0,
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"quality": 0,
"sensorName": "",
"timestamp": 0,
"tmg": 0.0,
"undulation": 0.0
}
Protobuf
message GnssData {
int64 timestamp = 1;
double latitude = 3;
double longitude = 4;
double period = 5;
int32 frame_count = 6;
double latency = 8;
string sensor_name = 11;
Quaternion orientation = 12;
double height = 13;
double vertical_accuracy = 14;
double horizontal_accuracy = 15;
int32 quality = 16;
int32 n_sat = 17;
double hdop = 18;
double tmg = 19;
double heading = 20;
double altitude = 21;
double undulation = 22;
}
Important Output Data
Parameter name | Description | Unit |
---|---|---|
timestamp | Timestamp of current GNSS data | nanoseconds (in case GPS time is used as clock this is the duration since start of the day in UTC time) |
longitude | Longitude part of GPS position | degree |
latitude | Latitude part of GPS position | degree |
height | The height of the receiver above the earth surface reference ellipsoid | m |
quality | Quality of the GPS signal: 0: Fix not valid | n/a (comment: for RTK enabled systems RTK fix provides the highest cm accuracy. If this quality can’t be reached, the number of visible satellites or connection to base station might be an issue.) |
Odometry
The vehicle source is the data source that reads raw CAN data messages from a given CAN bus interface and parses the vehicle data using to the provided CAN protocol.
This section explains how to set up the configuration for a custom CAN parsing node. Depending on the available information about the vehicle CAN protocol, there are three types of CAN parsing available.
Minimal
parsing where we only have information about the vehicle speed CAN message.External
separate four wheel speed parsing, velocity sign information may be added if the gear stick reading is available.ExternalWithSteering
parsing with steering model information, there are two ways to specify the steering tables depending on the information available:steering wheel angle vs (right or left) wheel angles
orsteering wheel angle vs average wheel angles
. Using this data we can perform linear interpolation to compute the wheel angles for any given steering angle and use it forAckermann
steering.
In most cases, having the overall vehicle speed message or the separate wheel speed messages is more than enough and no steering information is needed. If available, the gear stick reading is useful to help identify the reverse driving.
Minimal Vehicle Parsing
This parser only requires information about the overall vehicle speed message. So it only provide this data as input to the fusion algorithm. Even though this can be enough for some use cases, it may be better to provide separate wheel speeds to extract and use the vehicle angular velocity information as well.
Parameter name | Description | Default |
---|---|---|
canInterface | CAN bus interface, supported values are | PeakCAN |
vehicleType |
| n/a |
velocityCanId | CAN id for the velocities message | n/a |
velocityScale | Value to multiply the parsed raw velocity by in order to get velocities in m/s. | 1.0 |
velocityStartBit | Start bit of the vehicle wheel velocity. | 0 |
velocityBitsLength | Number of bits used for wheel velocity encoding. | 16 |
Configuration example
"vehicle": {
"type": "Automotive",
"vehicleStateEndpoint": "tcp://*:8999",
"settings": {
"canInterface": "Internal",
"canEndpoint": "tcp://localhost:9921",
"vehicleType": "Minimal",
"canProtocol": {
"velocityCanId": 209,
"velocityScale": 0.015625012,
"endianness": "little",
"velocityBitsLength": 16,
"velocityStartBit": 0
}
}
}
Vehicle Parsing with Separate Wheel Velocities
Parameter name | Description | Default |
---|---|---|
canInterface | CAN bus interface, supported values are | PeakCAN |
vehicleType | Used to specify the parser type, available values are:
| n/a |
wheelBase | Distance between front and back wheels. | n/a |
trackWidth | Distance between right and left back wheels. | n/a |
velocityCanId | CAN id for the velocities message | n/a |
velocityScale | Value to multiply the parsed raw velocities by in order to get velocities in m/s. | 1.0 |
velocityStartBits | Within this parameter, one need to specify the starting bits of each wheel velocity | 0, 16, 32, 48 respectively. |
velocityBitsLength | Number of bits used for each wheel velocity encoding. | 16 |
endianness | Specify if the CAN data endianness is | little |
driveModel | When no steering information is available, only | Differential |
canEndpoint | Output endpoint of Vehicle data. This parameter is optional. | tcp://*:8802 |
Configuration example
"vehicle": {
"type": "Automotive",
"vehicleStateEndpoint": "tcp://*:8999",
"settings": {
"canInterface": "PeakCAN",
"canEndpoint": "tcp://localhost:9921",
"vehicleType": "External",
"wheelBase": 2.750,
"trackWidth": 1.595,
"canProtocol": {
"velocityCanId": 212,
"velocityScale": 0.015625012,
"endianness": "little",
"velocityStartBits": {
"FrontLeftWheel": 0,
"FrontRightWheel": 16,
"RearLeftWheel": 32,
"RearRightWheel": 48
}
}
}
}
Additional Parameters
Gear Stick Position for Velocity Sign
If available, the gear stick reading data can be parsed to determine the velocity sign.
Parameter name | Description | Default |
---|---|---|
gearCanId | Gear stick message CAN id | n/a |
gearStartBit | Gear stick message start bit | n/a |
gearBitsLength | Number of bits used for gear stick message encoding. | n/a |
gearReverseValue | Reverse driving gear stick value. | n/a |
Configuration template
"vehicle": {
...
"settings": {
...
"vehicleType": "External",
"canProtocol": {
"gearCanId": 1,
"gearStartBit": 2,
"gearBitslength": 3,
"gearReverseValue": 4
}
}
}
Steering information for Ackermann model
If available, the steering wheel message can also be parsed but using it in the drive model requires input about the vehicle steering model as detailed below. Although we provide this option, using simpler drive models proved to work just fine.
Parameter name | Description | Default |
---|---|---|
steeringCanId | CAN id for the steering wheel angle message | n/a |
steeringScale | Value to multiply the parsed raw steering wheel angle by in order to get angle in degrees. | 1.0 |
steeringWheelAngles | The steering table column containing sample steering wheel angles. | n/a |
wheelAngleType | Specification of provided | n/a |
wheelAngles | Steering table column containing corresponding wheel angle values. | n/a |
driveModel | In addition to | Differential |
Configuration template
If the input steering table is like follows (note that the input table should contain values for both right and left turns aka: positive and negative steering wheel angles),
steering wheel angles | right wheel angles |
---|---|
-360 | -30.0 |
-340 | -25.5 |
… | … |
340 | 35.5 |
360 | 40.0 |
The steeringTable
configuration block would look something like below.
"vehicle": {
...
"settings": {
...
"vehicleType": "ExternalWithSteering",
"canProtocol": {
...
},
"steeringTable": {
"steeringWheelAngles": [
-360, -340, -320, -300,
...
300, 320, 340, 360],
"wheelAngleType": "Right",
"wheelAngles": [
-30.0, -25.5, -20.0, -15.0,
...
19.0, 26.0, 35.5, 40.0 ]
}
}
}
Predefined Vehicle Parsing
For a small number of test vehicles we created a “hardcoded” parser to translate the CAN bus data of these vehicles to input values for our sensor fusion. This predefined parsing is now mostly obsolete because of our new flexible parser. We’ll put the definition of this parser here for completeness.
"vehicle": {
"type": "Automotive",
"vehicleStateEndpoint": "tcp://*:8999",
"settings": {
"canInterface": "PeakCAN",
"vehicleType": "R56"
}
}
Parameter name | Description | Default |
---|---|---|
type | Type of vehicle. Currently only | Automotive |
vehicleStateEndpoint | Endpoint for vehicle state output | tcp://*:8999 |
canInterface | CAN interface used for readin odometry data. Allowed options:
| PeakCAN |
vehicleType | Type of vehicle. Currently supported vehicles have to be manually added. Contact us for details. | R56 (BMW Mini) |
Vehicle Source Output Data Types
The vehicle source published the raw CANData
it reads from the CAN bus in addition to VehicleState
and VehicleSpeed
message. The latter is used as input to the sensor fusion algorithms.
Fusion Filter Option 1 - Low-dynamics Filter
General
The low dynamics (LD) filter combines odometry, GPS and IMU data to calculate the global position of a vehicle. This filter was initially concipated to work only with odometry and GPS data to calculate the 2D position and yaw angle of a vehicle. It is therefore suitable for simple tracking scenarios. For more complicated, for example augmented reality, applications we recommed using the HD filter as it outputs globally referenced 3D orientation additionally to globally referenced position. This filter relies heavily on the wheel velocity data of the car published on the car’s CAN bus. Therefore the quality of the output of this filter depends on the accuracy of this information.
Notes on Data Output
The LD filter outputs fusedVehiclePose
. The fusedVehiclePose
contains a 3D acceleration vector. The acceleration is defined in the following manner: There's a configuration flag imuToCarRotation
which takes a quaternion used to rotate vectors in the IMU frame to the car frame. By default it is the identity quaternion. For the LD model, the measured IMU acceleration is simply rotated by the imuToCarRotation
and written to the output.
In the LD filter, pitch and roll has to be derived from the acceleration data based on a model of the stiffness of the chassis. That assumes a flat surface. The HD model offers the full 6-DOF, and we are planning to unify them to have all data available at all times.
Notes on IMU Arrangement
LPMS-IG1P needs to be installed in the vehicle in a known orientation ideally with the coordinate axes of the IMU arranged in parallel to the vehicle coordinate system. The LD filter uses the imuTurnRateAxis
parameter to determine which axis it should use to calculate the vehicle’s orientation. For example if the IMU is installed in the car so that the Z axis is pointing upwards, imuTurnRateAxis
should be set to 0, 0, 1
.
Configuration Block
Insert the following configuration block into your config.json
file in the sinks
section to activate the LD filter. The filter's node name is vehicularFusion
.
..
"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": 1,
"y": 0,
"z": 0
},
"imuToCarRotation": {
"w": 1,
"x": 0,
"y": 0,
"z": 0
}
}
}
..
See below a description of the parameter options of the LD filter.
Parameter name | Description | Default |
---|---|---|
echoFusedPose | fusedVehiclePose output is printed to command line | false |
endpoint | Output port for the fusion result | 8801 |
fitModel | Model to use for fusion. At the moment only | SimpleCarModel |
driveModel | Model used to calculate the car trajectory from CAN bus data. If the steering wheel data and steering model are provided, | Differential |
velError | Velocity error for Kalman filter. Keep default value. | 0.277777778 |
omegaError | Omega error for Kalman filter. Keep default value. | 0.5 |
measurementError | Measurement error for Kalman filter. Keep default value. | 0.1 |
smoothFit | Enable this option to prevent filter output from jumping between odometry data and GPS measurement. Keep enabled. | true |
useImuTurnRate | If enabled the IMU turn rate is used instead of the wheel velocity based turn rate. Recommended. | false |
imuTurnRateAxis | The IMU axis to use for the Turn rate if | 1, 0, 0 |
imuToCarRotation | Rotation that is applied to accelerometer data from IMU before output | 1, 0, 0, 0 |
Output Format
See a technical description of FusionHub’s communication interface in one of the following chapters.
JSON
{
"fusedVehiclePose": {
"acceleration": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"globalPosition": {
"x": 0.0,
"y": 0.0
},
"lastDataTime": {
"timestamp": 0
},
"position": {
"x": 0,
"y": 0
},
"timestamp": {
"timestamp": 0
},
"utmZone": "31T",
"yaw": 0
}
}
Protobuf
syntax = "proto3";
package Fusion.proto;
message Vector2 {
double x = 2;
double y = 3;
}
message Vector {
double x = 2;
double y = 3;
double z = 4;
}
message FusedVehiclePose {
int64 timestamp = 1;
Vector2 position = 2;
Vector2 global_position = 3;
double yaw = 4;
string utm_zone = 5;
int64 timecode = 6; // Optional: if 0 not set.
Vector acceleration = 7;
}
message StreamData {
int32 sequence_number = 1;
FusedVehiclePose fused_vehicle_pose = 9;
}
Parameter name | Description | Unit |
---|---|---|
acceleration | 3D acceleration vector as measured by IMU. Describes the orientation of the vehicle in the vehicle coordinate system. | m/s^2 |
globalPosition | Longitude and latitude in degrees | degrees |
lastDataTime | Unused | s |
position | Position relative to starting point with X pointing North and Y pointing East in the current UTM frame | m |
timestamp | Timestamp of data acquisition | ns |
utmZone | UTM zone | UTM string |
yaw | Globally referenced yaw angle | rad |
After starting FusionHub, while the car is static, the filter will not deliver a correct yaw angle. The angle will be adjusted to the correct direction after a few seconds of driving the vehicle.
Fusion Filter Option 2 - High-Dynamics Filter
General
The high dynamics filter combines IMU and GPS data to calculate the global position of a vehicle. Instead of using the odometry it uses IMU data to determine the orientation changes of a car on the X, Y and Z axis. The direction of the vehicle is globally referenced from the GPS system. For increasing the direction reference quality a dual-antenna GPS system can be used.
The high dynamics filter works well for scenarios with agressive driving maneuvers such as drifting and cornering. During such maneuvers the turning motion of the wheels generally doesn’t directly correspond with the direction of the vehicle. Therefore this filter doesn’t rely on wheel velocity measurements for localization like the low-dynamics (LD) filter. This filter uses information from the wheels to determine if the car has come to a full stop.
As the filter relies heavily on GPS measurements it doesn’t deliver good results indoors. The better the GPS reception, the better the resulting output of the filter. In it’s current state it therefore only works outdoors. In a future version that combines LD and HD filters, this issue will be resolved.
Notes on Filter Output
The HD filter outputs the following data:
fusedVehiclePose
(2D pose): Output equivalent to the LD filter output. Includes position in meters relative to starting point, global position (lon, lat) and heading.fusedPose
(3D pose): relative to starting point, x, y (in meters) + z (height in meters) + 3D orientation quaternionglobalFusedPose:
globally referenced 3D position (longitude, latitude, height in meters) + 3D orientation quaternion in ENU frame
Which filter output works best depends on your application. For augmented reality applications we recommend using globalFusedPose
.
You can find more information regarding the ENU coordinate system here.
Notes on IMU Arrangement
For the car frame we use the Volkswagen (VW) coordinate frame convention:
VW frame
x: back
y: right
z: up
|
The IMU sensor can be mounted in any way but the ImuToCarRotation
quaternion needs to be provided to transform the IMU data into VW frame. For example, if the IMU is mounted like follows:
IMU mounting
x: forward
y: left
z: up
To match the VW frame, we need a 180° rotation around the z axis (clockwise). Therefore, the rotation matrix would be:
[ -1, 0, 0;
0, -1, 0;
0, 0, 1 ]
And the orientation quaternion woud be [w, x, y, z] = [ 0, 0, 0, 1 ]
which can be specified in the configuration like below:
"imuToCarRotation": {
"w": 0,
"x": 0,
"y": 0,
"z": 1
}
Check this page for more information on how to calculate the orientation quaternion.
Note: The orientation of the IMU for a unity quaternion [ 1, 0, 0, 0 ]
would be
IMU mounting
x: backwards
y: right
z: up
Configuration Block
Insert the following configuration block into your config.json
file in the sinks
section to activate the HD filter. The filter's node name is gnssImuFusion
.
..
"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
},
"outputWhenFilterNotReady": false,
"retainStateWhenStopped": true,
"smoothFit": true,
"globalOrigin": {
"longitude": 139.73226516666668,
"latitude": 35.657632
}
}
}
..
See below a description of the parameter options for the HD filter.
Parameter name | Description | Default |
---|---|---|
echoFusedPose |
| false |
endpoint | Output port for the fusion result | 8801 |
fitModel | Model to use for fusion. | ModelGnssImu |
accelError | Acceleration error for Kalman filter. Keep default value. | 0.01 |
omegaError | Omega error for Kalman filter. Keep default value. | 0.02 |
measurementError | Measurement error for Kalman filter. Keep default value. | 0.05 |
imuToCarRotation | Orientation quaternion of IMU relative to car frame | 1, 0, 0, 0 |
smoothFit | Enable this option to prevent filter output from jumping between IMU data and GPS measurement. Keep enabled. | true |
singleEndpoint |
| true |
poseEndpoint | Output port for the |
|
globalPoseEndpoint | Output port for the |
|
outputRawGnssData | Publishes raw Gnss data position instead of the fusion output. Useful for debugging. | false |
outputWhenFilterNotReady | Publishes temporary raw Gnss data output while the filter is initializing. Useful for a sanity check before moving the vehicle. | false |
retainStateWhenStopped | If the vehicle is detected to be stationary by looking at data from CAN bus, then the current filter state (position, rotation etc.) will be automatically retained until motion is detected. | true |
globalOrigin |