-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import HDmap into simulator #199
Comments
Create 3D modelI found some ways to create a new map from the OSM data format:
Create HD mapWhen you import the city 3d models into unity, you can use the HDMap Tool to make and export the HDMap to apollo or autoware. QuestionsIf you want to import hdmap directly, you must create a function that automatically generates roads and buildings. I think it might be possible to import OSM data first. And make an adpter to change hdmap to osm map. Then the map of the game is the same as the real map. You don't need to create a HD map twice. |
I think there are different uses cases for map import that can require very different implementations. One use case is when user wants to import HD map for testing their path planning or routing. They do not necessary care about buildings or great visuals as long as basic road network is created so that NPC vehicles can use it. I would say this is a good way to start import - just create hdmap annotations and put everything on a plane (so car can drive). For a lot of use case this can be enough. Next step - to add buildings actual road surface, with or without textures could be done later. Getting actual data is tricky part. One option is to generate them procedurally. This could give you very nice visuals, but requires more work. Another would be to use real world data. But that sometimes is not enough if it has low precision or low quality. Running perception can require high quality/precision data that something like OSM might not have. |
Good advice! The simulation is used to test autonomous driving, and we need to be as real as possible, not completely real. In fact, we need more scenarios. A completely real world does require a lot of simulation work. We need accurate location information, buildings, plants, textures, etc.
This is really what we want, apollo provides "sim_control", which is a simple simulation test planning module. But it can't detect collisions, and NPC is not smart. It is much easier to achieve this in Unity.
Currently, I think the better way is to use OSM data to generate buildings, although the accuracy may not be enough. Otherwise, it is difficult to have other good data. Where do we get real data? |
Yes, Python API can get and set any npc location and speed. There is no easy way to get real data with good quality. We are internally currently working on pipeline to generate map from collected point cloud & camera. But that won't have good accuracy for buildings. But it will have good quality road - accurate geometry and color information. |
Good, I will try to do it. |
Not during runtime. |
Additional, How does the NPC know the lane and the direction? They just move by program or they have AI and know the lane, the direction and the traffic light? Basically, we have map annotations for each scene, and this map annotations have these information: lane, direction, traffic light, traffic sign, and etc. NPCs know the lane and the direction using the map annotations and drive around following the traffic rules we have. By AI, if you are asking if NPCs are detecting lanes or traffic lights using its own sensors, they are not for performance reasons. Only ego vehicles have sensors like a camera or LiDAR and can be controlled by AD stack. |
@martins-mozeiko
|
NPC's does not have advanced AI - they just follow annotated lanes, stop at traffic lights (which are annotated, so they know exact position & state of light). Then they randomly decide to turn or drive straight. NPCs do not use any sensors like EGO vehicle does. Did you take street_one_way4lane material from SanFrancisco scene? This material is very hardcoded to roads in SF scene. If you want to create new different roads, then you will need to use texture manipulation and 3d editor software (Photoshop and Maya or similar) to adjust mesh and texture so it looks good. Unity cannot do this for you. |
I render based on the lane instead of the road. And it seems to work, I will upload a branch to see the effect |
@martins-mozeiko I have already submit a pull request. Could you pls make a review #243 |
I want to import hd map into lg simulator, maybe the openstreet format first. And then I will try apollo hd map format.
It's useful for end to end test in self-driving. If you first create a map in the simulator and then export it as a hd map format. Actually the maps we use in apollo or autoware are labeled with other systems and they cannot be unified. So we need to import the label map into simulator without any 3d geometry structure. We will automatically generate it. Then you can adjust the house and street map in the simulator.
By the way, when did you release the version?
#101
The text was updated successfully, but these errors were encountered: