Repositories and Packages
Ufil is split into seven components, each in its own directory below src/ of the
workspace.
Every component contains a meta package that depends on all of its packages, so
make <component> or colcon build --packages-up-to ufil_<component> builds a complete
component.
Component |
Meta package |
Content |
|---|---|---|
|
|
Tracking library, messages, ROS conversions, ETSI CAM handling, UDP/MQTT/OSC bridges, message filter, visualization |
|
|
Outdoor sensor node: point cloud preprocessing, lidar tracking, camera classification |
|
|
Road side unit: central fusion, CAM reception |
|
|
On-board unit: own-vehicle state estimation, CAM transmission |
|
|
Sensitive surface layer: mat simulator, wheel tracking, vehicle tracking |
|
|
Command line tools for bags (merge, trim, HDF5 export) and a landmark map builder |
|
|
Complete deployments: CARLA, CPM Lab, University of Alberta, pedestrian simulation (see Examples) |
All packages are released together (current version 0.2.0) and licensed under the MIT license.
Note
Every node below is a composable component. The executable column gives the generated
standalone executable for ros2 run; components without an executable are loaded into a
component container by their launch files. Topic names are relative to the node namespace.
ufil-core
Package |
Description |
|---|---|
|
Header-only, ROS-independent C++20 library for multi-object tracking: state, dimension, classification and existence types, transition and measurement models, distance measures, association, updaters, track management and point cloud detection. See Tracking Pipeline. |
|
Message definitions (see Messages). |
|
Conversions between |
|
ETSI ITS Cooperative Awareness Messages (CAM, EN 302 637-2): generates the CAMs of a vehicle from its Ufil object (with the ETSI generation rules and the path history) and of a road side unit, and converts received vehicle CAMs back into Ufil objects. |
|
Bridge between ROS 2 and UDP, e.g. to exchange encoded ETSI messages. |
|
Forwards only the objects inside a polygonal area of interest. |
|
Forwards object lists or occupancy grids as JSON to an MQTT broker. |
|
Forwards object lists or occupancy grids as JSON in Open Sound Control (OSC) messages over UDP. |
|
Converts Lanelet2 maps and object lists into |
|
Launch files for RViz 2 ( |
Nodes
Component |
Executable |
Interface |
|---|---|---|
|
|
|
|
|
|
|
|
Publishes the CAM of a road side unit at a fixed WGS84 |
|
|
|
|
|
datagrams on |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lanelet2 OSM file |
The CAM encoding and decoding (ASN.1 UPER) between etsi_its_cam_msgs/CAM and UDP payloads is
done by etsi_its_conversion of the external
etsi_its_messages package. A complete
V2X link therefore consists of:
---
config:
layout: elk
startOnLoad: false
---
flowchart TB
OBJ(["object<br/>ufil_msgs/ObjectList"])
subgraph OBU["On-board unit"]
direction LR
GEN["vehicle_cam_generator_node<br/>(ufil_etsi)"] -->|"cam"| ENC["cam_encoder<br/>(etsi_its_conversion)"] -->|"udp"| SND["udp_sender_node<br/>(ufil_udp)"]
end
subgraph RSU["Road side unit"]
direction LR
RCV["udp_receive_node<br/>(ufil_udp)"] -->|udp| DEC["cam_decoder<br/>(etsi_its_conversion)"] -->|cam| CR["vehicle_cam_receiver_node<br/>(ufil_etsi)"]
end
OUT(["object_list<br/>ufil_msgs/ObjectList"])
OBJ --> OBU
OBU -. "UDP, port 5000" .-> RSU
RSU --> OUT
CAM transmission from an on-board unit to the road side unit
Important
Sender and receiver must use the same time_shift_nanosec: ETSI timestamps count from 2004,
and the shift maps the ROS time onto that epoch (e.g. 1104537600000000000 for wall-clock
time in the UofA example).
Forward the fused object list to an MQTT broker, e.g. for a dashboard:
ros2 run ufil_mqtt mqtt_message_converter_node --ros-args \
-r input:=/rsu/object_list -p broker.host:=localhost -p mqtt_topic:=ufil/object_list
ufil-osn
The outdoor sensor node turns the point cloud of a roadside lidar into an object list.
Package / component |
Description |
|---|---|
|
Transforms |
|
Clusters |
|
Projects every track into the camera images, matches it with YOLO detections and fuses the
camera classification with the tracker classification ( |
|
|
ros2 launch ufil_osn osn.launch.xml input_topic:=/lidar/points use_sim_time:=true \
pcl_preprocessor_params_file:=/path/to/overrides.yaml
The parameter files given to the launch file are loaded on top of the package defaults, so they only need the values that differ (typically the frames, the static object file and the filter limits).
ufil-rsu
Package / component |
Description |
|---|---|
|
Fuses the object lists of any number of sensors into |
|
|
The central fusion follows a sensor-to-global strategy based on Aeberhard: every incoming object
list is associated with the global tracks (Euclidean distance, association.threshold) and
updates them:
State: Kalman filter with a random walk model for pedestrians and an extended constant velocity model for all other classes.
Existence: Dempster-Shafer fusion with the sensor’s field of view and occlusion (Existence Probability Fusion).
Classification: Dempster-Shafer fusion with per-class trust (Classification Fusion).
Dimension: grid map fusion (Dimension Fusion).
Measurements are buffered for fusion.buffer_duration seconds. When data arrives that is older
than already fused data, the tracks are rolled back and the buffer is replayed in time order, so
the result does not depend on the arrival order of the sensors. A large jump of the timestamps
(e.g. a restarted recording) resets the fusion; implausible CAM timestamps are dropped instead.
Tracks are published every fusion.period seconds if their existence probability exceeds
output.min_existence_probability.
Sensors are configured by name:
/rsu/central_fusion:
ros__parameters:
target_frame: map
sensor_names: [osn, cam]
osn:
topic: /osn/object_list
fov_topic: /osn/sensor_fov # "" if the sensor has no field of view
occlusion_topic: /osn/dynamic_occlusion_grid # "" if the sensor has no occlusion grid
is_cam: false
trust: {existence: 0.7, car: 0.8, truck: 0.8, motorcycle: 0.8,
bicycle: 0.8, pedestrian: 0.8, stationary: 0.8, other: 0.8}
cam:
topic: /rsu/cam/object_list
fov_topic: ""
occlusion_topic: ""
is_cam: true # CAM objects do not initiate existence
trust: {existence: 0.8, car: 0.8, truck: 0.8, motorcycle: 0.8,
bicycle: 0.8, pedestrian: 0.8, stationary: 0.8, other: 0.8}
Parameter |
Default |
Meaning |
|---|---|---|
|
0.02 |
Fusion and publishing period [s] |
|
2.0 |
Buffer for late arriving measurements [s] |
|
3.0 |
Maximum distance between track and measurement [m] |
|
0.2 / 0.8 |
Clamp of the prediction weight \(\gamma\) |
|
0.05 |
Decay of the existence probability per missed update |
|
0.1 |
Cell size of the dimension grid map [m] |
|
0.95, 0.1, 0.5, 0.9 |
Update factor and probability levels of the dimension grid map |
|
0.2 |
Minimum existence probability of published tracks |
ufil-obu
Package / component |
Description |
|---|---|
|
Combines the GNSS fix, the filtered odometry and the acceleration (time-synchronized) into
the own vehicle as a Ufil object in UTM coordinates ( |
|
|
ros2 launch ufil_obu state_estimation.launch.xml namespace:=obu \
robot_localization_params_file:=/path/to/robot_localization.yaml \
object_aggregation_params_file:=/path/to/vehicle.yaml
ros2 launch ufil_obu cam.launch.xml namespace:=obu target_ip:=192.168.0.10
In the examples the vehicles’ states come from adapters instead (CARLA ground truth, CPM Lab indoor positioning, SBG INS of the UofA vehicle); they feed the same CAM chain.
ufil-ssl
The sensitive surface layer is a pressure-sensitive mat in the road surface. Its electronics
publish a pressure grid (nav_msgs/OccupancyGrid) per mat. All SSL packages are C++ components
with a ROS-independent core library.
Package / component |
Description |
|---|---|
|
Detects wheel contacts as local pressure maxima ( |
|
Assembles vehicles from |
|
Virtual mat: extrapolates the vehicles of an |
|
Internal wheel and track messages between the two trackers. |
|
Launch files |
The SSL is described in detail in Literature (Schäfer et al., IV 2023).
ufil-tools
Package |
Kind |
Usage |
|---|---|---|
|
command line tool |
|
|
command line tool |
|
|
ROS 2 node |
|
The command line tools are on the PATH after source install/setup.bash; they are started
directly (not with ros2 run), need no running ROS graph and print all options with --help.
# Merge the recordings of two machines and export the result for the evaluation
ufil_bag_manipulator merge head_bag headless_bag -o merged_bag
ufil_hdf_converter merged_bag -o merged.hdf5 -t /rsu/object_list /osn/object_list
Evaluation Scripts
The evaluation/ directory of the workspace contains Python scripts that evaluate recorded
tracker outputs (converted to HDF5 with ufil_hdf_converter): they interpolate and filter the
tracks, compute position and dimension errors and plot the results. evaluation/config.yml
configures the frame transformation, the preprocessing and the thresholds. The data under
evaluation/bags holds runs of a crossing scenario for every combination of distance measure
(Euclidean, Mahalanobis, Wasserstein) and association algorithm (greedy, Hungarian,
Jonker-Volgenant, LP solver).