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
[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:
[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.
[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)
@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.