Virtual 3D Polygon for ADAS and Vehicle Dynamics Testing

Polygon is a platform for tests involving moving objects. It was made especially for vehicle dynamic testing and advanced driver assistance systems - ADAS, which increases safety in the traffic. Polygon provides a visual representation of measurements in the three-dimensional virtual space and easy tools for geometric measurements between multiple static or movable objects. Due to it's flexibility it's not only used in Automotive, but also Marine, Heavy machinery, ...

Polygon is a platform for tests involving moving objects. It was made especially for vehicle dynamic testing and advanced driver assistance systems - ADAS, which increases safety in the traffic. Polygon provides a visual representation of measurements in the three-dimensional virtual space. It also provides easy tools for geometric measurements between multiple static or movable objects. Polygon visualization and outputs can be calculated during the measurements or after in offline mode. Due to its flexibility it's not only used in Automotive, but also Marine, Heavy machinery, ...


Image 1: Measurement together with 3D visualization





Polygon works as a Dewesoft X plugin. To install it, please copy Polygon.dll to the Addons folder of Dewesoft X Software. Then open the Dewesoft X software, go to Settings -> Extensions and click on the plus button. This will open an extension manager. The Polygon plugin should appear in the extension manager list, where you have to enable it to make it work. If the plugin is successfully enabled it will appear in the extension list. If you don't find the plugin in the extension manager click to refresh the list in the extension settings.


Image 2: Open Settings -> Extensions -> click Plus button -> type in Polygon and enable the Polygon plugin 



Image 3: Polygon plugin is now enabled inside Dewesoft X 


Optional plugin: Vehicle Simulation

If you want to test Polygon setups before use or want to learn how to use the Polygon plugin offline there is an additional Vehicle Simulation plugin available - VehicleSimulation.dll library. The installation process is the same as with the Polygon plugin. Vehicle simulation plugin automatically adds longitude, latitude, and heading channels that can be used to move vehicles in the Polygon environment. The added channels can be controlled with keyboard arrows or with joystick movement. 

Image 4: Polygon and Vehicle simulation enabled inside Dewesoft X 




Under channel setup click on the Polygon button in the main toolbar. Polygon setup is split in two panels. Left panel is a setup panel, where Objects, Origin and Calculations are edited and on the right side is a visualization window where the preview of the setup is shown. To see the Polygon on the measure screen just put Map widget on the measure screen, turn it in 3D map and add all the objects. Although, Polygon display should be already visible. Always remember, that calculations can be performed just between 2D objects.

Image 5: Polygon setup view


Objects in polygon are used for calculations and also for positioning. Objects are defined with position and the geometry. Position can be measured, predefined or related to another object. Geometry of an object can be defined by multiple primitive geometries such as points, lines, polygons and arcs. With the defined position Polygon can make calculations between geometries of different or same objects. Objects can also be visualized with a model. Objects are managed with the buttons shown on the picture below, they can be added +, deleted -, move upwards or downwards. 

Image 6: Object list inside Polygon 

Object list has 5 columns:

  • Ord.: shows order of the objects (managed with up and down arrows)
  • C: option to change colour
  • Name: to edit the name of an object 
  • Display: buttons, to select displayed properties of the object (orange means, that property is visible)
  • Focus on: with a click, the object is shown from the top in the middle of the preview window


Positon

As mentioned before, objects in Polygon are defined with position and geometry. In the position tab, there are few properties to be assigned to an object. With Global position, the object is placed in a virtual environment.

Vehicle property settingsImage 8: Object position settings 


GLOBAL POSITION of the object can be defined in multiple ways:

  • Static origin - used for static objects with known position on the test track  
  • Constant position - used for static objects with known GNSS position (Latitude, Longitude and Heading)
  • GNSS Channels - for measured GNSS position with Latitude, Longitude and Heading channel
  • Navigation channel - for measured position with Navigation channel
  • Other object - used for objects that are offset from another object that has a known geodetic position (used with all, except static origin) 


Image 9: Specifying offsets from a GNSS antenna to the vehicle center  


With offset from global, you can offset a local coordinate system of the object. X,Y  and Yaw are relative positions regarding the global coordinate system of the object. Relative offset can be defined with static value in meters (X and Y offset) and in degrees (Yaw offset) or channel (X/Y/Yaw channel). The offset is applied by strict order, first the translation is applied and then rotation. 

Velocity channels are required only for calculations for Time To Collision. Channels that are used for TTC calculations should have the velocity in m/s. Time to Collision means the time before a collision happens between involved vehicles/objects/subjects if their speeds would not change and taking into account their paths. If no velocity channel is defined, the zero is assumed, which can also be defined explicitly. Time to collision is defined by this formula:


Objects have an additional “Freeze position” option. If it is set to freeze or freeze - unfreeze then additional channels have to be assigned to define when the object should freeze (Freeze input) and when it should unfreeze. You can choose between Positive and Negative crossing and the Level when the object freezes. If only Freeze is selected, the object will remain frozen till the end of storing, otherwise the input for unfreeze should be used to unfreeze the object. The freeze - unfreeze function is convenient for more consecutive brake tests in one datafile.


Every object in polygon, can consist of more geometries, it is not limited to only one. There are  various geometries available and few of them are totally configurable. Geometries such as Points, polylines, polygons, rectangles and arcs can be used for calculations while 3D models and routes are used only for visualization. Geometries are added with + button and deleted with - button. Every geometry can have its own color and name.

Image 11: Geometry tab 

Points

Points are added with X and Y coordinates. In one geometry of points, there can be multiple points added.   

Polyline

Just simply add more than one X and Y coordinates to create a polyline.

Vehicle with visualized travel radiusImage 13: Polyline example 

Rectangle

Choose the X and Y coordinates to define the position of the  center of the rectangle. Also the size of the rectangle  should be defined (length and width). 

Polygon

Polygon is defined with multiple points (X and Y coordinates) which are connected. The local coordinate system of Polygon is on the 0,0 point.

Arc

Arc is defined with X, Y coordinates of the center, the starting angle, angle and radius.

3D model

A 3D model is added just for visual effect. It doesn’t have any effect on the calculations. Your own 3D model can be added in Map.

Route

Route is a predefined path (track, road...). It can be made out of lines and curves. If we define it manually we have four elements we can use: Straight, Straight to, Curve and Curve to. Routes can also be imported. Just record Dewesoft file while driving the route, export it to GoogleEarth.kml file and then import it in polygon. After that you can modify it manually if you want. If origin is not set then import of the route will set it automatically to route start and set direction to the start direction of the route.  It doesn’t have any effect on the calculations.


Origin

Origin defines zero point and orientation of the coordinate system on the local plane. All X and Y positions of objects are relative positions regarding origin. There are two ways to define origin. Dynamic or static. If you choose dynamic, the origin will move with the measured object (useful for vehicle to vehicle testing), meanwhile if you choose static origin, you have also two different options which are described under here. If the static origin is selected, there are offset windows available for X, Y and Yaw. The main purpose of these offsets is to make the small adjustments while analyzing, to help correct the small measurement errors with recalculation.

  • ORIGIN WITH POSITION AND HEADING

Defining the static origin with point and heading, is very quick and simple but not very precise. It is defined only with the position and heading of the selected object (It can be put in manually or with the current position of an object with the Setup from… button). It can for example be used for placing virtual tracks on the proving ground, where small deviations are not important.

  • ORIGIN WITH TWO POINTS

Origin defined with Two points is a little more complex, but is used when you have the objects fixed on track that are important for calculations (cones, points, lanes…). When defining origin with two points, you want to make sure that the distance between Point 1 and Point 2 is as long as it can be. For defining points, you have to input the GNSS position and the local position. The GNSS position can be typed in manually or inserted with the ‘Set from…’ button which opens you a list of objects which can define a GNSS position. The local position of the points is important, since it defines where the measured points are in real life so they can be transformed in the virtual world origin (the position of the origin is from point 1 and the orientation of the axis from point 2).  So in the case below, we put in the coordinates of two points (both on the same  straight line, separated for 85,5 m) and from this input, we get an origin on the start of the 1st point, with the X axis oriented directly in the direction of the 2nd point.




Origin has to be defined accurately to ensure that objects positions in the polygon environment correspond to the position on the real-world test track. Two mistakes can be made during origin setup: wrong definition of origin zero point or wrong definition of origin orientation.

Wrong definition of origin zero point can happen when we position the GNSS antenna is in the wrong position on the test track that doesn't match the position of our modeled environment. Errors from this mistake are constant throughout the test area (constant offsets between objects on the real test site and objects modeled in polygon). These errors can be noticed with a comparison of the GNSS antenna position on the real test track compared to the position of it (object connected to it) in the polygon environment.

Error in origin orientation is made when GNSS heading isn't aligned with the X-axis orientation of the real test site (origin set up with current position and heading), or with positioning error in the two-point definition. Positional errors increase with the distance from the origin, small errors in orientation definition can produce large positional errors away from the origin. Therefore it is recommended to use a two-point origin definition when positional accuracy of the test area is needed (examples: slalom, lane change, pass-by noise).



Heading angle errorDistance X
100 m200 m300 m500 m800 m1000 m
0,1°0,170,340,510,851,361,70
0,2°0,350,701,051,752,803,50
0,5°0,871,742,614,356,968,70
1,753,505,258,7514,0017,50


In the tab ‘Calculations’, there are three additional tabs; Setup, Groups and Channels.

Output table where all polygon outputs are specifiedImage 17: Calculations tabs

 

Setup

In the setup tab, the user chooses what kind of calculations will be done and between which groups. There are no default outputs. But there is a table where they can be defined. There are few buttons on the top of the table for adding, moving and deleting outputs. Each output results in one data channel, for which color and name can be defined. For Distance X, Y and Time to collision X, Y, there is also a channel created for alignment. Units are  assigned automatically (meters and seconds).

Image 18: Distance along route visualization 

Absolute distance (D) gives the shortest distance between two groups. All types of objects are supported for distance calculation (if they have defined geometry). The absolute distance is always positive.

Overlap (OL) is calculating if 2 groups of objects are covering each other. It can be 0 or 1, No overlap or Overlap. 

Time from overlap (TFO) is calculating the time between two overlaps over the same group (more objects can be selected in one group).

Time to collision X and Y  (TTC) means the time before a collision happens between involved vehicles/objects/subjects if their speeds would not change and taking into account their paths (for the direction X and direction Y).

Distance X and Y (DX, DY) are calculating the distance in the X and Y direction. The distances in X and Y can be negative or positive, a calculation results are always in the ‘From group’ coordinate system.  

Another part of the result of this calculation is alignment (AX, AY). Two groups are aligned, if the group that distance is calculated to, is in ‘the corridor’ of the group that distance is calculated from. The width of the corridor that is used for alignment calculation is the biggest dimension perpendicular to the X or Y axis.  See the added pictures. On the first one, the objects are aligned and on the second they aren’t.



Image 19: Grouping tab

Groups are used for the calculations (in calculation when the dropdown menu is shown, you can choose a group). On the top of the tab there are + and - for adding and deleting the groups. In the groups you can choose one or multiple geometries from different or same objects that are used for calculations. This is useful if there is a test for collision to multiple objects. The groups can also be renamed (except the groups that are generated automatically from objects, these Groups also can’t be deleted or edited). It has to be noted, that visualization objects are not displayed here since the calculations aren’t supported between them.For example, if you have more different objects and you want to calculate time from overlap between them, you just put them in the same group and then add this group to calculation.


Channels 

The channels tab shows all of the outputs that are calculated from the setup (and also see the preview). Channels can be renamed, the color can be changed, the Min and Max values can be changed and also the units can be edited.  The channels that you want to use in the measure screen must be switched to ‘Used’.

Default names of the channels are assembled from the names of the groups that are used for the calculation (first is ‘From group’) and then after the / is:

  • D: Absolute distance calculation
  • DX/DY: Distance X/Y calculation
  • AX/AY: Alignment X/Y calculation
  • OL: Overlap calculation
  • TFO: Time from overlap calculation
  • TTCX/TTCY: Time to collision X/Y calculation


Visual settings in measure module don't influence the measurement.

Camera mode

Standard means that the view angle can be adjusted to any position manually. It can be rotated with the left mouse button (or middle) and zoomed in and out with the mouse wheel.

1st person view can't be manipulated in any direction, it is like you are behind the steering wheel.

3rd person view can also be set with the mouse (move up and down and zoom). In this case the view will follow the car and also rotate with the car. By default the camera will be at the back of the car following it like in driving simulation games. It's suitable for driving assistance when following virtual routes.

In the object dropdown menu you can select which object you will follow. 

Layers and models

Since the Polygon is working with 3D map widget, the Layers can be added.You can build the Layers from your own images.

 Also here you can import your own models that you have then available in setup of the Polygon.



Polygon can be used to measure lateral  deviations on braking and also braking distance

Objects used for this calculations are Vehicle under test, Start of braking Line and Middle Line. Start of braking Line and Longitudinal Line have both Freeze - Unfreeze position defined with Velocity channel as trigger. This means, that measuring will be done everytime, when vehicles velocity will go under 49.9 km/h and will start moving again, when vehicle will have velocity over 5 km/h. With this feature, you are able to do more consecutive brake tests. Origin is set up to 'Dynamic origin' because we are not interested in anything statical on the track.

Image 21: Polygon setup 


Image 22: View in the measurement mode 



Example II - Lane departure 

In this chapter, you will learn how to create a basic setup to monitor the distance between the lane line and the VUT. Here we will use a Vehicle simulation plugin, layers from Vransko proving ground and Rimac Nevera model, all available for downloading here.

For this task using Polygon, you will learn to perform a simple ‘Line assist warning test’. Origin will be setup with 2 Points that are separated 85,5 m in X direction:

P1 46° 14.579883' N 14° 58.407817' E (0, 0)

P2 46° 14.533803' N 14° 58.410700' E (85.5, 0)

Now the Straight Line should be added that will represent the line on the middle of the track. Because of the width of the line in real life, what is the most convenient way to recreate it in a virtual environment? We have to use a rectangle with defined width (0.15 m) and length (120 m). 

The object with Vehicle geometry should be added and assigned a Navigation channel from Vehicle simulation. In the Vehicle simulation plugin type in coordinates (46° 14.579883' N 14° 58.407817' E Heading - 357 ). Now the Vehicle is on the Vransko proving ground.

Add the proper calculation that will measure the shortest distance between the vehicle and this line.

When you enter measure mode, and you open the Polygon display, you have an option to add layers. 

 

Press edit button and then add a local layer from folder Vransko, which you downloaded on the start of this task.

You have uploaded layers, now also load a model. Dewesoft supports a lot of different model formats (.amf, .glb, .gltf, .obj, .stl, .stp,  etc.) but we suggest .obj or . gltf. On the link you have also downloaded Nevera.obj and Nevera.mtl files. Be sure that both are in the same folder before loading the model in DewesoftX.


When the window opens, click ‘Load new model’ and then the Nevera model should be properly loaded.


 

When a model is Loaded, you can define size and center of the model. You can check ‘Keep original aspect ratio’ or define every dimension by yourself. Here you will define only the Length to 4,75 m and define the Centre of the model as shown on the image below. 

You can now select Nevera as a 3D model in Polygon to drive around the track.

Now in the measurement screen add an Indicator lamp, that will turn red, if the calculated distance is less than 5 cm. Also add additional lamp for the Overlap calculation. 

With this setup, you can now perform Lane assist test and monitor the distance between the VUT and the lane. In real measurement, you can also add camera and/or microphone in combination with positioning data to monitor the functionality of the system.