Proper way to run ./maptool_inspection to inspect a map

I have installed DRIVE Software 10 on my Ubuntu 18.04 successfully. I want to explore Driveworks map using maptool_inspection.

If I just execute maptool_inspection in the directory /usr/local/driveworks/tools/maps without any cmdline argument, it works without any issue. The following is what the tool logs on console

w1ks96r10d1:/usr/local/driveworks/tools/maps$ ./maptool_inspection

[30-11-2020 10:53:01] Platform: Detected Generic x86 Platform
[30-11-2020 10:53:01] TimeSource: monotonic epoch time offset is 1606756865703923
[30-11-2020 10:53:01] Platform: number of GPU devices detected 1
[30-11-2020 10:53:01] Platform: currently selected GPU device discrete ID 0
[30-11-2020 10:53:01] SDK: Resources mounted from …/…/data/
[30-11-2020 10:53:01] TimeSource: monotonic epoch time offset is 1606756865703923
[30-11-2020 10:53:01] Initialize DriveWorks SDK v2.2.3136
[30-11-2020 10:53:01] Release build with GNU 7.4.0 from heads/buildbrain-branch-0-gca7b4b26e65
[30-11-2020 10:53:01] Initialize DriveWorks VisualizationSDK v2.2.3136
[30-11-2020 10:53:01] Initialize DriveWorksGL SDK v2.2.3136
[30-11-2020 10:53:01] GL-SDK: initialize OpenGL
[30-11-2020 10:53:01] Maps: Reading map data from “…/…/data/hdmaps/map_tomtom_280_92_101_85.xml” …[30-11-2020 10:53:02] reading done.
[30-11-2020 10:53:02] MapSanityChecker: Checking sanity of all road segments…
[30-11-2020 10:53:02] MapSanityChecker: Lane with 0 connections detected! (42/13995)
[30-11-2020 10:53:02] MapSanityChecker: Lane points to null left lane divider group! (58/13995)
[30-11-2020 10:53:02] MapSanityChecker: Lane points to null right lane divider group! (58/13995)
[30-11-2020 10:53:02] MapSanityChecker: Road segment connection and inverse transform residual exceeds tolerance! (6/7530)
[30-11-2020 10:53:02] MapSanityChecker: Road segment with 0 connections detected! (1/3741)
[30-11-2020 10:53:02] MapSanityChecker: Road segment has less than two lane divider groups! (46/3741)
[30-11-2020 10:53:02] MapSanityChecker: Sanity check complete.
[30-11-2020 10:53:02] Maps::findClosestLane: No road segments found around -122.18913541, 37.44758199 with maximum search radius of 1000.0000000 m.
[30-11-2020 10:53:02] Building Local layout failed

However, if I specify the xml file using the --map cmdline option, it fails with the following error:

w1ks96r10d1:/usr/local/driveworks/tools/maps$ ./maptool_inspection --map …/…/data/hdmaps/map_tomtom_280_92_101_85.xml

[30-11-2020 10:55:06] Platform: Detected Generic x86 Platform
[30-11-2020 10:55:06] TimeSource: monotonic epoch time offset is 1606756865703923
[30-11-2020 10:55:06] Platform: number of GPU devices detected 1
[30-11-2020 10:55:06] Platform: currently selected GPU device discrete ID 0
[30-11-2020 10:55:06] SDK: Resources mounted from …/…/data/
[30-11-2020 10:55:06] TimeSource: monotonic epoch time offset is 1606756865703923
[30-11-2020 10:55:06] Initialize DriveWorks SDK v2.2.3136
[30-11-2020 10:55:06] Release build with GNU 7.4.0 from heads/buildbrain-branch-0-gca7b4b26e65
[30-11-2020 10:55:06] Initialize DriveWorks VisualizationSDK v2.2.3136
[30-11-2020 10:55:06] Initialize DriveWorksGL SDK v2.2.3136
[30-11-2020 10:55:06] GL-SDK: initialize OpenGL
Could not open maps file at “map”. Run the sample from the “bin” directory.
[30-11-2020 10:55:06] Driveworks exception thrown: DW_INVALID_HANDLE: Cannot cast to C handle, given instance is a nullptr, type=P11dwMapObject

terminate called after throwing an instance of ‘std::runtime_error’
what(): [2020-11-30 10:55:06] DW Error DW_INVALID_HANDLE executing DW function:
dwMaps_getBounds(&bounds, m_map)
at /dvs/git/dirty/gitlab-master_av/dw/sdk/tools/maps/maptool_inspection_common/MapInspectionCommon.cpp:158
Aborted (core dumped)

The same happens even if I pass the full path to the xml file.

What is the correct way to specify the map file? I need the --map cmdline argument because eventually I want to use it to inspect a different map.

Thanks

Hi @yuzhang,

Please try with below command. Thanks!

$ ./maptool_inspection --map ../../data/hdmaps/map_tomtom_280_92_101_85.xml

Hi @VickNV,

As I mentioned in my original post, that does not work. I’m pasting the error output again below:

w1ks96r10d1:~/projects/deepmap-core$ /usr/local/driveworks/tools/maps/maptool_inspection --map …/…/data/hdmaps/map_tomtom_280_92_101_85.xml

[30-11-2020 13:43:53] Platform: Detected Generic x86 Platform
[30-11-2020 13:43:53] TimeSource: monotonic epoch time offset is 1606756865703923
[30-11-2020 13:43:53] Platform: number of GPU devices detected 1
[30-11-2020 13:43:53] Platform: currently selected GPU device discrete ID 0
[30-11-2020 13:43:53] SDK: Resource failed to mount from ‘…/…/data/’: VirtualFileSystem: Failed to mount ‘…/…/data/[.pak]’
[30-11-2020 13:43:53] SDK: Resources mounted from /usr/local/driveworks-2.2/data/
[30-11-2020 13:43:53] TimeSource: monotonic epoch time offset is 1606756865703923
[30-11-2020 13:43:53] Initialize DriveWorks SDK v2.2.3136
[30-11-2020 13:43:53] Release build with GNU 7.4.0 from heads/buildbrain-branch-0-gca7b4b26e65
[30-11-2020 13:43:53] Initialize DriveWorks VisualizationSDK v2.2.3136
[30-11-2020 13:43:53] Initialize DriveWorksGL SDK v2.2.3136
[30-11-2020 13:43:53] GL-SDK: initialize OpenGL
Could not open maps file at “map”. Run the sample from the “bin” directory.
[30-11-2020 13:43:53] Driveworks exception thrown: DW_INVALID_HANDLE: Cannot cast to C handle, given instance is a nullptr, type=P11dwMapObject

terminate called after throwing an instance of ‘std::runtime_error’
what(): [2020-11-30 13:43:53] DW Error DW_INVALID_HANDLE executing DW function:
dwMaps_getBounds(&bounds, m_map)
at /dvs/git/dirty/gitlab-master_av/dw/sdk/tools/maps/maptool_inspection_common/MapInspectionCommon.cpp:158
Aborted (core dumped)

It seems the forum shows three dots unintentionally.
I just updated the path with two dots as below.

$ ./maptool_inspection --map ../../data/hdmaps/map_tomtom_280_92_101_85.xml

Please check again if the command is what you tried.

@VickNV yes, I used two dots and it failed.

It works on my side. Please check my command and output messages below. Thanks!

<USER@HOST>:/usr/local/driveworks/tools/maps$ ./maptool_inspection ../../data/hdmaps/map_tomtom_280_92_101_85.xml
[01-12-2020 14:25:57] Platform: Detected Generic x86 Platform
[01-12-2020 14:25:57] TimeSource: monotonic epoch time offset is 1606833281134382
[01-12-2020 14:25:57] Platform: number of GPU devices detected 1
[01-12-2020 14:25:57] Platform: currently selected GPU device discrete ID 0
[01-12-2020 14:25:57] SDK: Resources mounted from ../../data/
[01-12-2020 14:25:57] TimeSource: monotonic epoch time offset is 1606833281134382
[01-12-2020 14:25:57] Initialize DriveWorks SDK v2.2.3136
[01-12-2020 14:25:57] Release build with GNU 7.4.0 from heads/buildbrain-branch-0-gca7b4b26e65
[01-12-2020 14:25:57] Initialize DriveWorks VisualizationSDK v2.2.3136
[01-12-2020 14:25:57] Initialize DriveWorksGL SDK v2.2.3136
[01-12-2020 14:25:57] GL-SDK: initialize OpenGL
[01-12-2020 14:25:57] Maps: Reading map data from "../../data/hdmaps/map_tomtom_280_92_101_85.xml" ...[01-12-2020 14:25:58]  reading done.
[01-12-2020 14:25:58] MapSanityChecker: Checking sanity of all road segments...
[01-12-2020 14:25:58] MapSanityChecker: Lane with 0 connections detected! (42/13995)
[01-12-2020 14:25:58] MapSanityChecker: Lane points to null left lane divider group! (58/13995)
[01-12-2020 14:25:58] MapSanityChecker: Lane points to null right lane divider group! (58/13995)
[01-12-2020 14:25:58] MapSanityChecker: Road segment connection and inverse transform residual exceeds tolerance! (6/7530)
[01-12-2020 14:25:58] MapSanityChecker: Road segment with 0 connections detected! (1/3741)
[01-12-2020 14:25:58] MapSanityChecker: Road segment has less than two lane divider groups! (46/3741)
[01-12-2020 14:25:58] MapSanityChecker: Sanity check complete.
[01-12-2020 14:25:58] Maps::findClosestLane: No road segments found around -122.18913541, 37.44758199 with maximum search radius of 1000.0000000 m.
[01-12-2020 14:25:58] Building Local layout failed
 Timing results:
Thread main:
-onRender                 CPU:   343us, std=3116       | GPU:   286us, std=3120       | samples=332

[01-12-2020 14:26:04] Driveworks VisualizationSDK released
[01-12-2020 14:26:04] Releasing Driveworks SDK Context
[01-12-2020 14:26:04] DriveworksGL SDK released

@VickNV It worked because you didn’t use --map cmdline argument and in this case the executable simply uses the default value, which is …/…/data/hdmaps/map_tomtom_280_92_101_85.xml.

To verify the tool really honors the cmdline argument, you can rename this file to ‘foo.xml’ and run maptool_inspection again. You will notice that the tool will crash because it couldn’t find …/…/data/hdmaps/map_tomtom_280_92_101_85.xml.

Sorry. should be as below.

<USER@HOST>:/usr/local/driveworks/tools/maps$ ./maptool_inspection --map=../../data/hdmaps/test-map.xml
[01-12-2020 14:50:19] Platform: Detected Generic x86 Platform
[01-12-2020 14:50:19] TimeSource: monotonic epoch time offset is 1606833281134382
[01-12-2020 14:50:19] Platform: number of GPU devices detected 1
[01-12-2020 14:50:19] Platform: currently selected GPU device discrete ID 0
[01-12-2020 14:50:19] SDK: Resources mounted from ../../data/
[01-12-2020 14:50:19] TimeSource: monotonic epoch time offset is 1606833281134382
[01-12-2020 14:50:19] Initialize DriveWorks SDK v2.2.3136
[01-12-2020 14:50:19] Release build with GNU 7.4.0 from heads/buildbrain-branch-0-gca7b4b26e65
[01-12-2020 14:50:19] Initialize DriveWorks VisualizationSDK v2.2.3136
[01-12-2020 14:50:19] Initialize DriveWorksGL SDK v2.2.3136
[01-12-2020 14:50:19] GL-SDK: initialize OpenGL
[01-12-2020 14:50:19] Maps: Reading map data from "../../data/hdmaps/test-map.xml" ...Segmentation fault (core dumped)
vyu@vyu-dt:/usr/local/driveworks/tools/maps$ ./maptool_inspection --map=../../data/hdmaps/map_tomtom_280_92_101_85.xml
[01-12-2020 14:50:29] Platform: Detected Generic x86 Platform
[01-12-2020 14:50:29] TimeSource: monotonic epoch time offset is 1606833281134382
[01-12-2020 14:50:29] Platform: number of GPU devices detected 1
[01-12-2020 14:50:29] Platform: currently selected GPU device discrete ID 0
[01-12-2020 14:50:29] SDK: Resources mounted from ../../data/
[01-12-2020 14:50:29] TimeSource: monotonic epoch time offset is 1606833281134382
[01-12-2020 14:50:29] Initialize DriveWorks SDK v2.2.3136
[01-12-2020 14:50:29] Release build with GNU 7.4.0 from heads/buildbrain-branch-0-gca7b4b26e65
[01-12-2020 14:50:29] Initialize DriveWorks VisualizationSDK v2.2.3136
[01-12-2020 14:50:29] Initialize DriveWorksGL SDK v2.2.3136
[01-12-2020 14:50:29] GL-SDK: initialize OpenGL
[01-12-2020 14:50:29] Maps: Reading map data from "../../data/hdmaps/map_tomtom_280_92_101_85.xml" ...[01-12-2020 14:50:30]  reading done.
[01-12-2020 14:50:30] MapSanityChecker: Checking sanity of all road segments...
[01-12-2020 14:50:30] MapSanityChecker: Lane with 0 connections detected! (42/13995)
[01-12-2020 14:50:30] MapSanityChecker: Lane points to null left lane divider group! (58/13995)
[01-12-2020 14:50:30] MapSanityChecker: Lane points to null right lane divider group! (58/13995)
[01-12-2020 14:50:30] MapSanityChecker: Road segment connection and inverse transform residual exceeds tolerance! (6/7530)
[01-12-2020 14:50:30] MapSanityChecker: Road segment with 0 connections detected! (1/3741)
[01-12-2020 14:50:30] MapSanityChecker: Road segment has less than two lane divider groups! (46/3741)
[01-12-2020 14:50:30] MapSanityChecker: Sanity check complete.
[01-12-2020 14:50:30] Maps::findClosestLane: No road segments found around -122.18913541, 37.44758199 with maximum search radius of 1000.0000000 m.
[01-12-2020 14:50:30] Building Local layout failed
1 Like

@VickNV That works! Thanks for the help.

1 Like