DW Map XMLs - RoadSegegmentConnection

Hi,

I am creating my own DW Map XML through a custom converter and I am currently struggling with creating some of the fields DW needs to function properly, especially for the lane-changing functionality (which can be tested via the laneplanner example as you know). Through trial-and-error and the example XML file, the only attributes that are missing are proper RoadSegmentConnections I think. The attribute I am not sure how to create is called connectedToLocal and by the documentation it “transform[s] that maps point coordinates from connected segment’s reference frame into the current segment local frame.”.

I understand that it is some kind of transformation matrix, but I can’t find any good solution (or additional documentation) on how to generate it.

Cheers,
Fabian

Dear @fabian.hofmann1,
Could you please clarify the used DRIVE release. The documentation you have pointed seems to be DW 3.0 which is not part of DevZone release.

Sure, it is an older version; driveworks 2.2, but it seems to feature (nearly or exactly) the same attribute requirements for the XML files as the 3.0 documentation.

And before you suggest we ought to switch to the newest version, unfortunately we cannot.

Dear @fabian.hofmann1,
Please see if dwMaps_getConnectedToLocal() helps for your case?

Unfortunately that get function does not do what I need; As described in the 3.5 documentation (same as in the lower versions), it only retrieves the matrix defined by the road segment connection (connectedToLocal attribute). And as the documentation already says, if it can’t find that attribute, then it won’t be able to return that attribute.

What I am asking is how to compute the individual translation matrices for the different road segment connections, so one can set up a complete XML to enable lane change.

Dear @fabian.hofmann1,
You can search for ECEF to ENU transformation. For example, I found this one: Transformations between ECEF and ENU coordinates - Navipedia . Once you calculate this for each road segment origin, then the construct the segment to segment transformation as:

(target_Ecef_to_Enu) x (source_Ecef_to_Enu).inverse()

Dear @SivaRamaKrishnaNV
I am afraid I don’t understand. As explained in the documentation for road segment connections, the transformation matrices are 4x4 matrices. These can not come from the multiplication of the target’s origin point and the transposition of the current origin. I also looked into the Hendershot example from the DW data folder (hendershot.xml (24.0 MB)) and noticed that those matrices are petty much 3D affine transformation matrices.

Therefore I created a minimum working example with road segments all using the same origin; therefore not requiring any transformations - or so I thought (for the example: mwe_lane_change.xml (160.0 KB)): Basically what I did is try to force a lane change by removing a lane connection of a road segment featuring multiple lanes (this method works in hendershot and the tom tom example provided by NvidiaDW in the data folder), so the lane planner (sample code) is forced to compute a lane change to another lane that still is connect to at least one lane of the next road segment and not do simple lane keeping.

This exception was thrown when the creation of a lane plan was attempted (the point changed depending where I set the start and end points I believe):

[02-05-2022 10:04:57] Driveworks exception thrown: DW_NOT_AVAILABLE: Maps: no valid target lane found for last gps point 52.5186 13.3117 0.00000

When using the lane inspection tool to inspect the issue further the following warning was raised as well:

[02-05-2022 09:06:47] MapSanityChecker: Road segment connection translation and global ENU origins disagree! (20/20)