autocore-ai / maptoolbox Goto Github PK
View Code? Open in Web Editor NEWPlugins to make Autoware vector maps in Unity
License: GNU Lesser General Public License v3.0
Plugins to make Autoware vector maps in Unity
License: GNU Lesser General Public License v3.0
How to make a pcd map, I found that autoware provides a map service, it seems to be charging now. link
@moelang How to get LW and RW values in dtlane.csv ?
Thank you so much for sharing this awesome maptool!
All functions work correctly and awesome here except for adding 'StopLine'.
There is an error during exporting vectormap when 'StopLine' element added. It says 'Object reference not set to an instance of an object', is there any step I missed? (cause there is no example of adding 'StopLine' in the demo video.
I'll appreciate it if you can give me any hints to solve it, thank you in advance.
Best,
Guangwei
The error info is the following
NullReferenceException: Object reference not set to an instance of an object
Packages.AutowareUnityTools.VectorMapTools.Export.VectorMapExtern.GetCsvData (Packages.AutowareUnityTools.VectorMapTools.StopLine stopLine, PointOctree`1[T] finalLanes, System.Collections.Generic.List`1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvPoint]& csvPoints, System.Collections.Generic.List`1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvLine]& csvLines, System.Collections.Generic.List`1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvVector]& csvVectors, System.Collections.Generic.List`1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvSignalLight]& csvSignalLights, System.Collections.Generic.List`1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvStopLine]& csvStopLines) (at Library/PackageCache/com.autocore.map-toolbox@014173a8ec8f680781f0c764ba639bf583d5ab8b/VectorMapTools/Export/VectorMapExtern.cs:91)
Packages.AutowareUnityTools.VectorMapTools.Export.VectorMapExporter.ExportMaps (System.String folder) (at Library/PackageCache/com.autocore.map-toolbox@014173a8ec8f680781f0c764ba639bf583d5ab8b/VectorMapTools/Export/VectorMapExporter.cs:58)
Packages.AutowareUnityTools.VectorMapTools.Editor.EditorMenuExterns.ExportVectorMap () (at Library/PackageCache/com.autocore.map-toolbox@014173a8ec8f680781f0c764ba639bf583d5ab8b/VectorMapTools/Editor/EditorMenuExterns.cs:79)
Thank you for the free code for us!
I have add autoware toolkit packages into unity following the video.But when i add pcd files which is created by autoware 1.11 into an unity3d project ,i meet an error.
**
Binary format pcd supported only currently !
UnityEngine.Debug:LogError(Object)
Packages.MapToolbox.PcdTools.PcdReader:.ctor(String) (at Library/PackageCache/com.autocore.map-toolbox@b24654f78edb9b8f3fa0a230e175b1bbb695e4a2/PcdTools/PcdReader.cs:108)
Packages.MapToolbox.PcdTools.Editor.PcdImporter:OnImportAsset(AssetImportContext) (at Library/PackageCache/com.autocore.map-toolbox@b24654f78edb9b8f3fa0a230e175b1bbb695e4a2/PcdTools/Editor/PcdImporter.cs:31)
UnityEditor.AssetDatabase:Refresh()
Packages.MapToolbox.PcdTools.Editor.EditorMenuExterns:LoadPcdFolder() (at Library/PackageCache/com.autocore.map-toolbox@b24654f78edb9b8f3fa0a230e175b1bbb695e4a2/PcdTools/Editor/EditorMenuExterns.cs:43)
**
Could you please help me to solve the problem?
System.DllNotFoundException: unity_debug
at (wrapper managed-to-native) AutoCore.MapToolbox.PCL.NativePluginDebug.SetFunctionDebugLog(intptr)
at AutoCore.MapToolbox.PCL.NativePluginDebug.RegisterDebugFunctions () [0x00028] in D:\demo2\Library\PackageCache\com.autocore.map-toolbox@e50e478\Runtime\PCL\NativePluginDebug.cs:45
at AutoCore.MapToolbox.Editor.PCL.NativePluginEditorDebug..cctor () [0x00000] in D:\demo2\Library\PackageCache\com.autocore.map-toolbox@e50e478\Editor\PCL\NativePluginEditorDebug.cs:28
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])
*Updated with the following zip file containing the scene .unity as well as the output vectormap.
vect_unity_test.zip
Hello,
I have used this plugin on Unity and it worked for most of time time. However I cannot understand why these maps attached which are just lane data and differ from each other only slightly, won't work with op_global planner in autoware. map folder 19 and 23 work but not the rest. They only differ slightly from each other.
drive-download-20190727T233322Z-001.zip
Terminal Error
process[op_global_planner-1]: started with pid [6166]
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
['roslaunch', 'op_global_planner', 'op_global_planner.launch', 'enableLaneChange:=False', 'enableReplan:=True', 'enableSmoothing:=True', 'enableRvizInput:=True', 'pathDensity:=1', 'velocitySource:=1']
pid=6539
sched policy=OTHER prio=0
Received Lanes704
Received Points1089
Received dtLanes739
Received Lines342
Received Nodes739
Map Version 2
Extracting Lanes ...
Fix Waypoints errors ...
Create Missing lane connections ...
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
[op_global_planner-1] process has died [pid 6558, exit code -6, cmd /home/ocp/autoware/ros/install/op_global_planner/lib/op_global_planner/op_global_planner __name:=op_global_planner __log:=/home/ocp/.ros/log/76e8791a-afcc-11e9-b129-a4fc771a0d0d/op_global_planner-1.log].
log file: /home/ocp/.ros/log/76e8791a-afcc-11e9-b129-a4fc771a0d0d/op_global_planner-1*.log
... logging to /home/ocp/.ros/log/76e8791a-afcc-11e9-b129-a4fc771a0d0d/roslaunch-ocp-6539.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Thanks in advance for looking into it!
Hello,
Will there be any support to import waypoints to MapToolbox for better vector map drawings?
Have a great day.
can‘t load PCD file.it throw error like
load failed with return -1 UnityEngine.Debug:LogError(Object) AutoCore.MapToolbox.PCL.PointCloudReader:LoadPointCloudFile(String) (at E:/MapToolbox-0.1.1-preview.6/Runtime/PCL/PointCloudReader.cs:238) AutoCore.MapToolbox.PCL.PointCloudReader:.ctor(String) (at E:/MapToolbox-0.1.1-preview.6/Runtime/PCL/PointCloudReader.cs:243) AutoCore.MapToolbox.Editor.PCL.PointCloudImporter:OnImportAsset(AssetImportContext) (at E:/MapToolbox-0.1.1-preview.6/Editor/PCL/PointCloudImporter.cs:33) UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData(AssetImportContext)
and my pcd file format like:
FIELDS x y z intensity SIZE 4 4 4 4 TYPE F F F F COUNT 1 1 1 1 WIDTH 1650105 HEIGHT 1
Hi,
Thanks for this awesome tool.
I am using the MapToolbox v0.1.0 with Unity 2019.4.14 on my Windows machine. I am able to insert an AutowareADASMap asset into my project hierarchy, and successfully add lanes, stoplines etc. Each of these assets adds ADASGoSlicesXX object for each lane/stopline instance.
But when I add a new Signal asset, there is a 'NewGameObject' added as a child to ADASMapSignal, and an ADASMapPole. I see a TL cone added at map origin, but I cannot move (neither rotate) this object by dragging. This makes it near impossible to precisely assign this asset to actual TLs in .pcd map.
Can you please help me with this or point me to a tutorial where you demonstrate adding a Traffic Light.
Thanks
Hi MoeLang,
which frame does this tool use?
autoware vectormap Bx Ly means northing and easting. So i want to know which frame does points map use?
the point should have the lat and lon information,why the generated point.csv have no such information in B,L,H
Hi,
I wonder how can we create a loop with lanes?
I am trying to stitch last lane and first lane of the GoSlicesLane
But it won't snap.
Generally I want to know how can I connect two lanes(merge) into one lane? I know other issues related to this one but you can clearly see that I need to be able to snap them.
I tried to add another lane between last lane and first lane but no luck.
Is there any documentation/tutorial for new version?
Have a greay day.
Hi! When I try to upload a PCD file, I get the following error
# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z intensity
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 1
WIDTH 10000
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 10000
DATA binary
I've read all the current issues, but couldn't find an answer to the solution of this error. Could you please help me to solve the problem?
Is there any way to annotate crosswalk and traffic signs on PCD map with the tool currently?
When I configured the Maptools plugin, I found that no matter which version of Unity. I cannot generate a lane model for my project. When I click the button 'Add Lane', nothing happen.... Actually, I think the version on the youtube is greater. It's still open-source?
Hi,
When I import my PCD files into the Unity, I find the xyz coordination of the pcd not matched to my original data( the y axis changes to z axis) have you met some problems like this? Besides , do you have some demos about converting the exported .csv data into opendrive data?
thanks very much!
Hello,
Thank you for this amazing tool.
Before this big release we were able to use MapToolBox perfectly for our planning needs.
But we are experiencing some issues about generating a global path when we use MapToolBox.
You can see the proof of concept gif:
Here I will give respective lane.csv
:
What do you think is the issue here?
hi
when I finishing labeling the map with toolbox, how can i export the corresponding csv files ?
thank you
Hello,
I receive this error while adding Map Toolbox:
Library\PackageCache\[email protected]\Editor\BurstAotCompiler.cs(633,32): error CS7036: There is no argument given that corresponds to the required formal parameter 'exceptionType' of 'BuildReport.AddMessage(LogType, string, string)'
Edit: The creating of the Vector Maps is working anyway. But if i try to import it to Autoware, it shows the Error message
terminate called after throwing an instance of 'std::invalid_argument' what(): stoi
Thank you for your help
Hi @moelang ,
I used MapToolbox successfully to annotate vector map and get that used in vector map loader
But to use in planner obejects like whitline, roadedge, stopline and other should have linkID filled
LinkID : IDs linking with Lane ID
And in the data which I got saved from this plugin using unity is not able to have linkIDs in vector map
csv files
Ex:
whitline.csv from unity maptoolbox
ID | LID | Width | Color | type | LinkID |
---|---|---|---|---|---|
1 | 1 | 0.2 | W | 0 | 0 |
2 | 2 | 0.2 | W | 0 | 0 |
3 | 3 | 0.2 | W | 0 | 0 |
4 | 4 | 0.2 | W | 0 | 0 |
whiteline.csv from autoware
ID | LID | Width | Color | type | LinkID |
---|---|---|---|---|---|
1 | 1 | 0.15 | W | 0 | 11327 |
2 | 2 | 0.15 | W | 0 | 2673 |
3 | 3 | 0.15 | W | 0 | 2671 |
4 | 4 | 0.15 | W | 0 | 2668 |
Please let me know if am missing anything or
this is the actual output that maptoolbox currently
gives. And I want linkIDs indeed. Help to get this
Thanks in advance
Hi, Moe
Thanks for your work.
As mentioned on YouTube, 0.2 version is under cooking, I would like to ask that wayarea type is in coming support list?
Thanks.
Regards,
Benjamin
The lanelet that I create don't adjust every node.
And in your example,except press Ctrl +left mouse,what other key do I neeed to press?
When I configured the Maptools plugin, I found the following problems,
When adding a white line according to pcd, but changing the angle of view, it is found that the added white line and the original point of pcd are not at the same height;
How to add a curved line or lane? The current plugin seems to only add straight lines
How can I solve it? Thank you very much
Hi,
I actually got to work with the tools you guys developed. It turned out to be very helpful. I can create nodes and lane for straight road but I am not sure how to create it for 4 ways. I tried many ways but I could not get op_planner in autoware to work with the vector map I created at 3 or 4 ways cross sections.
i.e. can a lane that ends at a 4 way cross section, be connected by 3 more lanes? going straight, left and right? otherwise without having to allocate another lane for each way, what are the possible way to hand this situation?
Thanks!
hi,
So i followed the video. added the dependencies and everything.
Selected the PCD folder but after that, i am unable to add file to a sample scene. I tried dragging the files but they are never shown in the scene window.
Its hard to tell from video, which shortcut is being used.
Kindly if you could guide me.
thanks
Hi,
I create a very simple vector map which include only one long lane and two white lines. And then I use it as the input of op_global_planner, the open global planner failed to generate the path from the start to the goal. The log show the following:
the path size (1)...
invalid path, car should stop.
Must the map contain multiple lanes ? and can you share your experience about creating adas map for open planner ? It will be very grateful to your any reply.
regards,
shawnee
I can't load pcd,which format like this:
# .PCD v0.7 - Point Cloud Data file format VERSION 0.7 FIELDS x y z intensity SIZE 4 4 4 4 TYPE F F F F COUNT 1 1 1 1 WIDTH 603452 HEIGHT 1 VIEWPOINT 0 0 0 1 0 0 0 POINTS 603452 DATA ascii 26.502167 97.391144 -1.8180114 22 25.723701 97.498932 -1.8092144 22 25.876507 97.411179 -1.8140769 22 26.125629 97.473999 -1.815798 22
Thanks for your intronduction,but I could not find the UnityOctree, I would be very appreciate it if you can update it.
I'm trying to install Unity on variety environments.
Which module of Unity it need should be installed?
There are six options when I install Unity.
why I can not build curve just like the video show?
video: https://www.youtube.com/watch?v=WTRHPs8pN04
package branch:master
unity version: 2019.4.8f1
Hello,
I want to create something like this:
But unfortunately open planner gives me no centerlines. I want to know what is the right way to construct this kind of intersections between lanes.
Also, can we create bidirectional lanes in Autocore? Because if I draw two lanes with different directions close to each other, planning is not successfull.
Have a great day.
Hi,
I was using Vector Map builder from tierIV.
But when I found that this can be done using Unity, I came to use this
and tried with Unity 2019.3.4 and MapToolbox https://github.com/autocore-ai/MapToolbox/releases/tag/0.0.10-preview.3 Version. I was able to annotate vector map but when i tried yesterday.
below error is getting
System.DllNotFoundException: unity_debug at (wrapper managed-to-native) AutoCore.MapToolbox.PCL.NativePluginDebug.SetFunctionDebugLog(intptr) at AutoCore.MapToolbox.PCL.NativePluginDebug.RegisterDebugFunctions () [0x00028] in /home/yogeshkumargn/Desktop/Vector/test_2/Library/PackageCache/com.autocore.map-toolbox@6e688d3b43/Runtime/PCL/NativePluginDebug.cs:45 at AutoCore.MapToolbox.Editor.PCL.NativePluginEditorDebug..cctor () [0x00000] in /home/yogeshkumargn/Desktop/Vector/test_2/Library/PackageCache/com.autocore.map-toolbox@6e688d3b43/Editor/PCL/NativePluginEditorDebug.cs:28 UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[]) (at /home/builduser/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:118)
First time when I tried the instruction to use is to add below lines in package.json
"com.autocore.map-toolbox": "https://github.com/autocore-ai/MapToolbox.git",
"com.nition.unity-octree": "https://github.com/autocore-ai/UnityOctree.git#upm",
Now the instruction to use is to add below git link in Window -> Package Manager -> heavy_plus_sign -> Add package from git URL...
https://github.com/autocore-ai/MapToolbox.git.
Please Let me Know if I am missing anything.
Thanks for kind reply
MissingReferenceException: The object of type 'LineRenderer' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Packages.AutowareUnityTools.VectorMapTools.Export.VectorMapExtern.GetCsvData (Packages.AutowareUnityTools.VectorMapTools.WhiteLine whiteLine, System.Collections.Generic.List1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvPoint]& csvPoints, System.Collections.Generic.List
1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvLine]& csvLines, System.Collections.Generic.List`1[Packages.AutowareUnityTools.VectorMapTools.Export.CsvWhiteLine]& csvWhiteLines) (at Library/PackageCache/com.autocore.map-toolbox@014173a8ec8f680781f0c764ba639bf583d5ab8b/VectorMapTools/Export/VectorMapExtern.cs:121)
Packages.AutowareUnityTools.VectorMapTools.Export.VectorMapExporter.ExportMaps (System.String folder) (at Library/PackageCache/com.autocore.map-toolbox@014173a8ec8f680781f0c764ba639bf583d5ab8b/VectorMapTools/Export/VectorMapExporter.cs:72)
Packages.AutowareUnityTools.VectorMapTools.Editor.EditorMenuExterns.ExportVectorMap () (at Library/PackageCache/com.autocore.map-toolbox@014173a8ec8f680781f0c764ba639bf583d5ab8b/VectorMapTools/Editor/EditorMenuExterns.cs:79)
Hello,
I first want to thank you for making this amazing tool available for free. :)
As mentioned, this format is supported 'x y z intensity' but I am not able to view the pcd file imported in unity.
When I import it in unity 2019.1 using Autoware Toolkit, the points and heights pf the imported pcd are all 0 and indeed nothing is show once I drag it to Hierarchy tab.
Here is the few first lines of the .pcd file
<>
"# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z intensity
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 1
WIDTH 83602
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 83602
DATA ascii
-118.03508 44.482094 -10.662604 100
-105.99339 45.155231 -10.440625 100
-208.71854 20.064911 -8.6673651 63
-109.67179 33.598198 -8.476162 21
-109.80906 33.615269 -8.4882936 21
-108.90988 33.954304 -6.9077754 53
-108.77178 33.96843 -6.8992209 17
0.72196484 82.771698 -6.8347192 14
-7.0545511 83.846542 -6.6522837 7
-6.8178158 84.107193 -6.759553 8
-3.307972 85.844109 -6.8757992 7
-3.7196136 88.503029 -6.9328365 8.5
0.14721179 88.590927 -6.7222276 9"
<>
Thanks in advance for the time!
@moelang Old version used to have a collider child object under the imported pcd file's hierarchy view but for the moment it is not present.
.pcd in project view: (only points as child)
.pcd in hierarchy view: (no children)
The vector map won't snap into the ground and will always have y = 0, this causes problems when you use tilted maps.
Hello there. Trying out lanelet2 version of this Plugin. It worked great until I started making more complex routes which include making an intersection, or merging two lanes into one, or branching one lanelet into two lanelets.
So, how do you do that? Am I missing something?
Thank you so much for sharing this amazing tool.
When I draw the lane in this tool, I found that the number fo BLID and FLID in lan.csv have a misstake. The lane1 can't connet to the lane2, for the reason that the FNID number is setted to 0 and the BLID is setted to 0. You can see the misstake in the picture. I think the right situation is that FLID is 13 and the BLID is 12.
Thank you in advance.
Vect_map.zip
I just want to use this tool in Uity, and I modified the manifest.json file by adding:
"com.autocore.map-toolbox": "https://github.com/autocore-ai/MapToolbox.git",
"com.nition.unity-octree": "https://github.com/autocore-ai/UnityOctree.git#upm",
but roor occurred in resolving package :
[Package Manager Window] Unable to add package [https://github.com/autocore-ai/MapToolbox.git]:
Dependency [email protected] has invalid dependencies or related test packages:
com.unity.collections (dependency): Request [POST https://api.unity.com/v1/oauth2/token] failed. One or more invalid parameters was given.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[Package Manager Window] Cannot perform upm operation: Unable to add package [https://github.com/autocore-ai/MapToolbox.git]:
Dependency [email protected] has invalid dependencies or related test packages:
com.unity.collections (dependency): Request [POST https://api.unity.com/v1/oauth2/token] failed. One or more invalid parameters was given. [NotFound].
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
An error occurred while resolving packages:
Package [email protected] has invalid dependencies or related test packages:
com.unity.collections (dependency): Request [POST https://api.unity.com/v1/oauth2/token] failed. One or more invalid parameters was given.
One or more packages could not be added to the local file system:
com.unity.jobs: Request [POST https://api.unity.com/v1/oauth2/token] failed. One or more invalid parameters was given.
A re-import of the project may be required to fix the issue or a manual modification of F:/Users/gxf/Desktop/New Unity Project/Packages/manifest.json file.
Library\PackageCache\com.autocore.map-toolbox@e50e478\Runtime\PCL\MinMax.cs(102,37): error CS0246: The type or namespace name 'IJobParallelForBatch' could not be found (are you missing a using directive or an assembly reference?)
Does anybody have a clue? My unity is 2020.2.0a18.2359 Personal. Thanks.
Hello, @moelang .
I'm glad to find good util to edit maps and paths for Autoware.
I think that this tool increase productivity.
There was a meeting to discuss which map format is better or suitable to Autoware.
https://discourse.ros.org/t/autoware-maps-and-map-formats-working-group-meeting-minutes-24-july-2019/10059
The main point at the pose is that they are considering to use Lanelet2 format in the near future.
What is next plan for this tool? Do you have a roadmap about map format?
While I appreciate what you guys are trying to build with this tool (and it's a really good idea), it is not very useful without being able to load an existing CSV/Aisan-format map. Is this feature coming soon?
Dear Sir,
I have a PCD file in FIELDS x y z intensity binary format as attached.
road_pcd.zip
This pcd file can be used by open planner. But when I load this PCD file in unity, I got the error as below:
Mesh 'points': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting.
Mesh bounds min=(-inf, -inf, -inf), max=(inf, inf, inf). Please make sure the mesh is exported without any errors.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
But I don't know if my file has any wrong format for this plugging tool, could you help me to check? Thanks
when I tried to put one pole and several signal lamps on the road.
I found following questions:
Hi MoeLang,
Many thanks for your tool to create vector map.
And I would like to know is there any documentation on vector map format? We want to convert vector map into opendrive format in our project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.