...
The low dynamics (LD) filter combines odometry, GPS and IMU data to calculate the global position of a vehicle. This filter was initially concipated wokring 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.
...
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 |
Filter Inputs
This filter needs the following sources as input. One option is to operate the filter with our with our LPMS-IG1P sensor that contains IMU and a GPS receiver. This allows for stadard 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": true, "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 |
...
Option 2 - Separate LPMS-IG1 IMU and RTK GPS sources (with NTRIP
...
caster for RTK correction)
LPMS-IG1 Source
Code Block |
---|
"imu": {
"type": "OpenZen",
"settings": {
"autodetectType": "ig1"
}
},
"RTCM": {
"type": "NTRIP",
"settings": {
"host": "some-host-name",
"port": "2101",
"mountpoint": "some-mount-point",
|
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
Code Block |
---|
"RTCM": { "usertype": "some-userNTRIP", "passwordsettings": "some-password",{ "userAgenthost": "LPVRsome-host-name", "initialLatitudeport": 35.65736"2101", "initialLongitudemountpoint": 139.73239"some-mount-point", "forwardGnssuser": "some-user", true } }, "gnsspassword": { "some-password", "type": "NMEA", "settingsuserAgent": {"LPVR", "portinitialLatitude": "/dev/ttyUSB0"35.65736, "baudrateinitialLongitude": 115200139.73239, "rtcmforwardGnss": 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
...
Parameter name
...
Description
...
Default
...
type
...
Data output format for gnss data source. Currently only NMEA
is allowed.
...
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
CAN bus and vehicle decoder source
Code Block |
---|
Code Block |
"gnss": { "type": "Automotive", "vehicleStateEndpoint": "tcp://*:8999NMEA", "settings": { "canInterfaceport": "PeakCAN/dev/ttyUSB0", "vehicleTypebaudrate": 115200, "R56rtcm": true } } |
Parameter name | Description | Default |
---|---|---|
type |
Data output format for gnss data source. Currently only |
Automotive
|
NMEA |
port |
Endpoint for vehicle state output
tcp://*:8999
canInterface
CAN interface used for readin odometry data. Allowed options:
PeakCAN
Vector
PeakCAN
vehicleType
Type of vehicle. Currently supported vehicles have to be manually added. Contact us for details.
R56 (BMW Mini)
This Filter outputs:
fusedVehiclePose
Output Data Format
...
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 |
CAN bus and vehicle decoder source
Code Block |
---|
"vehicle": { "fusedVehiclePosetype": "Automotive", { "vehicleStateEndpoint": "tcp://*:8999", "accelerationsettings": { "xcanInterface": 0.0, "PeakCAN", "yvehicleType": 0.0,"R56" "z": 0.0 }, "globalPosition": { "x": 0.0, "y": 0.0 }, "lastDataTime": { "timestamp": 0 }, "position": { "x": 0, "y": 0 }, "timestamp": { "timestamp": 0 }, "utmZone": "31T",} } |
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) |
Filter Outputs
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.
As the filter relies heavily on GPS measurements it doesn’t deliver good results indoors. The better GPS reception, the better the resulting output of the filter. The yaw angle of the vehicle is calculated based on several GPS and odometry measurements when the car is moving. Therefore, 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. The exact output data format is described below.
Code Block |
---|
{ "fusedVehiclePose": { "yawacceleration": { 0 } } |
...
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
Additional Notes
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.
...
"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
}
} |
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 |
High-Dynamics Filter (IMU + GPS)
...
Information regarding the ENU coordinate system is here: https://en.wikipedia.org/wiki/Local_tangent_plane_coordinates
Example Configuration
Playback and fusion of prerecorded data: gpsImuFusionPlayback.json
Data Playback [DEPRECATED, switch over to ReplayExecutable]
...
Code Block |
---|
ReplayExecutable.exe -r <path/to/file.json> [--replay-speed 1] [--queue-size 100] [--echo-data] [--verbose] |
Key | Description | Type | Example value |
---|---|---|---|
-r | Path to read in file | String | “log.json” |
--replay-speed | Speed to the actual recording | Double | 1 |
--queue-size | The size of queue that file reader would stop pushing new data to the replay queue. Increase this value when you see lots of data is published at the same time when running with | Integer | 100 |
--echo-data | Listen to the publishing endpoint and display the replayed data | N/A | N/A |
--verbose | Print the debugging information, i.e., the timestamp a packet is added to the replay queue, replayed from the replay queue, and discarded from the replay queue. | N/A | N/A |
A normal FusionHub program can then receive the file data by having an endpoints source defined in the configuration file:
...