Skip to content
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

CARLA map import experience #23

Open
ishaan95 opened this issue Feb 19, 2023 · 6 comments
Open

CARLA map import experience #23

ishaan95 opened this issue Feb 19, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@ishaan95
Copy link

Hello,

Since several issues refer to this task (#21, #14, #4), I thought writing about my experience here would be useful. I ran both tools on Windows. Here was the process:

  • From the current latest version of this tool (0.17.2), I created a 4 way junction. I was able to snap straight roads easily to the junction polygon.
  • I used the eye icon on the right side menu (the outliner menu in Blender) to hide the junction_connecting_road elements. This is because no fbx is generated for these connecting roads and the CARLA map import had an issue with that. I don't think this affects the connecting roads in the OpenDRIVE file.
  • I chose the fbx import option. An opendrive is also generated when the export button of this tool is clicked.
  • I had CARLA installed, built from source on Windows. I added copies of the fbx file and the opendrive file in the Import folder in CARLA. I renamed both files to be the same name.
  • I ran make import from the CARLA project directory. It did not give any error. It creates a map_package directory in the <CARLA project folder>/Unreal/CarlaUE4/Content directory.
  • I started CARLA by running make launch from the CARLA project directory. Clicked the play button on Unreal Engine to start the server.
  • I opened another console and in the <CARLA project folder>/PythonAPI/util directory, I ran the config.py script using the following command: python config.py --map <map name> This is the same map name of the fbx and opendrive from earlier. This reloaded the scene with the imported map with lane markings. I also ran /PythonAPI/examples/generate_traffic.py to test simulation capability and it worked.

Here are the outputs on Blender and CARLA:

blender-intersection
unreal-blender-intersection

@johschmitz
Copy link
Owner

johschmitz commented Feb 19, 2023

Hey @ishaan95 thanks a lot for the summary! I'll at some point have to sit down and write something very similar down into a user documentation but for now I think I can link to this issue when the question comes up. One thing that seems a bit problematic to me in this step by step description is the "file renaming" step. In case the link between the OpenSCENARIO file and the 3D mesh file is needed during runtime this might create an issue and the XML code might have to be updated as well. I believe in your case this was no problem since you used the "offline" .fbx import and probably only used OpenDRIVE.

@johschmitz johschmitz added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Feb 19, 2023
@ishaan95
Copy link
Author

Yes, I only used opendrive. There might be an issue if Openscenario is to be used (maybe .xosc file with same name as the other 2 might help).

If we had an "export to CARLA" button which created only FBX and Opendrive with the same name and exported by hiding the connecting roads, that would be great!

@johschmitz
Copy link
Owner

I will put that on my TODO list.

@johschmitz
Copy link
Owner

@ishaan95 I have released an update and I am now not exporting the connecting roads as part of the 3D mesh. Hope that suits your use case.

@ishaan95
Copy link
Author

ishaan95 commented Mar 5, 2023

Thank you. Will test the export and get back to you.

@johschmitz
Copy link
Owner

@ishaan95 make sure to create a track from scratch or it might not work since it will already be corrupted before export in the old version. Keep in mind that I will sometimes break compatibility in the 0.x versions if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
2 participants