...
For details about the overall configuration of the RTK-GPS system refer to this section.
GNSS Output Format
JSON
Code Block |
---|
"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
Code Block |
---|
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.
...
Configuration example
Code Block |
---|
"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
Anchor | ||||
---|---|---|---|---|
|
...
Configuration example
Code Block |
---|
"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, "FrontLeftWheel": 0, "FrontRightWheel": 16, "RearLeftWheel": 32, "RearRightWheel": 48 } } } } } } |
Additional Parameters
Gear Stick Position for Velocity Sign
...
Configuration template
Code Block |
---|
"vehicle": { ... "settings": { ... }, "vehicleType": "External", "canProtocol": { "gearCanId": 1, "gearStartBit": 2, "gearBitslength": 3, "gearReverseValue": 4 } } } } } |
Steering information for Ackermann model
...
The steeringTable
configuration block would look something like below.
Code Block |
---|
"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
...
See a technical description of FusionHub’s communication interface in one of the following chapters.
JSON
Code Block |
---|
{ "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
Code Block |
---|
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; } |
...
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 for 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.
...
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
...
You can find more information regarding the ENU coordinate system here.
Notes on IMU Arrangement
The used For the car frame is we use the Volkswagen (VW) coordinate frame convention:
...
And the orientation quaternion woud be [w, x, y, z, w] = [ 0, 0, 0, 1 , 0 ]
which can be specified in the configuration like below:
Code Block |
---|
"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
Code Block |
---|
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
.
Code Block |
---|
.. "sinks": { .., "gnssImuFusion": { "echoFusedPose": false, "endpoint": "tcp://*:8803", "sinksfuser": { .., "gnssImuFusionfitModel": {"ModelGnssImu", "echoFusedPoseaccelError": false,0.01, "endpointomegaError": "tcp://*:8803"0.02, "measurementError": 0.05, "fuserimuToCarRotation": { "fitModelw": 1, "ModelGnssImu", "x": 0, "accelErrory": 0.01, , "z": 0 "omegaError": 0.02 }, "measurementErroroutputWhenFilterNotReady": 0.05false, "imuToCarRotationretainStateWhenStopped": { true, "wsmoothFit": 1true, "xglobalOrigin": 0,{ "ylongitude": 0139.73226516666668, "zlatitude": 035.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 a temporary raw Gnss data output while the filter is initializing. Useful for a minimal 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 | A global position as longitude and latitude: For | { 0, 0 } |
Output Data Format
FusedVehiclePose
JSON
Code Block |
---|
{ "fusedVehiclePose": { "acceleration": { "x": 0.0, "y": 0.0, "z": 0.0 }, "globalPosition": { "x": 0.0, "y": 0.0 }, "lastDataTime": { "timestamp": 0 }, "position": { "x": 0.0, "y": 0.0 }, "timestamp": { "timestamp": 0 }, "utmZone": "31T", "yaw": 0.0 } } |
Protobuf
Code Block |
---|
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. | m/s^2 |
globalPosition | Longitude and latitude in degrees | degrees |
lastDataTime | Unused | s |
position | Position within UTM zone | m |
timestamp | Timestamp of data acquisition | ns |
utmZone | UTM zone | UTM string |
yaw | Globally referenced yaw angle | rad |
FusedPose
JSON
Code Block |
---|
{ "fusedPose": { "lastDataTime": { "timestamp": 0 }, "orientation": { "w": 1.0, "x": 0.0, "y": 0.0, "z": 0.0 }, "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, "timestamp": { "timestamp": 0 } } } |
Protobuf
Code Block |
---|
syntax = "proto3"; package Fusion.proto; message Quaternion { double w = 1; double x = 2; double y = 3; double z = 4; } message Vector { double x = 2; double y = 3; double z = 4; } message FusedPose { int64 timestamp = 1; Vector position = 2; Quaternion orientation = 3; Vector angular_velocity = 4; int64 timecode = 5; // Optional: if 0 not set. } message StreamData { int32 sequence_number = 1; FusedPose fused_pose = 4; } |
Parameter name | Description | Unit |
---|---|---|
lastDataTime | Unused | s |
orientation | Orientation quaternion in ENU coordinate frame | without unit |
position | X, y position + height | m |
timestamp | Time of data acqusition | ns |
GlobalFusedPose
JSON
Code Block |
---|
{ "globalFusedPose" { "orientation": { "w": 1.0, "x": 0.0, "y": 0.0, "z": 0.0 }, "timestamp": { "timestamp": 0 }, "position": { "longitude": 0.0, "latitude": 0.0, "height": 0.0 } } } |
Protobuf
Code Block |
---|
syntax = "proto3"; package Fusion.proto; message Quaternion { double w = 1; double x = 2; double y = 3; double z = 4; } message GpsPoint { double longitude = 2; double latitude = 3; double height = 4; } message GlobalFusedPose { int64 timecode = 5; // Optional: if 0 not set. int64 timestamp = 1; GpsPoint position = 2; Quaternion orientation = 3; } message StreamData { int32 sequence_number = 1; GlobalFusedPose global_fused_pose = 10; } |
...