Data fusion development with ROS

For the development of data fusion algorithms and environmental models with ROS on Linux, the tool BASELABS Create can be used in a combined workflow.

Data fusion for ROS

The Robot Operating System (ROS) is a middleware which is commonly used in the industry for system integration. BASELABS Create adds the field-tested data fusion code that is required for implementing environment perception systems for automated vehicles. The data fusion can be configured on a graphical basis, which leads to massive time savings compared to a programmatic implementation.

Benefits

  • Seamless workflow from the configuration of the data fusion to an executable application in ROS
  • Data fusion of arbitrary sensors like cameras, radars and lidars
  • Flexible prototyping environment to build scalable data fusion applications
  • Off-the-shelf algorithms for many data fusion challenges and driving functions
  • Implementation of custom algorithms
  • Trusted by leading suppliers and OEM

User Support

Besides the exhaustive documentation of BASELABS Create, we support new and experienced users with tutorials and templates. For ROS users, the product includes guidance on how to use BASELABS Create under Linux. As a kick-start, we also include a data fusion example including sample sensor data for ROS.

Features

  • Usage of all relevant automotive sensors
  • Up to 360° sensor coverage
  • Overlapping and non-overlapping sensor fields of view
  • Extended objects support
  • Cross-traffic support
  • Data fusion for more reliable dynamic state estimation, e.g. object's position, velocity and acceleration
  • Built-in clutter handling
  • Asynchronous sensor data handling
  • Sensor data plausibility check for typical errors and inconsistencies

Data Fusion Designer

Loading the player ...

Exemplary configuration of a data fusion application under Windows. The same workflow is provided under Linux.

 

Building an environment model involves two major development aspects: the development of the algorithm itself and its integration into a larger system. With the Data Fusion Designer of BASELABS Create, Linux users have access to a convenient workflow for the first task of algorithm development. The data fusion can be configured on a graphical basis, which comes with massive time savings compared to a programmatic implementation. See the data fusion designer in action in the video above – building a multiple-sensors fusion application takes only about 25 minutes in that example.

ROS Integration

Loading the player ...

The video shows how a data fusion application which has been developed using BASELABS Create can be used with the Robot Operating System (ROS).

 

BASELABS Create provides a seamless workflow from the configuration of the data fusion to an executable application in ROS. Beside the data fusion code, the data fusion designer generates interop-code which is required for the integration. In addition, a ROS node is required which uses the functions defined in the data fusion code and subscribes to the corresponding messages. BASELABS Create is shipped with a sample node. With that, you are all set to execute the data fusion in ROS.

Tutorial

Besides the exhaustive documentation of BASELABS Create, we support new and experienced users with tutorials and templates. For ROS users, the product includes guidance on how to use BASELABS Create under Linux.

ROS Integration

This tutorial will guide you through the steps that are necessary to run the prepared BASELABS Create data fusion example in a ROS environment.

 


Prerequisites

Please make sure that

  • the Robot Operating System (ROS) software is installed in your Linux environment. The required ROS desktop full installation package for your Linux distribution can be downloaded from the ROS website.

  • the BASELABS Create software is setup in your Linux environment. To setup BASELABS Create on Linux, follow the steps as described in the product manual.

 


Run the Data Fusion Example on ROS

The archive Examples/ROS.tgz contains a sample project which includes

  • a data fusion configuration that uses a smart camera, a long-range radar and a short-range radar to determine the dynamic objects in the vehicle's surrounding. Beside the object's position, velocity, heading and acceleration, the data fusion algorithm provides an existence probability, the covariance of the estimation and a unique object identifier,

  • ROS node that encapsulates and executes the data fusion algorithm,

  • ROS rviz configuration to visualize camera images and the result of the data fusion algorithm,

  • ROS bag file that contains measurement data of the sensors, ego motion data such as velocity and yaw rate as well as camera images for visualization purposes.

 

Make your own copy of the sample project

  • Extract the archive to a place of your liking, e.g. ~/BASELABS_Create/

    mkdir ~/BASELABS_Create && tar xf Examples/ROS.tgz -C ~/BASELABS_Create/

  • Inside the extracted folder is a subfolder called ROS, e.g. ~/BASELABS_Create/ROS which will hereafter be called the project folder. Navigate to the project folder, e.g.

    cd ~/BASELABS_Create/ROS/

 

Generate the Data Fusion code

  • Change to the project folder.

  • Add NuGet packages to the example project

    nuget restore

  • Build the project

    xbuild DataFusion.sln

  • Open the project DataFusion.sln in the Data Fusion Designer.

  • In the designer, press Generate data fusion

  • Close the Data Fusion Designer.

  • Build the project again

    xbuild DataFusion.sln

 

Build the Data Fusion ROS node

  • From the project folder type

    cd DataFusion.ROSNode

    mkdir build && cd build

    cmake .. && make

 

Start ROS

  • Open a new terminal window.

  • Start the ROS server from the command line by typing

    roscore

 

Run the BASELABS Data Fusion ROS node

  • Open a new terminal window.

  • Navigate to the project folder.

  • Inside the project folder, navigate to the build folder by typing

    cd DataFusion.ROSNode/build/

  • Start the BASELABS DataFusion ROS node by typing

    ./devel/lib/datafusion_node/datafusion_node

 

Start the ROS visualizer

  • Open a new terminal window.

  • Navigate to the project folder.

  • Start the ROS visualizer using the default.rviz configuration by typing

    rviz -d default.rviz

 

Play the sample ROS bag

  • Open a new terminal window.

  • Navigate to the project folder.

  • Play the sample ROS highway bag by typing

    rosbag play highway_1min.bag

 


Customize the Data Fusion Algorithm

The actual data fusion configuration can be found in the solution DataFusion.sln and its containing file DataFusion.dml that are part of the ROS demo. This solution is compatible with the standalone Data Fusion Designer, MonoDevelop on Linux and Visual Studio on Windows. To customize the data fusion configuration DataFusion.dml, follow the steps as described in the product manual.

The following section explains how to extend the ROS integration, e.g. to include additional sensors.

Extend the ROS Node

For a ROS usage of the generated data fusion algorithm, the example provides a ROS node in the        files ./DataFusion.ROSNode/DataFusionNode.* that subscribes to the sensors ROS topics, calls into the generated data fusion algorithm and publishes the result.

For a given data fusion configuration, the data fusion designer generates the actual data fusion code and corresponding C source and header files in the folder ./bin/Debug/Interop/ relative to the project folder. The generated header file data_fusion.h provides data types such as RadarSpace and functions to process sensor measurements (e.g. data_fusion_process_measurements0()) as well as the data_fusion_get_tracks() function to retrieve the result of the data fusion.

After the data fusion configuration has been modified and new code has been generated by the data fusion designer, the API of the generated C-source files in bin/Debug/Interop/ may change and requires changes to the ROS node.

After a new sensor has been added, search for the constructor of the ROS node in the file DataFusionNode.cpp, subscribe to the ROS topic that contains the data of the added sensor and register a new method that is called each time new data arrives. In the new method, convert the ROS message to the C structure declared in the generated Interop/data_fusion.h file. Finally, call the corresponding processing method and provide the C structure. You can find an example for the smart camera in the DataFusionNode::ProcessSmartCameraObjects() method.

Contact & Downloads

Top of page
Contact us!
Close

Contact us!

Get in touch directly
(+49 (0)371 3371 51 51) or leave your contact data below.

Submit
* Required fields
This website uses cookies to ensure you get the best experience on our website. By visiting www.baselabs.de you agree to the use of cookies.